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.

A302030 a(n) = 1+A006068(A052331(n)).

Original entry on oeis.org

1, 2, 4, 8, 16, 3, 32, 7, 64, 15, 128, 5, 256, 31, 13, 512, 1024, 63, 2048, 9, 29, 127, 4096, 6, 8192, 255, 61, 25, 16384, 14, 32768, 511, 125, 1023, 17, 57, 65536, 2047, 253, 10, 131072, 30, 262144, 121, 49, 4095, 524288, 509, 1048576, 8191, 1021, 249, 2097152, 62, 113, 26, 2045, 16383, 4194304, 12, 8388608, 32767, 33, 505, 241, 126
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Comments

This is the inverse of A207901 if it is considered with a starting offset 1.

Crossrefs

One more than A302029.

Programs

  • PARI
    up_to_e = 8192;
    v050376 = vector(up_to_e);
    ispow2(n) = (n && !bitand(n,n-1));
    i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to_e,break));
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A006068(n)= { my(s=1, ns); while(1, ns = n >> s; if(0==ns, break()); n = bitxor(n, ns); s <<= 1; ); return (n); } \\ After code in A006068
    A302030(n) = (1+A006068(A052331(n)));

Formula

a(n) = 1+A302029(n) = 1+A006068(A052331(n)).