%I #9 Dec 05 2013 19:56:45
%S 2,3,7,5,61,7,43,337,73,11,991,13,157,121080961,211,17,14820309504001,
%T 19,0,6841,421,23,10627,96909121,601,15601,17551,29,173059286401,31,
%U 530122321,29761,3569119343741952001,1123,25622035084801,37
%N Smallest prime of the form n(n-1)(n-2)...(n-k)+1, or 0 if no such prime exists.
%H Harvey P. Dale, <a href="/A092927/b092927.txt">Table of n, a(n) for n = 1..968</a>
%e a(8) = 8*7*6 +1 = 337.
%t Flatten[Table[Select[Rest[FoldList[Times,1,Range[n,1,-1]]]+1,PrimeQ,1]/. {}->{0},{n,40}]] (* _Harvey P. Dale_, Jul 10 2012 *)
%o (PARI) f(n,k)=prod(i=n-k,n,i)+1; a(n)=for (i=0,n,if(isprime(f(n,i)),print1(f(n,i));break()))
%Y Cf. A092925, A092926, A092928.
%K nonn
%O 1,1
%A _Amarnath Murthy_, Mar 18 2004
%E More terms from Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 19 2004