Maximal Prime Gap

225 Views Asked by At

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

2

There are 2 best solutions below

0
On

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$. But, it is easy to see that you only get approximate numbers, not exact numbers.

0
On

I once used similar bounds for the prime counting function in order to get a direct formula for the maximal prime gap $g_{n}$, the gap between the $n$th prime and the $(n+1)$th prime. Maybe it can be useful:

Consider the following non-asymptotic bounds for $\pi(x)$, proven by Dusart in 2018 (holding for $x>5393$):

$$\frac{x}{\log(x)-1}<\pi(x)<\frac{x}{\log(x)-1.112}$$

To get the maximum value for $p(n)$, we take the lower bound with $x=p(n)$ :

$$\pi(p(n))=\frac{p(n)}{\log p(n)-1}$$ $$n\left(\log p(n)-1\right)-p(n)=0$$ $$p(n)=-nW_{-1}\left(\frac{-e^{1}}{n}\right)$$

$W_{k}(n)$ is the analytic continuation of the product log function. Now if we do the same with the upper bound, we get non-asymptotic bounds for the $N^{th}$ prime $p(n)$:

$$-nW_{-1}\left(\frac{-e^{1.112}}{n}\right)<p(n)<-nW_{-1}\left(\frac{-e}{n}\right)$$

Using our bounds for $p(n)$, we can get a upper bound for the $n^{th}$ prime gap $g(n)$. Since $g(n)=p(n+1)-p(n)$, we will take the upper bound for $p(n+1)$ and the lower bound for $p(n)$:

$$2 \leq g(n)< \left(-(n+1)W_{-1}\left(\frac{-e}{(n+1)}\right)\right)-\left(-nW_{-1}\left(\frac{-e^{1.112}}{n}\right)\right)$$