OFFSET
1,1
COMMENTS
a(n) = 0 iff n is even and the sum of 2..P(n) is not prime. See A013916. - Robert G. Wilson v, Feb 16 2002
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
C. W. Trigg, Prime sums of consecutive primes, J. Rec. Math., 18 (No. 4, 1985-1986), 247-248.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
C. W. Trigg, Prime sums of consecutive primes, J. Rec. Math., 18 (No. 4, 1985-1986), 247-248. (Annotated scanned copy)
MATHEMATICA
f[n_] := If[OddQ@ n, Block[{k = 1}, While[ !PrimeQ[Plus @@ Prime[Range[k, k + n - 1]]], k++]; Prime@ k], If[ PrimeQ[Plus @@ Prime@ Range@ n], 2, 0]]; Array[f, 96] (* Robert G. Wilson v, May 11 2015 *)
CROSSREFS
KEYWORD
nonn,nice,easy
STATUS
approved