OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..200
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Block[{k = a[n - 1] + 2}, While[ !PrimeQ[k] || ! PrimeQ[ k * Times @@ Table[ a[i], {i, 1, n - 1}] + 2], k += 2]; k]; Table[ a[n], {n, 1, 49}]
nxt[{t_, a_}]:=Module[{p=NextPrime[a]}, While[!PrimeQ[t*p+2], p= NextPrime[ p]]; {t*p, p}]; NestList[nxt, {1, 1}, 50][[All, 2]] (* Harvey P. Dale, Jan 09 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jun 17 2003
STATUS
approved