OFFSET
1,1
REFERENCES
H. Dubner, Recursive Prime Generating Sequences, Journal of Recreational Mathematics, 29(3) 170-175 1998 Baywood NY.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..350
FORMULA
2*3*5*7*...*a(n) +1 is prime. a(n) is prime. a(n) > a(n-1) with a(n) being the smallest possible prime.
MATHEMATICA
k = 1; cp = 2; ct = 1; n[ct] = 2; While[ct < 64, k++; p = Prime[k]; cp1 = cp*p; If[PrimeQ[cp1 + 1], cp = cp1; ct++; n[ct] = p]]; Table[n[k], {k, 1, ct}] (Lei Zhou)
f[s_List] := Block[{p = Times @@ s, q = NextPrime@ s[[-1]]}, While[ !PrimeQ[p*q + 1], q = NextPrime@ q]; Append[s, q]]; Nest[f, {2}, 63] (* Robert G. Wilson v, Jul 20 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Harvey Dubner (harvey(AT)dubner.com)
EXTENSIONS
Corrected and extended by Ray Chandler, Nov 06 2003
Further terms from Lei Zhou, Dec 08 2005
STATUS
approved