$\lim_{\,n\to\infty}\frac{S(n)}{n\pi(n)}$

Let $S(n)$ be the sum of primes less than or equal to $n$. I guess that $\lim_{\,n\to\infty}\frac{S(n)}{n\pi(n)}$ exists and it's equal to $0$ but I can't prove it .I've begun to doubt it but If my guess is true I want a proof that doesn't use the prime number theorem.

2 Answers

It's not hard to express $S(n)$ in terms of $\pi(n)$: \begin{align}\sum_{p\le n, prime}p&=\sum^n_{k=2}k\,(\pi(k)-\pi(k-1)) \\&=\sum^n_{k=2}(k\,\pi(k)-(k-1)\,\pi(k-1))-\sum^n_{k=2}\pi(k) \\&=n\,\pi(n)-\sum^n_{k=2}\pi(k) \end{align} Now according to the prime number theorem, $$\lim_{n\to\infty}\frac{n\,\,\pi(n)}{\frac{n^2}{\ln n}}=1,$$ and according to the Stolz–Cesàro theorem , $$\lim_{n\to\infty}\frac{\sum^n_{k=2}\pi(k)}{\frac{n^2}{\ln n}}=\lim_{n\to\infty}\frac{\pi(n)}{\frac{n^2}{\ln n}-\frac{(n-1)^2}{\ln (n-1)}}=\frac12,$$ so we have $$\lim_{n\to\infty}\frac{S(n)}{n\,\pi(n)}=\frac{1-\frac12}{1}=\frac12.$$

As shown in this answer, \begin{align} S(n) &=\sum_{p\le n}p\\ &=\frac12\frac{n^2}{\log(n)}+O\left(\frac{n^2}{\log(n)^2}\right) \end{align} Since $$n\,\pi(n)=\frac{n^2}{\log(n)}+O\!\left(\frac{n^2}{\log(n)^2}\right)$$ we have $$\frac{S(n)}{n\,\pi(n)}=\frac12+O\!\left(\frac1{\log(n)}\right)$$