%I M0343 #27 Dec 22 2021 00:12:06
%S 2,2,5,2,5,2,17,0,3,0,5,2,29,2,3,0,3,0,11,0,7,0,7,0,5,0,7,0,13,0,13,0,
%T 7,0,5,0,5,0,13,0,7,0,7,0,7,0,7,0,11,0,17,0,3,0,3,0,97,0,29,2,3,0,13,
%U 2,3,0,19,0,19,0,3,0,5,0,3,0,23,0,7,0,11,0,53,0,31,0,89,0,53,0,19,0,11,0,3,2
%N Sum of n consecutive primes starting at a(n) is prime (or 0 if impossible).
%C 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
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D C. W. Trigg, Prime sums of consecutive primes, J. Rec. Math., 18 (No. 4, 1985-1986), 247-248.
%H T. D. Noe, <a href="/A007610/b007610.txt">Table of n, a(n) for n = 1..10000</a>
%H C. W. Trigg, <a href="/A007610/a007610.pdf">Prime sums of consecutive primes</a>, J. Rec. Math., 18 (No. 4, 1985-1986), 247-248. (Annotated scanned copy)
%t 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 *)
%Y Cf. A013916, A071149.
%K nonn,nice,easy
%O 1,1
%A _N. J. A. Sloane_, _Robert G. Wilson v_, _Mira Bernstein_