I found this article discussing the upper and lower bounds for the number of primes less than x. In this article this equation was given.

$$\frac{n}{\log n}\left(1+\frac{0.992}{\log n}\right) < \pi(n) <\frac{n}{\log n}\left(1+\frac{1.2762}{\log n}\right)$$

with $\pi(n)$ the actual number of primes less than $n$.

I thought that since $\pi(n+a)-\pi(n)=1$; Where a is the gap between the nth prime and the $(n+1)$th prime

It would follow that

$$\frac{n + g}{\log (n + g)}\left(1+\frac{1.2762}{\log (n + g)}\right)-\frac{n}{\log n}\left(1+\frac{0.992}{\log n}\right)=1$$

Where $g$ is the upper bound of the gap between the nth prime and the (n+1)th prime.

Am I missing anything or is this true?

here is the article https://primes.utm.edu/howmany.html

  • 1
    $\begingroup$ If you meant to write $\ge 1$ instead of $=1$ then yes it could be derived in that way. $\endgroup$ – quid Oct 27 '15 at 1:11
  • 2
    $\begingroup$ Careful: when you say $(1 + 0.992)/\log n$, you mean $1 + (0.992/\log n)$, and similarly for $1.2762$. The prime number theorem says that $\pi(n)$ is approximately $n/\log n$, and this would be false with the extra $\log n$ in the denominators. $\endgroup$ – Ravi Fernando Oct 27 '15 at 6:52
  • $\begingroup$ Agree with @Ravi. The inequalities in the first displayed line did not make any sense the way the earlier editors had bungled it up. $\endgroup$ – Jyrki Lahtonen Jan 8 at 13:55
  • $\begingroup$ In the formula $n$ is not the number of the $n$th prime. It seems to me you are mixing the two? $\endgroup$ – maxmilgram Jan 8 at 15:27

In order to understand the problem you have set up, we need to look at the number of primes at a maximal prime gap and think about how many primes can fit in this space. For example, at $n=113$ a maximal prime gap of $14$ occurs. This means gaps less than 14 can also occur. So, the count of primes in a range like $\pi(n+a)-\pi(n)=1$ like at this maximal it $a$ has to be greater than or equal $14$ at $n$ in order to count it. But, this also means one will count more than one prime in this same size range nearby (where say twin primes are). Look at $n=99$ and a gap of 14: 101, 103, 107, 109, and 113 are all prime. This all means that you need an inequality, $\pi(n+a)-\pi(n) \ge 1$ when $a$ is greater than the maximal gap at $n$. The statement above with Ravi needs to be taken into account before going on. But, it is easy to see that you only get approximate numbers, not exact numbers.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.