OFFSET
1,1
COMMENTS
Grows exponentially: ceiling(log_2(a(n))) = n. - Labos Elemer, May 08 2002
LINKS
Vojtech Strnad, Table of n, a(n) for n = 1..2000 (first 200 terms from Zak Seidov)
MAPLE
s:= proc(n) option remember; `if`(n<1, 0, s(n-1)+a(n)) end:
a:= proc(n) option remember; `if`(n<1, 0, nextprime(s(n-1))) end:
seq(a(n), n=1..35); # Alois P. Heinz, Sep 21 2021
MATHEMATICA
tb[0]={} tb[x_] := Union[tb[x-1], m[x]] m[x_] := {Prime[1+PrimePi[Apply[Plus, tb[x-1]]]]} Flatten[Table[m[w], {w, 1, 10}]] (* Labos Elemer, May 08 2002 *)
bb={2}; s=2; Do[p=Prime[PrimePi[s]+1]; s=s+p; bb=Append[bb, p], {k, 32}]; bb (Seidov)
Nest[Append[#, NextPrime[Total[#]]]&, {2}, 30] (* Zak Seidov, Oct 28 2011 *)
PROG
(PARI) print1(s=2); for(n=2, 99, print1(", "t=nextprime(s+1)); s+=t)
(Python)
from sympy import nextprime
def aupton(terms):
alst, s = [2], 2
while len(alst) < terms:
p = nextprime(s)
alst.append(p)
s += p
return alst
print(aupton(31)) # Michael S. Branicky, Sep 21 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, May 01 2002
EXTENSIONS
More terms from Labos Elemer, May 08 2002
Corrected by Zak Seidov, May 21 2005
STATUS
approved