login
A277696
Permutation of natural numbers: a(1) = 1; a(2n) = A277817(1+a(n)), a(2n+1) = A277816(a(n)).
7
1, 2, 5, 3, 10, 7, 13, 4, 39, 15, 26, 9, 11, 18, 29, 6, 20, 92, 75, 24, 27, 49, 58, 14, 21, 16, 19, 31, 42, 62, 41, 8, 78, 33, 52, 270, 172, 196, 147, 47, 312, 56, 51, 126, 101, 143, 82, 23, 22, 34, 45, 28, 80, 32, 35, 64, 59, 96, 90, 153, 118, 95, 61, 12, 40, 224, 150, 66, 57, 129, 116, 1134, 534, 606, 316, 752, 404, 520, 207, 120, 55, 1400, 600
OFFSET
1,2
COMMENTS
This sequence can be represented as a binary tree. Each left hand child is produced as A277817(1+n), and each right hand child as A277816(n), when the parent node contains n:
1
................../ \..................
2 5
3......../ \........10 7......../ \........13
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
4 39 15 26 9 11 18 29
6 20 92 75 24 27 49 58 14 21 16 19 31 42 62 41
etc.
FORMULA
a(1) = 1; and then after, a(2n) = A277817(1+a(n)), a(2n+1) = A277816(a(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A277696 n) (cond ((= 1 n) n) ((even? n) (A277817 (+ 1 (A277696 (/ n 2))))) (else (A277816 (A277696 (/ (- n 1) 2))))))
CROSSREFS
Inverse: A277695.
Cf. A277701 (the rightmost edge of the tree).
Sequence in context: A349637 A078386 A163254 * A143121 A101492 A297442
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Nov 06 2016
STATUS
approved