login
A087564
a(n) = smallest prime of the form n*(n+1)*(n+2)*...*(n+k) + 1, or 0 if no such prime exists.
7
2, 3, 13, 5, 31, 7, 55441, 73, 991, 11, 670442572801, 13, 2731, 211, 241, 17, 307, 19, 4037881, 421, 463, 23, 725902806896876799590400001, 601, 17551, 530122321, 757, 29, 45143585625601, 31, 5296855682339020801, 63606090241, 1123, 42841
OFFSET
1,1
COMMENTS
a(n) = n+1 iff n+1 is prime. Conjecture: No term is zero.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..522 (first 100 terms from Jean-François Alcover)
EXAMPLE
7 + 1 = 8, 7*8 + 1 = 57, 7*8*9 + 1 = 505, 7*8*9*10 + 1 = 5041 are all composite, but 7*8*9*10*11 + 1 = 55441 is prime, so a(7) = 55441.
MAPLE
for n from 1 to 70 do k := 0: while(not isprime(1+product(n+i, i=0..k ))) do k := k+1:od:a[n] := 1+product(n+i, i=0..k):od:seq(a[l], l=1..70); # Sascha Kurz
MATHEMATICA
kmax = 120; a[n_] := For[k = 0, True, k++, If[k == kmax, Return[0], If[PrimeQ[p = Pochhammer[n, k+1] + 1], Return[p]]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 02 2013 *)
PROG
(PARI) for(n=1, 34, k=0; m=n; while(!isprime(m+1, 1), k++; m=m*(n+k)); print1(m+1, ", "))
CROSSREFS
Cf. A087565.
Sequence in context: A076988 A128369 A087568 * A306431 A192362 A057776
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 15 2003
EXTENSIONS
Edited and extended by Klaus Brockhaus and Sascha Kurz, Sep 20 2003
STATUS
approved