login
Smallest prime that is the product of n consecutive integers + 1, or 0 if no such number exists.
3

%I #12 Feb 03 2026 23:01:10

%S 2,3,7,0,2521,20161,604801,6652801,726485761,39916801,39916801,

%T 140792940288001,14820309504001,10461394944001,641171050071552001,

%U 425757851430912001,9366672731480064001,8515157028618240001

%N Smallest prime that is the product of n consecutive integers + 1, or 0 if no such number exists.

%C The product of four consecutive integers + 1 is always composite (a square), so a(4) = 0. Are there any more zeros in the sequence?

%H Sean A. Irvine, <a href="/A083521/b083521.txt">Table of n, a(n) for n = 1..250</a>

%e 1*2*3*4*5 + 1 = 121 = 11*11 and 2*3*4*5*6 + 1 = 721 = 7*103 are composite, but 3*4*5*6*7 + 1 = 2521 is prime, so a(5) = 2521.

%o (PARI) m=1000; for(n=1,18,b=0; k=1; while(b<1&&k<m,if(!isprime(p=prod(j=k,k+n-1,j)+1,1),k++,b=1)); print1(if(k<m,p,0),","))

%Y Cf. A083520, A083522.

%K nonn

%O 1,1

%A _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 05 2003

%E Edited and extended by _Klaus Brockhaus_ and _Don Reble_, May 06 2003

%E Offset corrected by _Sean A. Irvine_, Feb 03 2026