OFFSET
1,1
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
Labos Elemer, May 08 2002
STATUS
approved