login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A131590 Sum of the squares of the first 2^n primes. 1

%I #13 Apr 14 2021 05:30:35

%S 4,13,87,1027,13275,155995,1789395,19523155,204330315,2081006083,

%T 20605602003,199966727443,1908356153955,17942429101363,

%U 166591116531123,1529578004981731,13917470067182067,125565110929591171,1124685106917162579,10009134886727192611

%N Sum of the squares of the first 2^n primes.

%H Michael S. Branicky, <a href="/A131590/b131590.txt">Table of n, a(n) for n = 0..30</a>

%e The sum of the squares of the first 2^2 primes = 4+9+25+49 = 87, the third entry in the sequence.

%o (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","); ) }

%o (Python)

%o from sympy import sieve, prime

%o def a(n): return sum(p*p for p in sieve.primerange(1, prime(2**n)+1))

%o print([a(n) for n in range(20)]) # _Michael S. Branicky_, Apr 13 2021

%Y Cf. A099825.

%K nonn

%O 0,1

%A _Cino Hilliard_, Aug 30 2007

%E a(18) and beyond from _Michael S. Branicky_, Apr 13 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:20 EDT 2024. Contains 371906 sequences. (Running on oeis4.)