Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A270194
Permutation of natural numbers: a(1) = 1, a(2n) = A269389(1+a(n)), a(2n+1) = A269399(a(n)).
5
1, 2, 3, 4, 5, 6, 9, 7, 10, 8, 12, 11, 15, 16, 30, 13, 17, 18, 31, 14, 26, 20, 34, 19, 33, 23, 45, 24, 48, 46, 93, 21, 40, 25, 49, 27, 50, 47, 94, 22, 41, 39, 80, 29, 61, 54, 99, 28, 52, 53, 97, 36, 68, 69, 124, 37, 70, 73, 154, 71, 127, 141, 266, 32, 65, 60, 112, 38, 78, 74, 155, 42, 85, 75, 158, 72, 133, 142, 267, 35, 67, 62, 113, 59
OFFSET
1,2
COMMENTS
This sequence can be represented as a binary tree. Each left hand child is produced as A269389(1+n), and each right hand child as A269399(n), when the parent node contains n:
1
................../ \..................
2 3
4......../ \........5 6......../ \........9
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
7 10 8 12 11 15 16 30
13 17 18 31 14 26 20 34 19 33 23 45 24 48 46 93
etc.
FORMULA
a(1) = 1, a(2n) = A269389(1+a(n)), a(2n+1) = A269399(a(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A270194 n) (cond ((= 1 n) n) ((even? n) (A269389 (+ 1 (A270194 (/ n 2))))) (else (A269399 (A270194 (/ (- n 1) 2))))))
CROSSREFS
Inverse: A270193.
Similar permutations: A270199, A270202.
Sequence in context: A099004 A308007 A360413 * A055170 A068384 A222253
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Mar 16 2016
STATUS
approved