login
Smallest number m such that m*(m+1)*(m+2) has exactly n distinct prime factors.
3

%I #125 May 19 2026 17:48:08

%S 1,3,5,13,33,153,285,713,5795,18445,90363,304589,1013725,5617820,

%T 23738713,123702369,556876529,3760113565,18723991845,41704979953

%N Smallest number m such that m*(m+1)*(m+2) has exactly n distinct prime factors.

%C Conjecture: this is an increasing sequence.

%C a(22) <= 1782994645795, a(23) <= 6127197154440, a(24) <= 34529471219670, a(25) <= 906874931149913. - _David A. Corneth_, May 14 2026

%H XiaoYang Zhang, <a href="https://www.zhihu.com/question/1983898941490759119">What are the numbers that contain the most distinct prime factors among three consecutive natural numbers, within the ranges of 10^2, 10^3, 10^4, etc?</a> (in Chinese).

%e For n = 9, a(9)*(a(9) + 1)*(a(9) + 2) = 713*714*715 = (23*31)*(2*3*7*17)*(5*11*13) with 9 distinct prime factors.

%t a[n_]:=(k=1;While[PrimeNu[Times@@{k, k + 1, k + 2}]!=n,k++];k);

%t Table[a[n], {n, 2, 10}]

%o (Python)

%o from itertools import count, islice

%o from sympy import factorint

%o def agen(): # generator of terms

%o wlst, adict, n = [set(factorint(1+i)) for i in range(3)], dict(), 2

%o for m in count(1):

%o v = len(wlst[0] | wlst[1] | wlst[2])

%o if v >= n and v not in adict:

%o adict[v] = m

%o while n in adict:

%o yield adict[n]

%o n += 1

%o wlst = wlst[1:] + [set(factorint(m+3))]

%o print(list(islice(agen(), 13))) # _Michael S. Branicky_, May 05 2026

%Y Cf. A001221, A002110, A059958, A394554.

%K nonn,more

%O 2,2

%A _Zhining Yang_, Apr 30 2026