Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #10 Mar 03 2016 22:51:38
%S 1,2,3,4,5,6,9,8,7,10,15,12,19,18,21,16,11,14,27,20,35,30,33,24,31,38,
%T 51,36,49,42,45,32,13,22,39,28,65,54,57,40,59,70,87,60,79,66,69,48,55,
%U 62,111,76,125,102,105,72,85,98,123,84,109,90,93,64,17,26,63,44,95,78,81,56,113,130,159,108,139,114,117,80
%N Tree of Ludic sieve: a(0) = 1, a(1) = 2; after which, a(2n) = A269379(a(n)), a(2n+1) = 2*a(n).
%C Permutation of natural numbers obtained from the Ludic sieve. Note the indexing: Domain starts from 0, range from 1.
%C This sequence can be represented as a binary tree. Each left hand child is obtained by applying A269379 to the parent's contents, and each right hand child is obtained by doubling the parent's contents:
%C 1
%C |
%C ...................2...................
%C 3 4
%C 5......../ \........6 9......../ \........8
%C / \ / \ / \ / \
%C / \ / \ / \ / \
%C / \ / \ / \ / \
%C 7 10 15 12 19 18 21 16
%C 11 14 27 20 35 30 33 24 31 38 51 36 49 42 45 32
%C etc.
%C Sequence A269385 is obtained from the mirror image of the same tree.
%H Antti Karttunen, <a href="/A269387/b269387.txt">Table of n, a(n) for n = 0..8191</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) = A269379(a(n)), a(2n+1) = 2*a(n).
%F As a composition of other permutations:
%F a(n) = A269171(A252753(n)).
%F a(n) = A260741(A269377(n)).
%o (Scheme, with memoization-macro definec)
%o (definec (A269387 n) (cond ((<= n 2) (+ 1 n)) ((even? n) (A269379 (A269387 (/ n 2)))) (else (* 2 (A269387 (/ (- n 1) 2))))))
%Y Inverse: A269388.
%Y Cf. A003309 (left edge of the tree).
%Y Cf. A269379.
%Y Related permutations: A260741, A269171, A269385.
%Y Cf. also A252753, A269377.
%K nonn,tabf
%O 0,2
%A _Antti Karttunen_, Mar 01 2016