login
A270197
Self-inverse permutation of natural numbers: a(1) = 1, for n even, a(n) = A269369(1+a(n/2)), for n odd, a(n) = 2*a(A269370(n)-1).
4
1, 3, 2, 5, 4, 7, 6, 11, 14, 19, 8, 17, 22, 9, 34, 29, 12, 21, 10, 53, 18, 13, 28, 47, 106, 81, 42, 23, 16, 123, 94, 83, 246, 15, 44, 59, 166, 39, 38, 155, 68, 27, 118, 35, 162, 103, 24, 137, 54, 375, 274, 239, 20, 49, 70, 65, 78, 61, 36, 365, 58, 333, 750, 245, 56, 403, 666, 41, 806, 55, 212, 173, 82, 585, 346, 113, 84, 57, 1170, 461, 26, 73, 32
OFFSET
1,2
FORMULA
a(1) = 1, for n even, a(n) = A269369(1+a(n/2)), for n odd, a(n) = 2*a(A269370(n)-1).
PROG
(Scheme, with memoization-macro definec)
(definec (A270197 n) (cond ((<= n 1) n) ((even? n) (A269369 (+ 1 (A270197 (/ n 2))))) (else (* 2 (A270197 (- (A269370 n) 1))))))
CROSSREFS
Similar or related permutations A270195, A270196, A269867.
Sequence in context: A353780 A080261 A138310 * A332769 A191709 A194077
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 13 2016
STATUS
approved