close
login
A377487
a(n) = largest power p^k <= n for prime p among prime factors of n.
1
1, 2, 3, 4, 5, 4, 7, 8, 9, 8, 11, 9, 13, 8, 9, 16, 17, 16, 19, 16, 9, 16, 23, 16, 25, 16, 27, 16, 29, 27, 31, 32, 27, 32, 25, 32, 37, 32, 27, 32, 41, 32, 43, 32, 27, 32, 47, 32, 49, 32, 27, 32, 53, 32, 25, 49, 27, 32, 59, 32, 61, 32, 49, 64, 25, 64, 67, 64, 27
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, 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
Sequence in context: A058084 A074882 A373735 * A273284 A079867 A273290
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Oct 29 2024
STATUS
approved