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
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 15 2003
EXTENSIONS
Edited and extended by Klaus Brockhaus and Sascha Kurz, Sep 20 2003
STATUS
approved