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.

A302784 Inverse permutation to A302783: a(n) = A003188(A052331(n)).

Original entry on oeis.org

0, 1, 3, 6, 12, 2, 24, 7, 48, 13, 96, 5, 192, 25, 15, 384, 768, 49, 1536, 10, 27, 97, 3072, 4, 6144, 193, 51, 30, 12288, 14, 24576, 385, 99, 769, 20, 54, 49152, 1537, 195, 11, 98304, 26, 196608, 102, 60, 3073, 393216, 387, 786432, 6145, 771, 198, 1572864, 50, 108, 31, 1539, 12289, 3145728, 9, 6291456, 24577, 40, 390, 204, 98, 12582912, 774, 3075, 21
Offset: 1

Views

Author

Antti Karttunen, Apr 16 2018

Keywords

Crossrefs

Cf. A302783 (inverse).
Cf. also A302029.

Programs

  • PARI
    up_to = 4096;
    v050376 = vector(up_to);
    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,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); };
    A003188(n) = bitxor(n, n>>1);
    A302784(n) = A003188(A052331(n));

Formula

a(n) = A003188(A052331(n)).