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)).

Original entry on oeis.org

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, 18, 17, 22, 23, 20, 21, 42, 43, 40, 41, 46, 45, 44, 47, 32, 35, 34, 33, 38, 39, 36, 37, 58, 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
Offset: 0

Views

Author

Antti Karttunen, Apr 14 2018

Keywords

Crossrefs

Cf. A302844 (inverse).

Programs

  • PARI
    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
    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); };
    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))));
    A302843(n) = A163355(A006068(n));

Formula

a(n) = A163355(A006068(n)).
a(n) = A302845(A003188(n)).