login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A269854 Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = 2+A003961(a(n)). 3
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, 32, 83, 58, 33, 44, 41, 30, 37, 40, 65, 46, 31, 36, 77, 54, 127, 48, 137, 94, 55, 68, 59, 42, 57, 56, 101, 70, 79, 52, 53, 38, 25, 64, 245, 166, 91, 116, 95, 66, 67, 88, 119, 82, 45, 60, 107, 74, 43, 80, 191, 130, 121, 92, 89, 62, 39 (list; graph; refs; listen; history; text; internal format)
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
FORMULA
a(1) = 1, a(2n) = 2*a(n), a(2n+1) = 2+A003961(a(n)) = 1 + 2*A048673(a(n)).
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
A269854(n) = if(1==n, 1, if(!(n%2), 2*A269854(n/2), 2+A003961(A269854((n-1)/2))));
for(n=1, 8192, write("b269854.txt", n, " ", A269854(n)));
(Scheme, with memoization-macro definec)
(definec (A269854 n) (cond ((= 1 n) n) ((even? n) (* 2 (A269854 (/ n 2)))) (else (+ 1 (A243501 (A269854 (/ (- n 1) 2)))))))
CROSSREFS
Inverse: A269853.
Sequence in context: A175948 A348268 A269853 * A068193 A257736 A265573
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Mar 16 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 17 17:14 EDT 2024. Contains 375227 sequences. (Running on oeis4.)