login
A307907
a(n) is the greatest k such that p^k <= n for any prime factor p of n.
2
1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 3, 1, 1, 2, 1, 5, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 3, 2, 2, 1, 1, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 1, 2, 4, 1, 1, 2, 1, 1, 1, 1
OFFSET
2,3
FORMULA
a(n) = floor(log(n)/log(A006530(n))).
a(p^k) = k for any prime number p and any k > 0.
0 <= a(n^k) - k*a(n) < k for any n > 1 and any k > 0.
a(n) = 1 iff n belongs to A064052.
a(n) > 1 iff n belongs to A048098.
a(n) > 2 iff n belongs to A090081.
EXAMPLE
For n = 12:
- the prime factors of 12 are 2 and 3,
- 2^2 < 3^2 <= 12 < 3^3,
- hence a(12) = 2.
MATHEMATICA
Array[If[PrimeQ@ #, 1, Floor@ Log[FactorInteger[#][[-1, 1]], #]] &, 105, 2] (* Michael De Vlieger, May 08 2019 *)
PROG
(PARI) a(n) = my (f=factor(n)); logint(n, f[#f~, 1])
(Python)
from sympy import integer_log, primefactors
def A307907(n): return integer_log(n, max(primefactors(n)))[0] # Chai Wah Wu, Oct 12 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, May 05 2019
STATUS
approved