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.

A303759 Number of times the largest prime power factor of n (A034699) is largest prime power factor for numbers <= n; a(1) = 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 30 2018

Keywords

Comments

Ordinal transform of A034699.

Crossrefs

Cf. A000961 (positions of ones), A034699.
Cf. also A078899, A284600, A302789.

Programs

  • Maple
    b:= proc() 0 end:
    a:= proc(n) option remember; local t;
          t:= max(1, seq(i[1]^i[2], i=ifactors(n)[2]));
          b(t):= b(t)+1
        end:
    seq(a(n), n=1..120);  # Alois P. Heinz, Apr 30 2018
  • Mathematica
    f[n_] := Max[Power @@@ FactorInteger[n]];
    b[_] = 0;
    a[n_] := With[{t = f[n]}, b[t] = b[t]+1];
    Array[a, 105] (* Jean-François Alcover, Jan 03 2022 *)
  • 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; };
    A034699(n) = if(1==n,n,fordiv(n, d, if(isprimepower(n/d), return(n/d))));
    v303759 = ordinal_transform(vector(up_to,n,A034699(n)));
    A303759(n) = v303759[n];