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!)
A269853 Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A064216(n)). 2
1, 2, 3, 4, 5, 6, 7, 8, 11, 10, 9, 12, 15, 14, 19, 16, 13, 22, 31, 20, 27, 18, 21, 24, 63, 30, 23, 28, 17, 38, 43, 32, 35, 26, 29, 44, 39, 62, 87, 40, 37, 54, 79, 36, 75, 42, 25, 48, 159, 126, 127, 60, 61, 46, 51, 56, 55, 34, 53, 76, 123, 86, 107, 64, 41, 70, 71, 52, 247, 58, 125, 88, 143, 78, 251, 124, 45, 174, 59, 80, 287, 74, 33 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(1) = 1, after which for even n, a(n) = 2*a(n/2), for odd n, a(n) = 1 + 2*a(A064989(n-2)).
MATHEMATICA
a[1] = 1; a[n_] := a[n] = If[EvenQ@ n, 2 a[n/2], 1 + 2 a[Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[(n - 1) - 1]]]; Table[a@ n, {n, 83}] (* Michael De Vlieger, Mar 23 2016 *)
PROG
(Scheme, with memoization-macro definec)
(definec (A269853 n) (cond ((= 1 n) n) ((even? n) (* 2 (A269853 (/ n 2)))) (else (+ 1 (* 2 (A269853 (A064216 (/ (- n 1) 2))))))))
CROSSREFS
Inverse: A269854.
Sequence in context: A330091 A175948 A348268 * A269854 A068193 A257736
KEYWORD
nonn
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 March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)