4

What is the sum of the squares of the first $n$ primes - in other words, what is:

$$\sum_{p=1}^n{ \left( \text{Prime}(p)^2 \right)}$$

Of course we're looking for the asymptotic bounds, not an actual formula.

Matt Groff
  • 6,117
  • cf. https://mathoverflow.net/questions/216343/asymptotic-of-the-sum-of-squared-primes – Clement C. Oct 21 '17 at 17:31
  • @ClementC.: First off, thanks for the links. I wonder, though - do you think that there's any chance of eliminating the Logarithmic integral? I'm trying to relate this sum to another sum, and the $\text{Li}(x)$ function makes it difficult, if not impossible. – Matt Groff Oct 21 '17 at 17:36
  • What do you mean by "eliminating it"? It's there, we cannot ignore that -- do you mean replacing it by something equivalent but more convenient? – Clement C. Oct 21 '17 at 17:37
  • @ClementC.:Yes, that's what I meant - I'd like to replace it. I could have sworn I'd seen bounds on it as a polynomial in $n$ and $\log{(n)}$ only, but I've been searching for this link for hours without luck. From my notes, I have something on a book by Eric Bach and Jeffrey Shallit, but I don't have anything else besides this. – Matt Groff Oct 21 '17 at 17:42
  • Well, $\operatorname{Li}(x^3) \sim_{x\to\infty} \frac{x^3}{3\ln(x)}$, so there is that :) – Clement C. Oct 21 '17 at 17:46
  • By summation by parts and the PNT

    $$ \sum_{x\leq N} x^2 \mathbb{1}{\text{prime}}(x)\approx\frac{N^3}{\log N}-\sum{2\leq x\leq N-1}\frac{x(2x+1)}{\log x}=\frac{N^3}{3\log N}+O\left(\frac{N^3}{\log^2 N}\right) $$

    – Jack D'Aurizio Oct 21 '17 at 17:52
  • @ClementC.: That's all I really need. I will upvote if you put this in an answer and add references. I'm split between your comments and Jack D'Aurizio's, so I don't know who to accept. – Matt Groff Oct 21 '17 at 17:56
  • @JackD'Aurizio: If you can put this in an answer and cite references, I will upvote it. Again, I'm split between your math and Clement C.'s – Matt Groff Oct 21 '17 at 17:57
  • @MattGroff: you can find a very detailed proof here: https://math.stackexchange.com/questions/49383/how-does-sum-px-p-s-grow-asymptotically-for-textres-1/49434#49434 – Jack D'Aurizio Oct 21 '17 at 17:58
  • @JackD'Aurizio: Thanks! – Matt Groff Oct 21 '17 at 18:00
  • Alternatively, if we denote the nth prime by $p_n$ then $p_n \sim n \log n$ by the PNT, so $$\sum_{k=1}^{n} p_k^2 \sim \sum_{k=1}^{n} (k \log k)^2 \sim \int_0^n (x\log x)^2,dx \sim \frac{n^3 (\log n)^2}{3}.$$ – Antonio Vargas Oct 21 '17 at 18:14

1 Answers1

4

Based on this other question (and the MathOverflow post linking to it), we have as a direct consequence of the Prime Number Theorem that $$ \sum_{\substack{p\text { prime}\\ p\leq n}} p^2 = \operatorname{Li}(n^3)+ O(n^3e^{-c\sqrt{\ln x}})\operatorname*{\sim}_{n\to\infty} \frac{n^3}{3\ln n} $$ for some constant $c>0$, where $\operatorname{Li}$ is the logarithmic integral.

Clement C.
  • 67,323
  • @MattGroff For the sake of closure, if that settles it consider accepting the answer. (If not, of course don't.) – Clement C. Oct 23 '17 at 16:53