login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A099825
Sum of the first 2^n primes.
9
2, 5, 17, 77, 381, 1851, 8893, 41741, 191755, 868151, 3875933, 17120309, 74950547, 325590115, 1405167561, 6029676711, 25750781177, 109495928099, 463852117169, 1958476902435, 8244703036797, 34615624751259, 144991244981985
OFFSET
0,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..65 (calculated using Kim Walisch's primesum program; terms 0..30 from Robert G. Wilson v)
Cino Hilliard, Sumprimes. [broken link]
FORMULA
a(n) = A007504(A000079(n)). - Amiram Eldar, Jul 01 2024
MATHEMATICA
NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; f[0] = 2; f[n_] := f[n] = Block[{k = 0, mx = 2^n/2, np = Prime[2^n/2], s = f[n - 1]}, While[k < mx, k++; np = NextPrim@np; s = s + np]; s]; Table[ f@n, {n, 0, 23)] (* Robert G. Wilson v, Aug 24 2006 *)
Module[{nn=22, ap}, ap=Accumulate[Prime[Range[2^nn]]]; Table[ap[[2^n]], {n, 0, nn}]] (* Harvey P. Dale, Apr 12 2017 *)
PROG
(PARI) a(n)=my(s); forprime(p=2, , s+=p; if(n--==0, return(s))) \\ Charles R Greathouse IV, Feb 16 2017
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Oct 25 2004
STATUS
approved