OFFSET
1,1
COMMENTS
The number of distinct prime divisors, omega(m*(m+1)) is exactly one less than the index of the greatest prime divisor, pi(gpf(m*(m+1))): A252489(m) - A059957(m) = 1. The last term of the sequence is 80061344 because after this number, the growth rate of A252489 exceeds A059957 enough to produce a difference of more than one, so thereafter the factorization of the product will have more than one gap.
LINKS
Ken Clements, Table of n, a(n) for n = 1..58
EXAMPLE
a(1) = 4 because 4*5 = 20 with gpf 5 and pi(5) = 3 while omega(20) = 2 because it has only 2 and 5 for prime divisors, missing prime divisor 3.
a(2) = 6 because 6*7 = 42 with gpf 7 and pi(7) = 4 while omega(42) = 3 because it has only 2, 3 and 7 for prime divisors, missing prime divisor 5.
a(3) = 21 because 21*22 = 462 with gpf 11 and pi(11) = 5 while omega(462) = 4 because it has only 2, 3, 7 and 11 for prime divisors, missing prime divisor 5.
MATHEMATICA
q[m_] := Module[{p = Union[Flatten[FactorInteger[#][[;; , 1]] & /@ {m, m + 1}]]}, PrimePi[p[[-1]]] == Length[p] + 1]; Select[Range[720000], q] (* Amiram Eldar, Dec 23 2025 *)
PROG
(Python)
from sympy import primepi, primefactors
def ok(m):
pf = primefactors(m*(m+1))
omega, pidx = len(pf), primepi(pf[-1])
return pidx - omega == 1
print([m for m in range(2, 10**4) if ok(m)])
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Ken Clements, Dec 22 2025
STATUS
approved
