

A269377


Tree of Lucky sieve: a(0) = 1, a(1) = 2; after which a(2n) = A269369(a(n)), a(2n+1) = 2*a(n).


6



1, 2, 3, 4, 7, 6, 5, 8, 9, 14, 11, 12, 19, 10, 17, 16, 13, 18, 35, 28, 39, 22, 29, 24, 27, 38, 23, 20, 61, 34, 41, 32, 15, 26, 47, 36, 123, 70, 77, 56, 57, 78, 59, 44, 103, 58, 65, 48, 45, 54, 107, 76, 81, 46, 53, 40, 91, 122, 95, 68, 145, 82, 89, 64, 21, 30, 71, 52, 165, 94, 101, 72, 183, 246, 203, 140, 271, 154, 161, 112, 97
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

Permutation of natural numbers obtained from the Lucky sieve. Note the indexing: Domain starts from 0, range from 1.
This sequence can be represented as a binary tree. After a(1)=2, each left hand child is obtained by applying A269369 to the parent, and each right hand child is obtained by doubling the contents of the parent node, when the parent node contains n:
1

...................2...................
3 4
7......../ \........6 5......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
9 14 11 12 19 10 17 16
13 18 35 28 39 22 29 24 27 38 23 20 61 34 41 32
etc.
Sequence A269375 is obtained from the mirror image of the same tree.


LINKS

Antti Karttunen, Table of n, a(n) for n = 0..4095
Index entries for sequences that are permutations of the natural numbers


FORMULA

a(0) = 1, a(1) = 2; after which, a(2n) = A269369(a(n)), a(2n+1) = 2*a(n).
As a composition of related permutations:
a(n) = A260742(A269387(n)).


PROG

(Scheme, with memoizationmacro definec)
(definec (A269377 n) (cond ((<= n 2) (+ 1 n)) ((even? n) (A269369 (A269377 (/ n 2)))) (else (* 2 (A269377 (/ ( n 1) 2))))))


CROSSREFS

Inverse: A269378.
Cf. A269369.
Cf. A000959 (with 2 inserted between 1 and 3 forms the left edge of the tree).
Related permutation: A269375.
Cf. also A252753, A269387.
Sequence in context: A092842 A331275 A072028 * A072026 A332213 A235199
Adjacent sequences: A269374 A269375 A269376 * A269378 A269379 A269380


KEYWORD

nonn,tabf


AUTHOR

Antti Karttunen, Mar 01 2016


STATUS

approved



