login
A071151
Primes which are the sum of the first k odd primes for some k.
4
3, 127, 379, 499, 6079, 6599, 8273, 9521, 11597, 13099, 22037, 33623, 34913, 49279, 52517, 54167, 64613, 92951, 101999, 116531, 182107, 222269, 225829, 240379, 255443, 283079, 356387, 360977, 448867, 535669, 541339, 552751, 611953, 624209
OFFSET
1,1
MATHEMATICA
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 *)
Select[Accumulate[Prime[Range[2, 500]]], PrimeQ] (* Harvey P. Dale, Mar 14 2011 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 13 2002
EXTENSIONS
Name simplified by Charles R Greathouse IV, May 22 2017
STATUS
approved