On the difference between consecutive primes

Solution 1:

This should be really easy to answer using Pierre Dusart's explicit estimates on prime-related functions (and probably the older Rosser-Schoenfeld inequalities). For instance, Proposition 6.8 in "Estimates of some functions on primes without R.H." states that for $x \ge 396738$ there is always a prime in the interval $(x, x + x/(25\ln^2 x)]$.

Since that gap is significantly smaller than $x/\ln x$ and quite explicit, this is certainly less than $\pi(x)$, establishing the inequality for large $n$. Combined with Galc127's comment about verifying small $n$, that should cover all cases.

Solution 2:

I am not an expert, but searching the literature gave me the impression that the result is not explicitly stated. There are several asymptotic results of the kind $g_n \ll p_n^{\epsilon}$, e.g., the result by Baker, Harman and Pintz from $2001$, which showed that $g_n ≪ p_n^{\frac{21}{40}}$. Assuming RH one can improve this further.
The question is whether or not any of these results can be made explicit, so that we can find an explicit constant, say $c<10^8$ with $g_n<p_n^{\epsilon}$ for all $n\ge c$, and some reasonable small fixed $\epsilon$ with $\frac{1}{2}< \epsilon <1$. If it is possible, we are done, and we have that $g_n<n$ for all $n>4$.

Edit: The explicit estimates of Dusart (see the answer of Erick Wong) should give us the result. There is also a reference to a paper of Schoenfeld where he shows that $g_n\le 652$ for all $p_n\le 2.685\cdot 10^{12}$.

Solution 3:

I was thinking about this problem, the other day, and came to this conclusion ...

Let's define the sequence $\epsilon_n$ such that $$p_{n+1}-p_n=p_n^{\epsilon_n}$$ According to Bertrand's postulate $$p_{n+1}-p_n=p_n^{\epsilon_n}<p_n$$ thus $$0<{\epsilon_n} <1$$ So that $$\frac{p_{n+1}-p_n}{n}=\frac{p_n^{\epsilon_n}}{n}=\frac{1}{p_n^{1-\epsilon_n}}\cdot \frac{p_n}{n\ln{n}}\cdot \ln{n}<(1+\epsilon)\cdot \frac{\ln{n}}{p_n^{1-\epsilon_n}}<(1+\epsilon)\cdot \frac{\ln{n}}{n^{1-\epsilon_n}}$$ Just because $p_n>n$ and $$\lim_{n \to \infty }\frac{p_n}{n\ln{n}}=1$$ In fact $\epsilon_n< \theta$ which means $1-\epsilon_n > 1- \theta>0$ (from some n, obviously) thus $$0<\frac{p_{n+1}-p_n}{n}<(1+\epsilon)\cdot \frac{\ln{n}}{n^{1-\theta}}\underset{n \to \infty }{\rightarrow}0$$