OFFSET
0,3
COMMENTS
Slowest increasing sequence where 3 consecutive integers sum up to a prime.
In a string there can be at most two consecutive integers, e.g., (10, 11). More generally, three consecutive terms cannot be in arithmetic progression.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
EXAMPLE
0 + 1 + 2 = 3, which is prime; 1 + 2 + 4 = 7, which is prime; 2 + 4 + 5 = 11, which is prime.
MATHEMATICA
n1 = 0; n2 = 1; counter = 1; maxnumber = 10^4; Do[ If[PrimeQ[n1 + n2 + n], {sol[counter] = n; counter = counter + 1; n1 = n2; n2 = n}], {n, 2, maxnumber}]; Table[sol[j], {j, 1, counter}]\) (* Ben Ross (bmr180(AT)psu.edu), Jan 29 2006 *)
nxt[{a_, b_, c_}]:={b, c, Module[{x=c+1}, While[!PrimeQ[b+c+x], x++]; x]}; Transpose[ NestList[nxt, {0, 1, 2}, 60]][[1]] (* Harvey P. Dale, Jun 10 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 08 2002
EXTENSIONS
More terms from Matthew Conroy, Sep 09 2002
Entry revised by N. J. A. Sloane, Mar 25 2007
STATUS
approved