login
Permutation of natural numbers: a(1) = 0, a(2) = 1, a(2n) = A001969(1+a(n)), a(2n+1) = A000069(1+a(A268674(2n+1))).
3

%I #7 Mar 07 2016 12:32:11

%S 0,1,2,3,4,5,8,6,7,9,16,10,32,17,11,12,64,15,128,18,13,33,256,20,14,

%T 65,19,34,512,23,1024,24,21,129,22,30,2048,257,35,36,4096,27,8192,66,

%U 25,513,16384,40,28,29,31,130,32768,39,26,68,37,1025,65536,46,131072,2049,67,48,38,43,262144,258,41,45,524288,60

%N Permutation of natural numbers: a(1) = 0, a(2) = 1, a(2n) = A001969(1+a(n)), a(2n+1) = A000069(1+a(A268674(2n+1))).

%C Note the indexing: Domain starts from 1, range from 0.

%H Antti Karttunen, <a href="/A269856/b269856.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>

%H <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a>

%F a(1) = 0, a(2) = 1, a(2n) = A001969(1+a(n)), a(2n+1) = A000069(1+a(A268674(2n+1))).

%F As a composition of other permutations:

%F a(n) = A003188(A252756(n)).

%o (Scheme, with memoization-macro definec)

%o (definec (A269856 n) (cond ((<= n 2) (- n 1)) ((even? n) (A001969 (+ 1 (A269856 (/ n 2))))) (else (A000069 (+ 1 (A269856 (A268674 n)))))))

%Y Inverse: A269855.

%Y Cf. A000069, A001969, A268674.

%Y Related or similar permutations: A003188, A252756, A269852.

%K nonn

%O 1,3

%A _Antti Karttunen_, Mar 07 2016