login
A270196
Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(A269369(1+n)) = 1 + 2*a(n).
4
1, 2, 3, 4, 7, 6, 5, 8, 13, 14, 15, 12, 17, 10, 25, 16, 11, 26, 9, 28, 21, 30, 27, 24, 57, 34, 53, 20, 31, 50, 49, 32, 101, 22, 35, 52, 65, 18, 29, 56, 51, 42, 105, 60, 69, 54, 23, 48, 85, 114, 97, 68, 19, 106, 121, 40, 37, 62, 43, 100, 33, 98, 229, 64, 55, 202, 197, 44, 405, 70, 115, 104, 89, 130, 209, 36, 107, 58, 261, 112, 61
OFFSET
1,2
FORMULA
a(1) = 1, after which for even n, a(n) = 2*a(n/2), for odd n, a(n) = 1 + 2*a(A269370(n)-1).
PROG
(Scheme, with memoization-macro definec)
(definec (A270196 n) (cond ((<= n 1) n) ((even? n) (* 2 (A270196 (/ n 2)))) (else (+ 1 (* 2 (A270196 (- (A269370 n) 1)))))))
CROSSREFS
Inverse: A270195.
Related or similar permutations: A269866, A269373, A269376, A270197.
Sequence in context: A231550 A106453 A122199 * A299327 A231551 A122198
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 13 2016
STATUS
approved