login
A270195
Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A269369(1+a(n)).
4
1, 2, 3, 4, 7, 6, 5, 8, 19, 14, 17, 12, 9, 10, 11, 16, 13, 38, 53, 28, 21, 34, 47, 24, 15, 18, 23, 20, 39, 22, 29, 32, 61, 26, 35, 76, 57, 106, 155, 56, 103, 42, 59, 68, 123, 94, 137, 48, 31, 30, 41, 36, 27, 46, 65, 40, 25, 78, 113, 44, 81, 58, 83, 64, 37, 122, 179, 52, 45, 70, 101, 152, 271, 114, 167, 212, 375, 310, 461, 112, 97
OFFSET
1,2
COMMENTS
This sequence can be represented as a binary tree. When the parent contains n, the left hand child contains 2n, while the value of right hand child is obtained by applying A269369(1+n):
1
|
................../ \..................
2 3
4......../ \........7 6......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
8 19 14 17 12 9 10 11
16 13 38 53 28 21 34 47 24 15 18 23 20 39 22 29
etc.
FORMULA
a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A269369(1+a(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A270195 n) (cond ((<= n 1) n) ((even? n) (* 2 (A270195 (/ n 2)))) (else (A269369 (+ 1 (A270195 (/ (- n 1) 2)))))))
CROSSREFS
Inverse: A270196.
Cf. A269369.
Related or similar permutations: A269865, A269374, A269375, A270197.
Sequence in context: A122198 A122155 A106454 * A297441 A292959 A292957
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Mar 13 2016
STATUS
approved