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.

A070805 a(1) = 2; a(n) = largest prime not exceeding the sum of all previous terms.

Original entry on oeis.org

2, 3, 5, 7, 17, 31, 61, 113, 239, 467, 941, 1879, 3761, 7523, 15031, 30071, 60149, 120299, 240599, 481181, 962363, 1924721, 3849437, 7698893, 15397783, 30795571, 61591147, 123182281, 246364571, 492729101, 985458239, 1970916449
Offset: 1

Views

Author

Labos Elemer, May 08 2002

Keywords

Crossrefs

Cf. A070218.

Programs

  • Mathematica
    tb[0]={} tb[x_] := Union[tb[x-1], m[x]] m[x_] := {Prime[PrimePi[Apply[Plus, tb[x-1]]]]} Union[Delete[Flatten[Table[m[w], {w, 1, 20}]], 1], {2}]
    nxt[{t_,p_}]:=Module[{c=If[PrimeQ[t],t,NextPrime[t,-1]]},{t+c,c}]; Join[ {2},NestList[nxt,{5,3},40][[All,2]]] (* Harvey P. Dale, Jun 21 2020 *)