login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A285112 Permutation of natural numbers: a(0) = 1, a(1) = 2, a(2n) = A005117(1+a(n)), a(2n+1) = A065642(a(n)). 5
1, 2, 3, 4, 5, 9, 6, 8, 7, 25, 14, 27, 10, 12, 13, 16, 11, 49, 39, 125, 22, 28, 42, 81, 15, 20, 19, 18, 21, 169, 26, 32, 17, 121, 79, 343, 65, 117, 205, 625, 35, 44, 43, 56, 69, 84, 133, 243, 23, 45, 33, 40, 31, 361, 30, 24, 34, 63, 277, 2197, 41, 52, 53, 64, 29, 289, 199, 1331, 130, 6241, 563, 2401, 106, 325, 193, 351, 335, 1025, 1030, 3125, 58 (list; graph; refs; listen; history; text; internal format)
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 A005117(1+n), and each right hand child as A065642(n), when the parent node contains n >= 2:
1
|
...................2...................
3 4
5......../ \........9 6......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
7 25 14 27 10 12 13 16
11 49 39 125 22 28 42 81 15 20 19 18 21 169 26 32
etc.
LINKS
FORMULA
a(0) = 1, a(1) = 2, a(2n) = A005117(1+a(n)), a(2n+1) = A065642(a(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A285112 n) (cond ((<= n 1) (+ n 1)) ((even? n) (A005117 (+ 1 (A285112 (/ n 2))))) (else (A065642 (A285112 (/ (- n 1) 2))))))
CROSSREFS
Inverse: A285111.
Similar or related permutations: A243344, A243346, A252753, A277696, A284572.
Cf. also arrays A284457 & A284311.
Sequence in context: A096153 A083140 A246279 * A253565 A124652 A250552
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Apr 17 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 7 21:53 EDT 2024. Contains 372317 sequences. (Running on oeis4.)