cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A302843 Permutation of nonnegative integers: a(n) = A163355(A006068(n)).

This page as a plain text file.
%I A302843 #7 Apr 15 2018 15:06:37
%S A302843 0,1,2,3,12,13,14,15,10,9,8,11,4,7,6,5,26,27,24,25,30,29,28,31,16,19,
%T A302843 18,17,22,23,20,21,42,43,40,41,46,45,44,47,32,35,34,33,38,39,36,37,58,
%U A302843 57,56,59,52,55,54,53,48,49,50,51,60,61,62,63,192,193,194,195,204,205,206,207,202,201,200,203,196,199,198,197,218,219,216,217,222
%N A302843 Permutation of nonnegative integers: a(n) = A163355(A006068(n)).
%H A302843 Antti Karttunen, <a href="/A302843/b302843.txt">Table of n, a(n) for n = 0..16383</a>
%H A302843 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A302843 a(n) = A163355(A006068(n)).
%F A302843 a(n) = A302845(A003188(n)).
%o A302843 (PARI)
%o A302843 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 A302843 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 A302843 A163355(n) = if(!n,n,my(i = (#binary(n)-1)\2, f = 4^i, d = (n\f)%4, r = (n%f)); if(((1==d)&&!(i%2))||((2==d)&&(i%2)), f+A163355(A057300(r)), if(3==d,f+f+A163355(A057300(r)), (3*f)+A163355(f-1-r))));
%o A302843 A302843(n) = A163355(A006068(n));
%Y A302843 Cf. A302844 (inverse).
%Y A302843 Cf. A003188, A006068, A057300, A163355, A302845.
%K A302843 nonn
%O A302843 0,3
%A A302843 _Antti Karttunen_, Apr 14 2018