login
A269358
Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A268674(A269379(2n+1)).
5
1, 2, 3, 4, 5, 6, 7, 8, 17, 10, 11, 12, 13, 14, 15, 16, 19, 34, 29, 20, 25, 22, 9, 24, 23, 26, 27, 28, 31, 30, 21, 32, 73, 38, 53, 68, 37, 58, 39, 40, 41, 50, 43, 44, 107, 18, 47, 48, 33, 46, 51, 52, 59, 54, 71, 56, 137, 62, 101, 60, 61, 42, 63, 64, 109, 146, 67, 76, 121, 106, 35, 136, 97, 74, 75, 116, 79, 78, 131, 80, 197
OFFSET
1,2
COMMENTS
This is a variant of A269356, from which it differs for the first time at n=18.
FORMULA
a(1) = 1, after which, for even n, a(n) = 2*a(n/2) and for odd n, a(n) = A269356(n) = A268674(A269379(n)).
Other identities. For all n >= 1:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]
PROG
(Scheme, with memoization-macro definec)
(definec (A269358 n) (cond ((<= n 1) n) ((even? n) (* 2 (A269358 (/ n 2)))) (else (A268674 (A269379 n)))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 03 2016
STATUS
approved