login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #9 Mar 07 2016 12:22:09

%S 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,

%T 23,20,61,34,41,32,15,26,47,36,123,70,77,56,57,78,59,44,103,58,65,48,

%U 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

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

%C Permutation of natural numbers obtained from the Lucky sieve. Note the indexing: Domain starts from 0, range from 1.

%C 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:

%C 1

%C |

%C ...................2...................

%C 3 4

%C 7......../ \........6 5......../ \........8

%C / \ / \ / \ / \

%C / \ / \ / \ / \

%C / \ / \ / \ / \

%C 9 14 11 12 19 10 17 16

%C 13 18 35 28 39 22 29 24 27 38 23 20 61 34 41 32

%C etc.

%C Sequence A269375 is obtained from the mirror image of the same tree.

%H Antti Karttunen, <a href="/A269377/b269377.txt">Table of n, a(n) for n = 0..4095</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F a(0) = 1, a(1) = 2; after which, a(2n) = A269369(a(n)), a(2n+1) = 2*a(n).

%F As a composition of related permutations:

%F a(n) = A260742(A269387(n)).

%o (Scheme, with memoization-macro definec)

%o (definec (A269377 n) (cond ((<= n 2) (+ 1 n)) ((even? n) (A269369 (A269377 (/ n 2)))) (else (* 2 (A269377 (/ (- n 1) 2))))))

%Y Inverse: A269378.

%Y Cf. A269369.

%Y Cf. A000959 (with 2 inserted between 1 and 3 forms the left edge of the tree).

%Y Related permutation: A269375.

%Y Cf. also A252753, A269387.

%K nonn,tabf

%O 0,2

%A _Antti Karttunen_, Mar 01 2016