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.

A302788 Number of times the smallest Fermi-Dirac factor of n is the smallest Fermi-Dirac factor for numbers <= n; a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 3, 1, 4, 1, 2, 1, 5, 3, 1, 1, 6, 1, 2, 4, 7, 1, 8, 1, 9, 5, 3, 1, 10, 1, 11, 6, 12, 2, 4, 1, 13, 7, 14, 1, 15, 1, 5, 3, 16, 1, 8, 1, 17, 9, 6, 1, 18, 4, 19, 10, 20, 1, 11, 1, 21, 2, 7, 5, 22, 1, 8, 12, 23, 1, 24, 1, 25, 13, 9, 3, 26, 1, 6, 1, 27, 1, 14, 7, 28, 15, 29, 1, 30, 4, 10, 16, 31, 8, 32, 1, 33, 2, 11, 1, 34, 1, 35, 17
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Comments

Ordinal transform of A223490, or equally, of A302786.

Crossrefs

Cf. A084400 (gives the positions of 1's).
Cf. also A078898.

Programs

  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    v050376 = vector(up_to);
    A050376(n) = v050376[n];
    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); };
    A001511(n) = 1+valuation(n,2);
    A302786(n) = if(1==n, 0, A001511(A052331(n)));
    v302788 = ordinal_transform(vector(up_to,n,A302786(n)));
    A302788(n) = v302788[n];