%I #26 Apr 05 2018 20:33:02
%S 0,1,2,3,4,5,8,7,6,9,16,11,32,17,10,15,64,13,128,19,14,33,256,23,12,
%T 65,18,35,512,21,1024,31,22,129,20,27,2048,257,34,39,4096,29,8192,67,
%U 30,513,16384,47,24,25,26,131,32768,37,28,71,38,1025,65536,43,131072,2049,66,63,36,45,262144,259,46,41,524288,55,1048576,4097,130,515,40
%N Inverse of "Tree of Eratosthenes" permutation: a(1) = 0, after which, a(2n) = 1 + 2*a(n), a(2n+1) = 2 * a(A268674(2n+1)).
%H Antti Karttunen, <a href="/A252754/b252754.txt">Table of n, a(n) for n = 1..1024</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F a(1) = 0, after which, a(2n) = 1 + 2*a(n), a(2n+1) = 2 * a(A268674(2n+1)).
%F As a composition of related permutations:
%F a(n) = A054429(A252756(n)).
%F a(n) = A156552(A250246(n)).
%F From _Antti Karttunen_, Mar 31 2018: (Start)
%F A000120(a(n)) = A253557(n).
%F A069010(a(n)) = A302041(n).
%F A132971(a(n)) = A302050(n).
%F A106737(a(n)) = A302051(n).
%F (End)
%o (PARI) A252754(n) = if(1==n,0,if(!(n%2),1 + 2*A252754(n/2),2*A252754(A268674(n)))); \\ _Antti Karttunen_, Mar 31 2018
%o (Scheme, with memoization-macro definec)
%o (definec (A252754 n) (cond ((= 1 n) (- n 1)) ((even? n) (+ 1 (* 2 (A252754 (/ n 2))))) (else (* 2 (A252754 (A250470 n))))))
%Y Inverse: A252753.
%Y Fixed points of a(n)+1: A253789.
%Y Cf. A250470, A253556, A253557, A253558, A253559, A268674, A302041.
%Y Similar permutations: A156552, A252756, A054429, A250246, A269388.
%Y Differs from A156552 for the first time at n=21, where a(21) = 14, while A156552(21) = 18.
%K nonn
%O 1,3
%A _Antti Karttunen_, Jan 02 2015
%E Name edited and formula corrected by _Antti Karttunen_, Mar 31 2018