Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A279342
a(0) = 1, a(1) = 2, a(2n) = A055938(a(n)), a(2n+1) = A005187(a(n)).
7
1, 2, 5, 3, 12, 8, 6, 4, 27, 22, 17, 15, 13, 10, 9, 7, 58, 50, 45, 41, 36, 32, 30, 26, 28, 23, 21, 18, 20, 16, 14, 11, 121, 112, 103, 97, 92, 86, 84, 79, 75, 70, 65, 63, 61, 56, 55, 49, 59, 53, 48, 42, 44, 39, 37, 34, 43, 38, 33, 31, 29, 25, 24, 19, 248, 237, 227, 221, 210, 201, 196, 191, 187, 180, 175, 168, 171, 165, 160, 153, 154, 146, 141
OFFSET
0,2
COMMENTS
Note the indexing: the domain starts from 0, while the range excludes zero.
This sequence can be represented as a binary tree. Each left hand child is produced as A055938(n), and each right hand child as A005187(n), when the parent node contains n:
1
|
...................2...................
5 3
12......../ \........8 6......../ \........4
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
27 22 17 15 13 10 9 7
58 50 45 41 36 32 30 26 28 23 21 18 20 16 14 11
etc.
FORMULA
a(0) = 1, a(1) = 2, and then after, a(2n) = A055938(a(n)), a(2n+1) = A005187(a(n)).
As a composition of other permutations:
a(n) = A279344(A054429(n)).
a(n) = A279347(A279344(n)).
a(n) = A279339(A163511(n)).
PROG
(Scheme) (definec (A279342 n) (cond ((<= n 1) (+ 1 n)) ((even? n) (A055938 (A279342 (/ n 2)))) (else (A005187 (A279342 (/ (- n 1) 2))))))
CROSSREFS
Inverse: A279341.
Right edge: A256994.
Related or similar permutations: A054429, A163511, A233278, A256997, A279339, A279344, A279347.
Sequence in context: A162613 A120858 A124937 * A169852 A318189 A176914
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Dec 10 2016
STATUS
approved