|
|
A070218
|
|
a(1) = 2; a(n) is the smallest prime greater than the sum of all previous terms.
|
|
7
|
|
|
2, 3, 7, 13, 29, 59, 127, 241, 487, 971, 1949, 3889, 7789, 15569, 31139, 62297, 124577, 249181, 498331, 996689, 1993357, 3986711, 7973419, 15946841, 31893713, 63787391, 127574789, 255149591, 510299171, 1020598339, 2041196683, 4082393387, 8164786771, 16329573527
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Grows exponentially: ceiling(log_2(a(n))) = n. - Labos Elemer, May 08 2002
|
|
LINKS
|
|
|
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:
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|