I want to count sum of squares of first $x$ prime numbers. $$1^2+2^2+3^2+5^2+\ldots +p_x^2$$ Is there a formula to do it? (like the formula to count the sum of squares of natural numbers)
-
4$\begingroup$ I do not think so, we do not even have a formula to generate prime numbers. $\endgroup$– VasiliMay 1, 2019 at 15:53
-
1$\begingroup$ Probably not. We don't have a formula for finding out the $n^{th}$ prime yet and this depends on that. However I can think of a few non-explicit formulas that might work but require more computations. $\endgroup$– For the love of mathsMay 1, 2019 at 15:54
-
9$\begingroup$ and $1$ isn't even a prime $\endgroup$– Hagen von EitzenMay 1, 2019 at 15:56
-
6$\begingroup$ See OEIS sequence A024450. $\endgroup$– Robert IsraelMay 1, 2019 at 15:58
-
4$\begingroup$ @MohammadZuhairKhan More explicitly, if there were a formula $f(n)$ for the sum of the first $n$ prime numbers squared, then $\sqrt{f(n)-f(n-1)}$ would be a formula for the $n$th prime $\endgroup$– Hagen von EitzenMay 1, 2019 at 16:03
1 Answer
There is no closed form of the sum of primes or prime powers. The best we have is an asymptotic formula. Rafael Jakimczuk has given the asymptotic sum of prime powers in the paper below so you can estimate of the sum of the squares of primes.