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.

A305428 Permutation of nonnegative integers: a(1) = 0, a(2) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A305422(2n+1)).

Original entry on oeis.org

0, 1, 3, 2, 5, 6, 7, 4, 13, 10, 15, 12, 31, 14, 9, 8, 17, 26, 63, 20, 11, 30, 61, 24, 127, 62, 25, 28, 29, 18, 255, 16, 509, 34, 59, 52, 511, 126, 57, 40, 1023, 22, 253, 60, 49, 122, 2047, 48, 27, 254, 33, 124, 125, 50, 4095, 56, 121, 58, 8191, 36, 16383, 510, 21, 32, 41, 1018, 32767, 68, 23, 118, 32765, 104, 65535, 1022, 241, 252, 16381, 114, 251, 80, 47
Offset: 1

Views

Author

Antti Karttunen, Jun 10 2018

Keywords

Comments

Note the indexing: the domain starts from 1, while the range includes also zero.
This is GF(2)[X] analog of A243071.

Crossrefs

Cf. A305427 (inverse).
Cf. A305422.
Cf. also A243071, A305418.

Programs

  • PARI
    A091225(n) = polisirreducible(Pol(binary(n))*Mod(1, 2));
    A305419(n) = if(n<3,1, my(k=n-1); while(k>1 && !A091225(k),k--); (k));
    A305422(n) = { my(f = subst(lift(factor(Pol(binary(n))*Mod(1, 2))),x,2)); for(i=1,#f~,f[i,1] = Pol(binary(A305419(f[i,1])))); fromdigits(Vec(factorback(f))%2,2); };
    A305428(n) = if(n<=2,(n-1),if(!(n%2),2*A305428(n/2),1+(2*(A305428(A305422(n))))));

Formula

a(1) = 0, a(2) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A305422(2n+1)).
a(n) = A054429(A305418(n)).