# Calculate the limit $\lim_{x \to \infty} \ \frac{1}{2}\sum\limits_{p \leq x} p \log{p}$ (here p is a prime)

Calculate the limit $\lim_{x \to \infty} \ \frac{1}{2}\sum\limits_{p \leq x} p \log{p}$
(here the sum goes over all the primes less than or equal to x) using the Prime Number Theorem.

I think I've managed to show by definition that the limit is infinity but couldn't think of an elegant way of calculating it using the Prime Number Theorem. Any ideas ?

• $p$ and $\log p$ are $>1$ for sufficiently large $p$, and there are infinitely many primes, so it must diverge. – Angela Pretorius Jun 25 '13 at 14:34
• Are you sure you don't mean $\frac{\log p}{p}$ or something similar? – A.S Jun 25 '13 at 14:35
• @Andrew Salmon This is how the question appeared in the exam. – Robert777 Jun 25 '13 at 14:40
• @Andrew Salmon I would love to see an elegant answer to your question as well (in case you have one) – Robert777 Jun 25 '13 at 14:41

## 2 Answers

$$\lim_{x\to\infty}\sum\limits_{p \leq x} p \log{p}>\lim_{x\to\infty}\sum\limits_{p \leq x}1$$ $$=\lim_{x\to\infty}\pi(x)\tag{\pi(x) is prime counting func.}$$ $$=\lim_{x\to\infty}\left(\frac{\pi(x)}{\frac{x}{\log x}}\right)\left(\frac{x}{\log x}\right)=\left(\lim_{x\to\infty}\frac{\pi(x)}{\frac{x}{\log x}}\right)\left(\lim_{x\to\infty}\frac{x}{\log x}\right)$$ $$=\lim_{x\to\infty}\frac{x}{\log x}\to\infty$$

Here, $\lim_{x\to\infty}\frac{\pi(x)}{\frac{x}{\log x}}=1$ by prime number theorem.

• I think that the first inequality should be in the opposite direction. – Robert777 Jun 25 '13 at 14:59
• @Robert777: yeah. Thanks for pointing out. – Aang Jun 25 '13 at 15:00
• Okay, I got it. Thanks a lot ! – Robert777 Jun 25 '13 at 15:00
• Do you really need to pull out the prime number theorem, since $\pi(x)\to\infty$ as $x\to\infty$ simply because there are infinitely many primes? – Thomas Andrews Jun 25 '13 at 15:18
• Not really as commented by @Angela Richardson too , but OP wanted to use it. – Aang Jun 25 '13 at 15:25

I will write the sum as $S(x) = \sum\limits_{p_n \leq x} p_n \log{p_n}$.

By the prime number theorem, $p_n \sim n \ln n$, so, taking liberties in what follows,

\begin{align} S(x) &\sim \sum\limits_{p_n \leq x} n \ln n \ln{(n \ln n)}\\ &= \sum\limits_{p_n \leq x} n \ln n (\ln(n)+ \ln\ln n)\\ &\approx \sum\limits_{p_n \leq x} n \ln^2 n \\ &\approx \sum\limits_{p_n \leq x} n \ln^2 n \\ &\approx \sum\limits_{n \ln n\leq x} n \ln^2 n \\ &\approx \sum\limits_{n \leq x/\ln x} n \ln^2 n \\ &\approx \int_{1}^{x/\ln x} n \ln^2 n\ dn \\ &\approx\frac{1}{2} x^2 \ln^2 x \\ \end{align}

since $(x^2 \ln^2 x)' = x^2 (2 \ln x)(1/x) + 2x \ln^2 x = 2x \ln^2 (x)(1+1/\ln x) \sim 2x \ln^2 (x)$.

My conclusion, and this can be made rigorous with a little work (I think), is that $$\ \frac{1}{2}\sum\limits_{p \leq x} p \log{p} \sim \frac{1}{4}x^2 \ln^2 x$$