OFFSET
1,2
COMMENTS
This sequence can be represented as a binary tree. When the parent contains n, the left hand child contains 2n, while the contents of the right hand child is obtained as 2+A003961(n):
1
|
................../ \..................
2 3
4......../ \........5 6......../ \........7
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
8 11 10 9 12 17 14 13
16 29 22 15 20 23 18 27 24 47 34 21 28 35 26 19
etc.
LINKS
PROG
(PARI)
default(primelimit, (2^31)+(2^30));
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
for(n=1, 8192, write("b269854.txt", n, " ", A269854(n)));
(Scheme, with memoization-macro definec)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Mar 16 2016
STATUS
approved