login
A252756
Permutation of nonnegative integers: a(1) = 0, a(2) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A250470(2n+1)).
18
0, 1, 3, 2, 7, 6, 15, 4, 5, 14, 31, 12, 63, 30, 13, 8, 127, 10, 255, 28, 9, 62, 511, 24, 11, 126, 29, 60, 1023, 26, 2047, 16, 25, 254, 27, 20, 4095, 510, 61, 56, 8191, 18, 16383, 124, 17, 1022, 32767, 48, 23, 22, 21, 252, 65535, 58, 19, 120, 57, 2046, 131071, 52, 262143, 4094, 125, 32, 59, 50, 524287, 508, 49, 54, 1048575, 40
OFFSET
1,3
FORMULA
a(1) = 0, a(2) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A250470(2n+1)).
As a composition of related permutations:
a(n) = A054429(A252754(n)).
a(n) = A243071(A250246(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A252756 n) (cond ((<= n 2) (- n 1)) ((even? n) (* 2 (A252756 (/ n 2)))) (else (+ 1 (* 2 (A252756 (A250470 n)))))))
CROSSREFS
Inverse: A252755.
Similar permutations: A243071, A252754, A054429, A250246.
Cf. also A250470, A253556 - A253559.
Differs from A243071 for the first time at n=21, where a(21) = 9, while A243071(21) = 29.
Sequence in context: A056481 A366276 A269386 * A243071 A332811 A286556
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 02 2015
STATUS
approved