OFFSET
0,2
COMMENTS
This sequence can be represented as a binary tree. Each child to the left is obtained by applying A250469 to the parent, and each child to the right is obtained by doubling the parent:
1
|
...................2...................
3 4
5......../ \........6 9......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
7 10 15 12 25 18 21 16
11 14 27 20 35 30 33 24 49 50 51 36 55 42 45 32
etc.
LINKS
FORMULA
a(0) = 1, a(1) = 2; after which, a(2n) = A250469(a(n)), a(2n+1) = 2 * a(n).
As a composition of related permutations:
Other identities. For all n >= 1:
MATHEMATICA
(* b = A250469 *)
b[1] = 1; b[n_] := If[PrimeQ[n], NextPrime[n], m1 = p1 = FactorInteger[n][[ 1, 1]]; For[k1 = 1, m1 <= n, m1 += p1; If[m1 == n, Break[]]; If[ FactorInteger[m1][[1, 1]] == p1, k1++]]; m2 = p2 = NextPrime[p1]; For[k2 = 1, True, m2 += p2, If[FactorInteger[m2][[1, 1]] == p2, k2++]; If[k1+2 == k2, Return[m2]]]];
a[0] = 1; a[1] = 2; a[n_] := a[n] = If[EvenQ[n], b[a[n/2]], 2 a[(n-1)/2]];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 08 2016 *)
PROG
KEYWORD
nonn,tabf,nice
AUTHOR
Antti Karttunen, Jan 02 2015
STATUS
approved