Attempted proof that the average of primes on an interval $[1,n]$ is asymptotic to the midpoint of the interval
问题内容
Following is an attempt at a proof (as an exercise) that the average of primes on an interval $[1,n]$ is asymptotically equal to the midpoint of the interval. While I think the idea is correct (see data below), there may be a better way, and notational improvements welcome.
To show: $$\frac{\sum_{p~ <~ n} p }{\sum_{i~\leq~ n}i }\sim \frac{\pi(n)}{n}$$
Note: it suffices to show that $\frac{\sum p}{\sum i}\sim\frac{\pi(n)}{n}$ since $\frac{\sum p}{n(n+1)/2}\sim \frac{\pi(n)}{n}$ and then $\frac{1}{\pi(n)}\sum p \sim \frac{(n+1)}{2}\sim \frac{n}{2}$
Assumption: if $\pi(n)=k,~~ \sum_{p<n}p \sim \frac{1}{2}k^2 \ln k.$ Omitting details, this can be shown by integration by parts of $\int^{p_k}_2 t~d(\pi(t)) $ and so on giving finally $(1/2)~k^2\ln k$ (dominating the error as $n$ gets large). Then
$\frac{\frac{1}{2}k^2\ln k}{n(n+1)/2} \sim\frac{\pi(n)^2\ln \pi(n)}{n(n+1)}\sim\frac{\pi(n)}{n},~ \implies \pi(n)\ln \pi(n)\sim (n+1)\sim n,$
(bearing in mind that $\pi(n)\ln \pi(n)\sim k\ln k\sim p_k\sim n).$
Original motivation: $\frac{\frac{1}{\pi(n)}\sum_{p<n} p }{ (n/2)} = ~0.947,~ 0.956,~ 0.964 $ for $n= 10^5,~10^6,~10^7,~$ respectively.
Not having seen the claim in the title I thought it interesting, but it is all via the PNT so a weak result if correct. The integration(s) by parts in the assumed result could be considered challenging.
回答 (1)
I would recommend Abel's sum formula, integrals are usually easier to manipulate than sums. Thus, $\DeclareMathOperator{\Li}{Li}$ \begin{align} S(x) &:= \sum_{p \leqslant x} 1\cdot p \\ &= \pi(x)\cdot x - \int_{2}^{x} \pi(u)\,du \\ &= \Li (x)\cdot x - \int_{2}^{x} \Li(u)\,du + E(x)\cdot x - \int_{2}^{x} E(u)\,du \\ &= \int_{2}^{x} \frac{d}{du}\bigl(\Li(u)\cdot u\bigr) - \Li(u)\,du + O(x\cdot E(x)) \\ &= \int_{2}^{x} \frac{u}{\log u}\,du + O(x\cdot E(x)) \\ &= \frac{x^{2}}{2\log x} + \int_{2}^{x} \frac{u}{2\log^{2} u}\,du + O(x\cdot E(x))\,, \end{align} where $E(x) = \pi(x) - \Li(x)$, and depending on how much of the prime number theorem you want to use, you get \begin{equation} \frac{S(x)}{\pi(x)} = \frac{x}{2} + O\biggl(\frac{x}{\log x}\biggr)\,, \end{equation} a more precise estimate, or a less precise one ($x/2 + o(x)$) if you only use $\pi(x) \sim x/\log x$.