OFFSET
1,2
EXAMPLE
a(4)=5 as 1+2+3+5=11 is prime, 1+2+3+4=10 composite
MATHEMATICA
nxt[{a_, b_, c_}]:=Module[{k=c+1}, While[!PrimeQ[a+b+c+k], k++]; {b, c, k}]; Transpose[NestList[ nxt[#]&, {1, 2, 3}, 70]][[1]] (* Harvey P. Dale, Aug 29 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 08 2002
EXTENSIONS
Corrected and extended by Sam Alexander, Feb 26 2005
STATUS
approved