OFFSET
1,1
EXAMPLE
The composites between prime(8) = 19 and prime(10) = 29 are 20, 21, 22, 24, 25, 26, 27, 28. Their sum 193 is prime, hence prime(8) = 19 is a term.
MATHEMATICA
Do[p = Prime[n]; If[PrimeQ[Apply[Plus, Select[Table[i, {i, p + 1, Prime[n + 2] - 1}], Not[PrimeQ[ # ]] &]]], Print[p]], {n, 1, 1000}] (* Michael Taktikos, Apr 01 2007 *)
PROG
(Magma) [ p: p in [ NthPrime(k): k in [1..650] ] | IsPrime(&+[ c: c in [p+1..NextPrime(NextPrime(p))-1] ] - NextPrime(p)) ]; /* Klaus Brockhaus, Mar 29 2007 */
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot, Mar 27 2007
EXTENSIONS
Edited and extended by Klaus Brockhaus, Mar 29 2007
STATUS
approved