In number theory, Cramér's conjecture, formulated by the Swedish mathematician Harald Cramér in 1936, is an estimate for the size of gaps between consecutive prime numbers: intuitively, that gaps between consecutive primes are always small, and the conjecture quantifies asymptotically just how small they must be. It states that
where pn denotes the nth prime number, O is big O notation, and "log" is the natural logarithm. While this is the statement explicitly conjectured by Cramér, his heuristic actually supports the stronger statement
and sometimes this formulation is called Cramér's conjecture. However, this stronger version is not supported by more accurate heuristic models, which nevertheless support the first version of Cramér's conjecture. Neither form has yet been proven or disproven.
Cramér gave a conditional proof of the much weaker statement that
on the assumption of the Riemann hypothesis. The best known unconditional bound is
due to Baker, Harman, and Pintz.
In the other direction, E. Westzynthius proved in 1931 that prime gaps grow more than logarithmically. That is,
His result was improved by R. A. Rankin, who proved that
Paul Erdős conjectured that the left-hand side of the above formula is infinite, and this was proven in 2014 by Kevin Ford, Ben Green, Sergei Konyagin, and Terence Tao, and independently by James Maynard. The two sets of authors improved the result by a factor later that year.
Cramér's conjecture is based on a probabilistic model—essentially a heuristic—in which the probability that a number of size x is prime is 1/log x. This is known as the Cramér random model or Cramér model of the primes.
In the Cramér random model,
with probability one. However, as pointed out by Andrew Granville, Maier's theorem shows that the Cramér random model does not adequately describe the distribution of primes on short intervals, and a refinement of Cramér's model taking into account divisibility by small primes suggests that (), where is the Euler–Mascheroni constant.