A071178 Exponent of the largest prime factor of n.
0, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 4, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a071178 = last . a124010_row -- Reinhard Zumkeller, Aug 27 2011
-
Maple
with(numtheory): with(padic): a:= n-> `if`(n=1, 0, ordp(n, max(factorset(n)[]))): seq(a(n), n=1..120); # Alois P. Heinz, Jun 04 2015
-
Mathematica
a[n_] := FactorInteger[n] // Last // Last; Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Jun 12 2015 *) Join[{0},Table[FactorInteger[n][[-1,2]],{n,2,120}]] (* Harvey P. Dale, Aug 02 2025 *)
-
PARI
a(n) = if(n == 1, 0, my(e = factor(n)[, 2]); e[#e]); \\ Amiram Eldar, Oct 02 2024
-
Python
from sympy import factorint def A071178(n): return max(factorint(n).items())[1] if n>1 else 0 # Chai Wah Wu, Oct 10 2023
Formula
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 (since the asymptotic density of A070003 is 0). - Amiram Eldar, Oct 02 2024
Comments