A112527 a(1)=2; a(n)=smallest prime not less than the sum of all previous terms.
2, 2, 5, 11, 23, 43, 89, 179, 359, 719, 1433, 2879, 5749, 11497, 22993, 45989, 91997, 183971, 367949, 735901, 1471807, 2943599, 5887213, 11774429, 23548853, 47097697, 94195421, 188390809, 376781623, 753563269, 1507126519, 3014253049
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A070218.
Cf. A064934. [From R. J. Mathar, Aug 15 2008]
Programs
-
Mathematica
s={2};ss=2;Do[a=If[PrimeQ[ss], ss, Prime[PrimePi[ss]+1]];AppendTo[s, a];AddTo[ss, a], {i, 35}];A112527=s Module[{ll={2}},Do[AppendTo[ll,NextPrime[Total[ll]-1]],{40}];ll] (* Harvey P. Dale, May 07 2012 *) nxt[{t_,a_}]:= Module[{c=NextPrime[t-1]}, {t+c,c}]; Rest[NestList[nxt,{0,2},40][[All,2]]] (* Harvey P. Dale, Nov 22 2019 *)
Comments