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.

A053585 If n = p_1^e_1 * ... * p_k^e_k, p_1 < ... < p_k primes, then a(n) = p_k^e_k.

Original entry on oeis.org

1, 2, 3, 4, 5, 3, 7, 8, 9, 5, 11, 3, 13, 7, 5, 16, 17, 9, 19, 5, 7, 11, 23, 3, 25, 13, 27, 7, 29, 5, 31, 32, 11, 17, 7, 9, 37, 19, 13, 5, 41, 7, 43, 11, 5, 23, 47, 3, 49, 25, 17, 13, 53, 27, 11, 7, 19, 29, 59, 5, 61, 31, 7, 64, 13, 11, 67, 17, 23, 7, 71, 9, 73, 37, 25, 19, 11, 13, 79
Offset: 1

Views

Author

Frederick Magata (frederick.magata(AT)uni-muenster.de), Jan 19 2000

Keywords

Comments

Let p be the largest prime dividing n, a(n) is the largest power of p dividing n.

Examples

			a(42)=7 because 42=2*3*7, a(144)=9 because 144=16*9=2^4*3^2.
		

Crossrefs

Programs

  • Haskell
    a053585 = last . a141809_row  -- Reinhard Zumkeller, Jan 29 2013
    
  • Maple
    a:= n-> `if`(n=1, 1, (i->i[1]^i[2])(sort(ifactors(n)[2])[-1])):
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 03 2023
  • Mathematica
    Table[Power @@ Last @ FactorInteger @ n, {n, 79}] (* Jean-François Alcover, Apr 01 2011 *)
  • PARI
    a(n)=if(n>1,my(f=factor(n)); f[#f~,1]^f[#f~,2],1) \\ Charles R Greathouse IV, Nov 10 2015
    
  • Python
    from sympy import factorint, primefactors
    def a(n):
        if n==1: return 1
        p = primefactors(n)[-1]
        return p**factorint(n)[p] # Indranil Ghosh, May 19 2017

Formula

a(n) = A006530(n)^A071178(n). - Reinhard Zumkeller, Aug 27 2011
a(n) = A141809(n,A001221(n)). - Reinhard Zumkeller, Jan 29 2013

Extensions

More terms from Andrew Gacek (andrew(AT)dgi.net), Apr 20 2000