OFFSET
0,2
COMMENTS
The value of a(0) is of minor importance; starting with a(0) = 2, 3, 4, 5, ... results in sequences that differ from this sequence only in a few initial terms.
22, 25, 28 are three and 49,52,55,58 are four consecutive terms in arithmetic progression. Are there k consecutive terms in arithmetic progression for every k?
EXAMPLE
34 is the next term after 33 since 34 is composite and 33 + 34 = 67 is prime.
MATHEMATICA
a=4; lst={a}; Do[b=a+1; While[ !PrimeQ[a+b]&&PrimeQ[b], b++ ]; AppendTo[lst, b]; a=b, {n, 5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 07 2010 *)
PROG
(PARI) {print1(a=1, ", "); while(a<290, b=a+1; while(isprime(b)||!isprime(a+b), b++); print1(b, ", "); a=b)}
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 31 2002
EXTENSIONS
Edited and extended by Klaus Brockhaus, Aug 01 2002
STATUS
approved