5

Noob here. I was playing around with primes in JavaScript and I found that if I divide the nth prime times n to the sum of primes up to n, I get closer to 2 for each n going to infinity: $$\lim_{n\to \infty} \frac{np_n}{\sum_{i=1}^n p_i} = 2$$ Because of computer limitations I could only test this up to n = 25000, where the result was around 2.1. My question is if the result will actually get closer to 2 (but never under) or that it will go under eventually. And if there is a proof, ofcourse...

Marijn
  • 1,027

1 Answers1

5

By Prime Number Theorem and this we get $$ \lim_n \,\frac{np_n}{p_1+\ldots+p_n}=\lim_n\, \frac{n\,(n \ln n)}{\frac{1}{2}n^2\ln n}=2. $$


UPDATE: With regard to the convergence from above, the following would be correct if the upper bound on the sum were exact, but it isn't. Probably a different approach is needed.

From quantitative estimate of sum of k primes and the k-th prime we get $$\require\cancel \frac{np_n}{p_1+\ldots+p_n}\ge \frac{\cancel{n^2}\left(\ln n+\ln \ln n-1\right)}{\frac{\cancel{n^2} \ln n}{2}\left(1+\frac{1}{2\ln n}+\frac{4.02}{(\ln n)^2}\right)}\overbrace{=}^{t=\ln n}2 \, \frac{t+\ln t-1}{t+1/2+4.02/t}. $$

The rightmost expression is larger than $2$ for $t>7.604$, that is $n>e^{7.604}\approx 2006.2$, so if your calculations are correct, indeed the sequence converges to $2$ strictly from above.

Paolo Leonetti
  • 15,423
  • 3
  • 24
  • 57
  • This does not answer the question in the final part of the body of the OP. – Vincenzo Oliva Aug 22 '15 at 09:20
  • You're right, I didn't notice it. An exact estimate has been given by Lowther here http://mathoverflow.net/questions/63412/upper-bounds-for-the-sum-of-primes-n . Anyway I don't know if this is sufficient, I will check it later – Paolo Leonetti Aug 22 '15 at 10:00
  • There is something wrong with those estimates. That would imply that the ratio would diverge to $+\infty$ for $n\to \infty$, and we know this is not true. Where is the mistake? – Paolo Leonetti Aug 22 '15 at 10:21
  • In the numerator of the second term you should have $-1$ instead of $-1/n$. And, very importantly, in the denominator you should have $1/2 n^2 \log n$ instead of $1/2 (n^2 / \log n)$. – Vincenzo Oliva Aug 22 '15 at 10:26
  • Setting $t=\log n $, we're left with $2 \displaystyle \frac{t + \log t -1}{t + 1/2 + 4.02/t}$, which is larger than $2$ for $t>7.604$, that is $n>e^{7.604}\approx 2006.2$. So indeed we're done, if we trust OP's numerical calculations. – Vincenzo Oliva Aug 22 '15 at 10:39
  • Is there something unclear in what I said? Your edit is incomplete. – Vincenzo Oliva Aug 22 '15 at 11:17
  • There should have been $-1$ instead of $-1/n$, you're right; but I still don't get why the denominator is wrong – Paolo Leonetti Aug 22 '15 at 11:18
  • $$ \sum_{k\le n} p_k \sim 1/2 \ ( n^2 \log n).$$ Your denominator has instead $ 1/2 \ ( n^2 / \log n ) $. – Vincenzo Oliva Aug 22 '15 at 11:20
  • Ok, I understand what you are saying, but we don't an quantitative upper bound of that kind (here I used the bound provided by Lowther). Probably using the result of Nilotpal Sinha [in the same thread] we get a better bound (but we should evaluate the constant implicit in the small o).. – Paolo Leonetti Aug 22 '15 at 11:24
  • Not sure if you do, see my edit. – Vincenzo Oliva Aug 22 '15 at 11:33
  • Your edit is wrong: we don't have an exact upper bound for $p_1+\ldots+p_n$ of that form. – Paolo Leonetti Aug 22 '15 at 11:34
  • Oh, pardon, this time I'm wrong and you're right. :) Hadn't carefully read through that answer, you may well roll back. Well then, looks like this approach is not going to be conclusive. – Vincenzo Oliva Aug 22 '15 at 11:38
  • That's what I think too, sadly :/ I will notice you in case I find a better approach.. – Paolo Leonetti Aug 22 '15 at 11:42
  • The convergence isn't 'strictly' from above, because for $n: {1, 2, 3, 4, 5, 6, 8}$ we get a result lower than $2$. – Marijn Aug 23 '15 at 22:19