login
A270425
Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A265354(n)).
2
1, 2, 3, 4, 7, 6, 5, 8, 9, 14, 19, 12, 13, 10, 29, 16, 25, 18, 11, 28, 15, 38, 23, 24, 17, 26, 27, 20, 55, 58, 37, 32, 41, 50, 73, 36, 31, 22, 39, 56, 67, 30, 49, 76, 63, 46, 117, 48, 59, 34, 75, 52, 79, 54, 77, 40, 33, 110, 129, 116, 47, 74, 21, 64, 155, 82, 57, 100, 93, 146, 221, 72, 35, 62, 51, 44, 71, 78, 53, 112, 113, 134, 227, 60
OFFSET
1,2
FORMULA
a(1) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A265354(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A270425 n) (cond ((= 1 n) n) ((even? n) (* 2 (A270425 (/ n 2)))) (else (+ 1 (* 2 (A270425 (A265354 (/ (- n 1) 2))))))))
CROSSREFS
Inverse: A270426.
Cf. A265354.
Sequence in context: A332213 A235199 A270426 * A332212 A085161 A085162
KEYWORD
nonn,base,less
AUTHOR
Antti Karttunen, Mar 17 2016
STATUS
approved