|
|
A070805
|
|
a(1) = 2; a(n) = largest prime not exceeding the sum of all previous terms.
|
|
0
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|