OFFSET
2,3
LINKS
FORMULA
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