cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Labos Elemer, May 13 2002

Keywords

Crossrefs

Programs

  • 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 *)
  • 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
    
  • Python
    from sympy import isprime, nextprime; m = 0; p = 2
    while p < 3100:
        p = nextprime(p); m += p
        if isprime(m): print(m, end = ', ') # Ya-Ping Lu, Dec 24 2024

Extensions

Name simplified by Charles R Greathouse IV, May 22 2017