A176166 a(n) is the maximum exponent in the prime factorization of the n-th triangular number.
0, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 3, 3, 2, 2, 1, 1, 1, 1, 2, 2, 2, 3, 3, 1, 1, 1, 4, 4, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 3, 3, 2, 2, 1, 1, 3, 3, 2, 2, 1, 1, 1, 1, 1, 2, 5, 5, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 3, 4, 4, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 4, 4, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
f1[n_] := Max[Last/@FactorInteger[n]]; f2[n_]:=n*(n+1)/2; Join[{0}, Table[f1[f2[n]], {n, 2, 4*5!}]] Max[FactorInteger[#][[;;,2]]]&/@Accumulate[Range[110]] // ReplacePart[1 -> 0] (* Harvey P. Dale, Oct 23 2024 *)
-
PARI
a(n) = if(n == 1, 0, vecmax(factor(n*(n+1)/2)[, 2])); \\ Amiram Eldar, Mar 28 2025
Formula
Extensions
a(1) inserted by Amiram Eldar, Mar 28 2025
Comments