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.

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

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 3, 1, 1, 2, 1, 4, 3, 2, 1, 4, 1, 2, 3, 4, 1, 5, 1, 2, 3, 2, 5, 4, 1, 2, 3, 6, 1, 6, 1, 4, 5, 2, 1, 3, 1, 2, 3, 4, 1, 6, 5, 7, 3, 2, 1, 7, 1, 2, 7, 4, 5, 6, 1, 4, 3, 8, 1, 8, 1, 2, 3, 4, 7, 6, 1, 5, 1, 2, 1, 9, 5, 2, 3, 8, 1, 9, 7, 4, 3, 2, 5, 6, 1, 2, 9, 4, 1, 6, 1, 8, 10
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Comments

Ordinal transform of A223491, or equally, of A302785.

Crossrefs

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

Programs

  • Mathematica
    f[n_] := Max@Table[{p, e} = pe; p^(2^(Length[IntegerDigits[e, 2]]-1)), {pe, FactorInteger[n]}];
    b[_] = 1;
    a[n_] := a[n] = With[{t = f[n]}, b[t]++];
    Array[a, 105] (* Jean-François Alcover, Dec 18 2021 *)
  • 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; };
    ispow2(n) = (n && !bitand(n, n-1));
    A223491(n) = if(1==n,n,fordiv(n, d, if(ispow2(isprimepower(n/d)), return(n/d))));
    v302789 = ordinal_transform(vector(up_to,n,A223491(n)));
    A302789(n) = v302789[n];