Is there any guarantee of maximum distance to next prime?

We can do even better than finding a prime smaller than the square of the previous: Bertrand's postulate, or the Bertrand-Chebyshev theorem, tells us that there is always a prime between $n$ and $2n$.

As a side note, the distribution of the primes is not at all "a probabilistic thing". Every statement about prime numbers, in specific ranges, or based on variables, etc. is either true or false, though it may be very difficult or impossible to prove or disprove some such statements. The prime number theorem and many similar results tell us some things which are always true as patterns in the limit when we take averages of large ranges. Since this is similar to some patterns in random variables which are almost always true when we take averages of many samples, some of the same techniques for dealing with random variables can be applied in much the same ways to properties of the prime numbers. But these arguments can only tell us about average properties for large numbers, and don't always help attempting to show something always or never happens, or applies in any way to small numbers.


If I understand your question, you are asking if there is a bound on the gaps between primes or if at some point in the primes there could be a huge gap that is way out of the ordinary.

Well, there is a bound from this wikipedia page that gives the following bounds on the nth prime number (for n > 6):

$$\ln(n) + \ln(\ln(n)) - 1 < \frac{p_n}{n} < \ln(n) + \ln(\ln(n))$$

Now let's assume we have $p_n$ and $p_{n+1}$ where $p_n$ is the smallest possible and $p_{n+1}$ is the largest possible. Then the difference would be:

$$g_n < (n+1)(\ln(\ln(n+1)) + \ln(n+1)) - n(\ln(\ln(n)) + \ln(n) - 1)$$

$g_n$ is the gap between the nth and the n+1 th prime. If you are willing to be a little less exact you can assume that $\ln(n+1)=\ln(n)$ because as $n \to \infty$, $\ln(n+1)\to\ln(n)$, you get this result:

$$g_n ≲ \ln(\ln(n)) + \ln(n) + n$$

So it seems that it would be impossible for $p_n > p_{n-1}^2$. There is also something I heard on numberphile which is that there is always a prime between $x$ and $2x$ for any $x$.