cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A099825 Sum of the first 2^n primes.

Original entry on oeis.org

2, 5, 17, 77, 381, 1851, 8893, 41741, 191755, 868151, 3875933, 17120309, 74950547, 325590115, 1405167561, 6029676711, 25750781177, 109495928099, 463852117169, 1958476902435, 8244703036797, 34615624751259, 144991244981985, 605994279458465, 2527803622205465
Offset: 0

Views

Author

Robert G. Wilson v, Oct 25 2004

Keywords

Crossrefs

Programs

  • 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 *)
  • PARI
    a(n)=my(s); n=2^n; forprime(p=2,, s+=p; if(n--==0, return(s))) \\ Charles R Greathouse IV, Feb 16 2017 \\ corrected by David A. Corneth, Aug 05 2025

Formula

a(n) = A007504(A000079(n)). - Amiram Eldar, Jul 01 2024

A113617 Primes in the sums of the first 2^n primes or primes in A099825.

Original entry on oeis.org

2, 5, 17, 8893, 868151, 3875933, 219554912086470964379, 63036368490471985096643, 26151660747268050131008657684404431
Offset: 1

Views

Author

Cino Hilliard, Jan 14 2006

Keywords

Comments

The programs in the link require the construction of a wall to wall binary file containing the first 10.6 * 10^9 primes.

Examples

			Sum of first 2^32 primes = 219554912086470964379 which is prime.
		

Crossrefs

Formula

a(n) = A099825(A121248(n)). - Amiram Eldar, Jul 01 2024

Extensions

Offset corrected and a(8)-a(9) added by Amiram Eldar, Jul 01 2024
Showing 1-2 of 2 results.