3

Am trying to justify what I assume is a consequence of the prime number theorem but not quite getting there. Letting $\pi(n)$ be the number of primes not exceeding $n$ and $p(k)$ the $k$th prime, I think

$$S(n)=\frac 1 n \sum_{k=1}^n p(k) \sim \pi^{-1}(n/2). $$

For example, $S(100000)=622607$ and $2\pi(622607) = 101614.$

So $$\pi(S(n))\sim n/2, $$ and to some approximation $$\frac{S(n)}{\log(S(n))}\sim n/2. $$

and maybe $S(n)\sim \exp\{\frac{2}{n}S(n)\}$ but I don't see how the Taylor series works here. So I think I have goofed somewhere, though numbers seem to bear out the relation.

Edit: The hint in the comments and Eric Naslund's previous answer to related questions show that $\sum p_k \sim n^2\log n/2.$ Then it is easy to show that

$$n\cdot S(n)\sim n\pi^{-1}(n/2)\sim n^2\log n/2. $$

daniel
  • 10,141
  • 2
    You can relate $\pi(x) = \sum_{p < x} 1$ with $\Pi(x) = \sum_{ p < x} p$ with the summation by parts $$\Pi(N) = \sum_{ p \le N} p = \pi(N)N+ \sum_{n=1}^{N-1} \pi(n) (n- (n+1))$$ – reuns May 25 '17 at 20:21
  • So, you're assuming the median of first $n$ primes is approximately equal to the average? Using Lambert W function you'd get $S(n)= e^{-W(\frac{-2}{n})} = \frac{\frac{2}{n}}{W(\frac{-2}{n})}$. You can then use Taylor for W function. – Χpẘ May 25 '17 at 20:30
  • @user1952009: looks right to me. let me think about that for a bit. – daniel May 25 '17 at 20:35
  • Yes I see that this is summation by parts. I also see the answer clearly once I convince myself that $\sum_{p<x}p \sim\frac{x^2}{2\log x}\to\sum_1^n p_n\sim \frac{1}{2} n^2 \log n.$ Eric Naslund has answered this at https://math.stackexchange.com/questions/623872/what-is-the-sum-of-the-prime-numbers-up-to-a-prime-number-n and linked questions. – daniel May 26 '17 at 05:30

2 Answers2

1

$$ \sum_{n=1}^{x}p_{n} \sim Li (x^{2}) $$

Jose Garcia
  • 8,506
1

Since $p_k \approx k(\ln k + \ln \ln k -1)$ and $S(n) = \frac{1}{n} \sum \limits_{k=1}^{n} p_k \approx \frac{1}{n} \int \limits_{2}^{n} k(\ln k+\ln \ln k-1) dk \approx -\frac{\text{li}\left(n^2\right)}{2 n}-\frac{3 n}{4}+\frac{1}{2} n \log (n)+\frac{1}{2} n \log (\log (n))$ by simply calculating integrations, and for $\ln \ln k$ use integration by parts.

substituting instead of $li(n^2) \approx \frac{n^2}{2 \ln n}$ we get the final approximation which is $$-\frac{3 n}{4}+\frac{1}{2} n \log (n)+\frac{1}{2} n \log (\log (n))-\frac{n}{4 \log (n)} $$

Also $\pi^{-1}(n/2)$ is just $p_{n/2}$ in approximation about $O(\frac{1}{n^{0.4}})$ (and there is better approximations)

But the above approximation suggest that its $p_n$ when dividing $p_n$ over $p_{n/2}$ we get close and approach $2$. so in a sense its true yet there is a better approximation than $p_{n/2}$ or $p_{n/3}$ and so on which is $p_n$ and the above approximation is even better and surly there are much and much better.

Ahmad
  • 1,380
  • 1
  • 18
  • 37
  • A computer can help. If you did a few computations you would see that the asymptotic $n^2\log n/2$ is really quite good. – daniel May 26 '17 at 07:17
  • @daniel sure is quite good asymptotic because it mimic the behavior of $p_n$ divided by $2$ actually every $p_{n/k}$ mimic the behavior of $p_n$ divided by $k$ for really big $n$, so i did not discarded it as invalid, i simply said that there are better approximation to be considered. – Ahmad May 27 '17 at 09:07