[go: up one dir, main page]

login
A269402
Permutation of natural numbers: a(1) = 1, a(2n) = A179016(1+a(n)), a(2n+1) = A213713(a(n)).
5
1, 3, 2, 7, 6, 4, 5, 16, 13, 15, 12, 8, 9, 11, 10, 46, 27, 35, 22, 42, 25, 32, 21, 19, 14, 23, 17, 31, 20, 26, 18, 158, 69, 85, 43, 116, 54, 67, 36, 142, 62, 78, 40, 104, 50, 64, 34, 57, 30, 39, 24, 71, 37, 49, 28, 101, 48, 63, 33, 81, 41, 53, 29, 669, 219, 259, 100, 321, 122, 145, 65, 476, 164, 190, 80, 255, 98, 120, 55
OFFSET
1,2
COMMENTS
This sequence can be represented as a binary tree. Each left hand child is produced as A179016(1+n), and each right hand child as A213713(n), when the parent contains n:
|
...................1...................
3 2
7......../ \........6 4......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
16 13 15 12 8 9 11 10
46 27 35 22 42 25 32 21 19 14 23 17 31 20 26 18
etc.
FORMULA
a(1) = 1, a(2n) = A179016(1+a(n)), a(2n+1) = A213713(a(n)).
As a composition of other permutations:
a(n) = A269397(A269392(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A269402 n) (cond ((<= n 1) n) ((even? n) (A179016 (+ 1 (A269402 (/ n 2))))) (else (A213713 (A269402 (/ (- n 1) 2))))))
CROSSREFS
Inverse: A269401.
Related or similar permutations: A269392, A269397.
Sequence in context: A153141 A006068 A154436 * A268934 A268832 A201566
KEYWORD
nonn,tabf,base
AUTHOR
Antti Karttunen, Mar 05 2016
STATUS
approved