A307908 a(n) is the least k such that p^k >= n for any prime factor p of n.
1, 1, 2, 1, 3, 1, 3, 2, 4, 1, 4, 1, 4, 3, 4, 1, 5, 1, 5, 3, 5, 1, 5, 2, 5, 3, 5, 1, 5, 1, 5, 4, 6, 3, 6, 1, 6, 4, 6, 1, 6, 1, 6, 4, 6, 1, 6, 2, 6, 4, 6, 1, 6, 3, 6, 4, 6, 1, 6, 1, 6, 4, 6, 3, 7, 1, 7, 4, 7, 1, 7, 1, 7, 4, 7, 3, 7, 1, 7, 4, 7, 1, 7, 3, 7, 5, 7
Offset: 2
Keywords
Examples
For n = 12: - the prime factors of 12 are 2 and 3, - 3^4 > 2^4 >= 12 > 2^3, - hence a(n) = 4.
Links
Programs
-
Mathematica
Array[If[PrimeQ@ #, 1, Ceiling@ Log[FactorInteger[#][[1, 1]], #]] &, 105, 2] (* Michael De Vlieger, May 08 2019 *)
-
PARI
a(n) = my (f=factor(n)); logint(n, f[1,1]) + if (#f~>1, 1, 0)
-
Python
from operator import sub from sympy import integer_log, primefactors def A307908(n): return 1+sub(*integer_log(n,min(primefactors(n)))) # Chai Wah Wu, Oct 12 2024