OFFSET
1,7
COMMENTS
This sequence is the difference between the index of the greatest prime divisor of n*(n+1) and the number of distinct prime divisors of n*(n+1). Where these values are equal to 0, the product n*(n+1) has a complete set of prime factors from its greatest down to 2 (that is, is in the sequence A055932). a(633555) = 0 is the last zero in the sequence because A252489 (which picks the greater of the prime indices from n, n+1) grows faster than A059957.
A141399 contains the indices where a(n) = 0. - Jason Yuen, Dec 09 2025
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
MATHEMATICA
A391449[n_] := PrimePi[#[[-1, 1]]] - Length[#] & [FactorInteger[n*(n + 1)]];
Array[A391449, 100] (* Paolo Xausa, Dec 16 2025 *)
PROG
(Python)
from sympy import primefactors, primepi
def a(n):
pf = primefactors(n * (n+1))
return primepi(pf[-1]) - len(pf)
print([a(n) for n in range(1, 101)])
(PARI) a(n) = my(f=factor(n*(n+1))); primepi(vecmax(f[, 1])) - omega(f); \\ Michel Marcus, Jan 24 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Ken Clements, Dec 09 2025
STATUS
approved
