[go: up one dir, main page]

login
Permutation of nonnegative integers: a(n) = A006068(A057300(n)).
2

%I #5 Apr 15 2018 15:05:31

%S 0,3,1,2,15,12,14,13,7,4,6,5,8,11,9,10,63,60,62,61,48,51,49,50,56,59,

%T 57,58,55,52,54,53,31,28,30,29,16,19,17,18,24,27,25,26,23,20,22,21,32,

%U 35,33,34,47,44,46,45,39,36,38,37,40,43,41,42,255,252,254,253,240,243,241,242,248,251,249,250,247,244,246,245,192

%N Permutation of nonnegative integers: a(n) = A006068(A057300(n)).

%H Antti Karttunen, <a href="/A300839/b300839.txt">Table of n, a(n) for n = 0..16383</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

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

%F a(n) = A006068(A057300(n)).

%o (PARI)

%o A006068(n)= { my(s=1, ns); while(1, ns = n >> s; if(0==ns, break()); n = bitxor(n, ns); s <<= 1; ); return (n); } \\ From A006068

%o A057300(n) = { my(t=1, s=0); while(n>0, if(1==(n%4),n++,if(2==(n%4),n--)); s += (n%4)*t; n >>= 2; t <<= 2); (s); };

%o A300839(n) = A006068(A057300(n));

%Y Cf. A300838 (inverse permutation).

%K nonn,base

%O 0,2

%A _Antti Karttunen_, Apr 15 2018