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*Times @@ Table[a[i], {i, 1, n - 1}] + 2], k += 2]; k]; Table[ a[n], {n, 1, 54}]
nxt[{pr_, a_}]:=Module[{k=a+2}, While[!PrimeQ[pr k+2], k=k+2]; {pr k, k}]; NestList[nxt, {1, 1}, 60][[;; , 2]] (* Harvey P. Dale, Jul 10 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 13 2003
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jun 17 2003
Edited by N. J. A. Sloane, Nov 01 2008 at the suggestion of R. J. Mathar
STATUS
approved