login
Primes which are the sum of the first k odd primes for some k.
4

%I #20 May 22 2017 12:01:04

%S 3,127,379,499,6079,6599,8273,9521,11597,13099,22037,33623,34913,

%T 49279,52517,54167,64613,92951,101999,116531,182107,222269,225829,

%U 240379,255443,283079,356387,360977,448867,535669,541339,552751,611953,624209

%N Primes which are the sum of the first k odd primes for some k.

%H T. D. Noe, <a href="/A071151/b071151.txt">Table of n, a(n) for n = 1..1000</a>

%t s=0;lst={};Do[p=Prime[n];s+=p;If[PrimeQ[s],AppendTo[lst,s]],{n,2,7!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Jan 28 2009 *)

%t Select[Accumulate[Prime[Range[2,500]]],PrimeQ] (* _Harvey P. Dale_, Mar 14 2011 *)

%o (PARI) list(lim)=my(v=List(),s); forprime(p=3,, if((s+=p)>lim, return(Vec(v))); if(isprime(s), listput(v,s))) \\ _Charles R Greathouse IV_, May 22 2017

%Y Analogous to A013918.

%Y Cf. A013916-A013918, A065091, A071148-A071150, A007504.

%K nonn

%O 1,1

%A _Labos Elemer_, May 13 2002

%E Name simplified by _Charles R Greathouse IV_, May 22 2017