OFFSET
1,1
MAPLE
a[1] := 2: for i from 2 to 35 do a[i] := prevprime((i-1)*a[i-1]+1):od:seq(a[i], i=1..35);
MATHEMATICA
nxt[{n_, a_}]:={n+1, NextPrime[a(n+1)+1, -1]}; Join[{2}, NestList[nxt, {1, 2}, 30][[All, 2]]] (* Harvey P. Dale, Jan 20 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Oct 26 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 26 2003
STATUS
approved