OFFSET
0,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..34 (terms 0..30 from Michael S. Branicky)
FORMULA
a(n) = A024450(2^n). - Amiram Eldar, Jul 06 2024
EXAMPLE
The sum of the squares of the first 2^2 primes is a(2) = 4 + 9 + 25 + 49 = 87.
PROG
(PARI) sumprimesq(n, b) = { local(x, y, s, a); for(y=0, n, s=0; for(x=1, b^y, s+=prime(x)^2; ); print1(s", "); ) }
(PARI) lista(pmax) = {my(s = 0, k = 0, pow = 1); forprime(p = 1, pmax, k++; s += p^2; if(k == pow, print1(s, ", "); pow *= 2)); } \\ Amiram Eldar, Jul 06 2024
(Python)
from sympy import sieve, prime
def a(n): return sum(p*p for p in sieve.primerange(1, prime(2**n)+1))
print([a(n) for n in range(20)]) # Michael S. Branicky, Apr 13 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Aug 30 2007
EXTENSIONS
a(18) and beyond from Michael S. Branicky, Apr 13 2021
STATUS
approved