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.

A100549 Let n = 2^e_2 * 3^e_ * 5^e_ * ... be the prime factorization of n; then a(n) = largest prime <= 1 + max{e_2, e_3, e_5, ...}; a(1) = 1 by convention.

Original entry on oeis.org

1, 2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 3, 2, 2, 2, 5, 2, 3, 2, 3, 2, 2, 2, 3, 3, 2, 3, 3, 2, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 5, 3, 3, 2, 3, 2, 3, 2, 3, 2, 2, 2, 3, 2, 2, 3, 7, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 5, 5, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 2, 2, 2, 5, 2, 3, 3, 3, 2, 2, 2, 3, 2
Offset: 1

Views

Author

David Applegate and N. J. A. Sloane, Sep 15 2008

Keywords

Examples

			If n = 8 = 2^3, a(n) = (largest prime <= 3+1) = 3.
If n = 480 = 2^5*3*5, a(n) = (largest prime <= 1 + max{5,1,1}) = 5.
		

Crossrefs

Programs

  • Maple
    # if n = prod_p p^e_p, then
    # pp = largest prime <= 1 + max e_p
    with(numtheory):
    pp := proc(n) local f,m; option remember;
    if (n = 1) then
    return 1;
    end if;
    m := 1:
    for f in op(2..-1,ifactors(n)) do
    if (f[2] > m) then
    m := f[2]:
    end if;
    end do;
    prevprime(m+2);
    end proc;
  • Mathematica
    {1}~Join~Array[Prime@PrimePi[1 + Max@FactorInteger[#][[All, -1]]] &, 105, 2] (* Michael De Vlieger, Nov 13 2018 *)
  • PARI
    a(n) = if (n==1, 1, precprime(1 + vecmax(factor(n)[,2]~))); \\ Michel Marcus, Nov 14 2018