login
Numbers m such that the product m*(m+1) has a set of prime divisors, from greatest down to 2, that is missing exactly two prime divisors.
5

%I #13 Jan 01 2026 15:50:30

%S 7,10,11,32,39,84,119,143,153,168,209,220,242,272,285,324,351,374,441,

%T 455,494,624,675,728,1224,1539,1700,2057,2184,2499,2600,3059,3135,

%U 4913,5082,5775,5928,6174,6655,7865,10625,11270,12635,13376,14079,19227,19550,21504

%N Numbers m such that the product m*(m+1) has a set of prime divisors, from greatest down to 2, that is missing exactly two prime divisors.

%C The number of distinct prime divisors, omega(m*(m+1)) is exactly two less than the index of the greatest prime divisor, pi(gpf(m*(m+1))): A252489(m) - A059957(m) = 2.

%C Although 1109496723125 may be the last term in this sequence, if not, subsequent terms are greater than 2*10^14 by computational verification.

%C The sequence must terminate because the growth rate of A252489 exceeds A059957 enough to produce a continuing difference of more than two eventually, so thereafter the factorization of the product will have more than two gaps.

%H Ken Clements, <a href="/A391970/b391970.txt">Table of n, a(n) for n = 1..90</a>

%e a(1) = 7 because 7*8 = 56 with gpf 7 and pi(7) = 4 while omega(56) = 2 because it has only 2 and 7 for prime divisors, missing prime divisors 3 and 5.

%e a(2) = 10 because 10*11 = 110 with gpf 11 and pi(11) = 5 while omega(110) = 3 because it has only 2, 5 and 11 for prime divisors, missing prime divisors 3 and 7.

%e a(3) = 11 because 11*12 = 132 with gpf 11 and pi(11) = 5 while omega(132) = 3 because it has only 2, 3, and 11 for prime divisors, missing prime divisors 5 and 7.

%t q[m_] := Module[{p = Union[Flatten[FactorInteger[#][[;; , 1]] & /@ {m, m + 1}]]}, PrimePi[p[[-1]]] == Length[p] + 2]; Select[Range[22000], q] (* _Amiram Eldar_, Dec 25 2025 *)

%o (Python)

%o from sympy import primepi, primefactors

%o def ok(m):

%o pf = primefactors(m*(m+1))

%o omega, pidx = len(pf), primepi(pf[-1])

%o return pidx - omega == 2

%o print([m for m in range(2, 10**6) if ok(m)])

%o (PARI) isok(m) = my(f=factor(m*(m+1))); omega(f) == primepi(vecmax(f)) - 2; \\ _Michel Marcus_, Dec 26 2025

%Y Cf. A391602, A391885.

%K nonn

%O 1,1

%A _Ken Clements_, Dec 24 2025