# Some Notes on Small and Large Prime Gaps

Euclid proved that there are infinitely many primes. Denote $P_n$ as the $n$th prime number. $$P_1=2, P_2=3, P_3=5, \ldots$$ A prime gap is essentially $P_{n+1}-P_n$. The prime gap is odd only for $P_2-P_1=1$. After that it is always even, because after $P_1=2$, all primes are odd. The prime gaps give a sequence of even numbers. From this sequence, we can ask two questions. One question is ‘how small can $P_{n+1}-P_n$ be for large $n$?’ and the second is ‘how big can $P_{n+1}-P_n$ be for large $n$?’.
Twin Prime Conjecture states that there are infinitely many pairs of primes with distance of $2$, i.e. $P_{n+1}-P_n=2$ infinitely often. On average, the prime gap increases logarithmically. However, we expect that the prime gap should return back to $2$ at some point. It had been proved that $P_{n+1}-P_n\le 70,000,000$ infinitely often. The Polymath project hosted by Terence Tao, resulted in improving this bound to $P_{n+1}-P_n\le 246$ infinitely often.
Prime gap can by infinitely large. To prove this, look at the following consecutive string of numbers: $$n!+2,n!+3,n!+4,\ldots,n!+n$$ This is a string of composite numbers with length $n-1$. This implies that the primes to the left and right must have a gap of at least $n-1$ with any arbitrary $n$.
Prime Number Theorem tells us roughly how many primes there are up to a given level. Number of primes $\le x=\frac{x}{\log{x}}$. By the pigeonhole principle, among the primes $\le x$, there is a prime gap $P_{n+1}-P_n\ge\log{x}$ infinitely often, i.e. $P_{n+1}-P_n\ge\log{P_n}$ infinitely often. The best unconditional bound we know is: $$P_{n+1}-P_n\ll P_n^{0.55}$$ If we assume the Riemann Hypothesis, we can create the bound: $$P_{n+1}-P_n\ll P_n^{0.55}\log{P_n}$$ Cramer modeled the primes $\le x$ by a random subset of numbers $\le x$ of cardinality ~ $\frac{x}{\log{x}}$. We say that primes behave pseudorandomly, i.e. like a random set. Cramer conjectured that $P_{n+1}-P_{n}\ge c\log^2{P_n}$ infinitely often for a sufficiently small $c$. If $P_{n+1}-P_{n}\ge C\log^2{P_n}$, then finitely often for large $C$. However, not much progress has been made in this direction.
It had been shown by Westzynthius: $$P_{n+1}-P_n\gg\log{P_n}\frac{\log\log\log{P_n}}{\log\log\log\log{P_n}}$$ This was improved by Erdos: $$P_{n+1}-P_n\gg\log{P_n}\frac{\log\log{P_n}}{(\log\log\log{P_n})^2}$$ This was improved by Rankin: $$P_{n+1}-P_n\gg c\log{P_n}\frac{\log\log{P_n}(\log\log\log\log{n})}{(\log\log\log{P_n})^2}$$ In his first paper, Rankin let $c=\frac{1}{3}$. After that, people improved $c$, but could not come up with another bound.
The latest bound that we know of is: $$P_{n+1}-P_n\gg \log{P_n}\frac{\log\log{P_n}(\log\log\log\log{n})}{\log\log\log{P_n}}$$