OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1)= 997 is prime and sum of the first 35 composites from 4 to 51. And the sum of the first 36 composites is 1049 and is also prime.
MATHEMATICA
Transpose[Select[Partition[Accumulate[Select[Range[ 10000], CompositeQ]], 2, 1], AllTrue[ #, PrimeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 12 2014 *)
PROG
(PARI) i=0; b=0; for( a=2, 6000, if( !isprime(a) , i=i+1; b=b+a; if(( isprime(b) & isprime(b+a+1)& !isprime(a+1)) || (isprime(b) & isprime(b+a+2) & isprime(a+1)), print1(b, ", "))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Robin Garcia, Dec 31 2013
STATUS
approved