%I #17 Jan 18 2015 19:04:05
%S 1,2,3,4,5,8,7,6,9,16,15,32,13,10,11,64,17,128,31,14,29,256,63,12,25,
%T 18,19,512,21,1024,127,30,33,20,255,2048,61,26,27,4096,57,8192,511,22,
%U 125,16384,23,24,49,34,35,32768,37,28,1023,62,41,65536,2047,131072,253,58,59,36,65,262144,39,126,509,524288,4095,1048576,121,50,51,40,53
%N Permutation of natural numbers: a(1) = 1, a(n) = A000079(A055396(n+1)-1) * ((2 * a(A078898(n+1))) - 1).
%C This sequence is a "recursed variant" of A249812.
%C See also the comments at the inverse permutation A249814.
%H Antti Karttunen, <a href="/A249813/b249813.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) = 1, a(n) = A000079(A055396(n+1)-1) * ((2 * a(A078898(n+1))) - 1).
%F As a composition of other permutations:
%F a(n) = A246683(A250243(n)).
%F Other identities. For all n >= 1, the following holds:
%F a(n) = (1+a((2*n)-1))/2. [The odd bisection from a(1) onward with one added and then halved gives the sequence back.]
%F a(A006093(n)) = A000079(n-1).
%o (Scheme, with memoizing macro definec from _Antti Karttunen_'s IntSeq-library)
%o (definec (A249813 n) (cond ((<= n 1) n) (else (* (A000079 (- (A055396 (+ 1 n)) 1)) (+ -1 (* 2 (A249813 (A078898 (+ 1 n)))))))))
%Y Inverse: A249814.
%Y Similar or related permutations: A246683, A249812, A250243.
%Y Cf. A000079, A006093, A055396, A078898.
%Y Differs from A246683 for the first time at n=20, where a(20) = 14, while A246683(20) = 18.
%K nonn
%O 1,2
%A _Antti Karttunen_, Nov 06 2014