OFFSET
1,2
COMMENTS
a(1) = 1 by convention.
a(n) is the largest prime power in row n of A162306.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot a(n), n = 1..2^20.
FORMULA
a(p) = p for prime p.
a(p^k) = p^k.
EXAMPLE
a(6) = 4 since 6 = 2*3, the largest powers of these numbers that do not exceed 6 are 4 and 3 respectively, and 4 is the largest.
a(10) = 8 since 10 = 2*5, with 2^3 = 8 and 5^1 = 5 the largest powers of each respectively, and 8 is the largest.
a(30) = 27 since 30 = 2*3*5, with 2^4 = 16, 3^3 = 27, and 5^2 = 25 the largest powers of each respectively; 27 is the largest, etc.
MATHEMATICA
{1}~Join~Table[Max@ Map[#^Floor@ Log[#, n] &, FactorInteger[n][[All, 1]]], {n, 2, 120}]
PROG
(Python)
from sympy import integer_log, primefactors
def A377487(n): return max((p**integer_log(n, p)[0] for p in primefactors(n)), default=1) # Chai Wah Wu, Nov 01 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Oct 29 2024
STATUS
approved
