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.

A112527 a(1)=2; a(n)=smallest prime not less than the sum of all previous terms.

Original entry on oeis.org

2, 2, 5, 11, 23, 43, 89, 179, 359, 719, 1433, 2879, 5749, 11497, 22993, 45989, 91997, 183971, 367949, 735901, 1471807, 2943599, 5887213, 11774429, 23548853, 47097697, 94195421, 188390809, 376781623, 753563269, 1507126519, 3014253049
Offset: 1

Views

Author

Zak Seidov, Sep 10 2005

Keywords

Comments

See A070218: a(1)=2;a(n)=smallest prime greater than the sum of all previous terms.

Crossrefs

Cf. A070218.
Cf. A064934. [From R. J. Mathar, Aug 15 2008]

Programs

  • Mathematica
    s={2};ss=2;Do[a=If[PrimeQ[ss], ss, Prime[PrimePi[ss]+1]];AppendTo[s, a];AddTo[ss, a], {i, 35}];A112527=s
    Module[{ll={2}},Do[AppendTo[ll,NextPrime[Total[ll]-1]],{40}];ll] (* Harvey P. Dale, May 07 2012 *)
    nxt[{t_,a_}]:= Module[{c=NextPrime[t-1]}, {t+c,c}]; Rest[NestList[nxt,{0,2},40][[All,2]]] (* Harvey P. Dale, Nov 22 2019 *)