Numerical experiments show the distribution of prime gaps conforms to some quite firm constraints.

The following plot visualises these constraints - it shows the log of the count of prime gaps against gaps.

Question: I can't find much information on how this distribution is explained by properties of primes. Is this because it is genuinely an area of mathematics that hasn't been explored, or yielded results?

I have looked through many of the standard texts (Stopple, Edwards, Apostol, Derbyshire,...) and done internet searches for university course content (indicating the study of prime gaps is well established) - but I have found very little, or nothing. The content I can find is a few blogs or YouTube videos which touch on this question but don't explain it.

I am not university trained in mathematics so I may be unaware of the state of the art, so apologies if the answer is (1) obvious, or (2) well known as an open question in mathematics.

Note: Is this question more difficult because it is essentially about the additive properties of primes rather than the multiplicative properties.

enter image description here

  • 1
    $\begingroup$ See Wikipedia. Summary: much is conjectured, not much is proven. $\endgroup$ Commented Apr 15, 2021 at 22:10

1 Answer 1


(As usual for open problems about primes) the first answer is the random model for the primes.

The simplest model for the gap $g(n)=p_{n+1}-p_n$ is that it follows approximately an exponential distribution of parameter $1-\frac2{\log n}$, following from that the probability that $p_n+2j$ is not prime is about $1-\frac2{\log (p_n+2j)}\approx 1-\frac2{\log n}$ so that

$$Pr(g(n)=2k)\approx (1-\frac2{\log n})^{k-1} \frac2{\log n}$$ And thus your curve is not surprising at all:

when looking at the gaps for $n\le N$ then most $\log n$ are $\approx \log N$ so you expect about $(1-\frac2{\log N})^{k-1} \frac{2N}{\log N} $ gaps of size $2k$ ie. a $\log$ proportion $\approx (k-1) \log (1-\frac2{\log N})-\log\log N$

  • $\begingroup$ hi @reuns could you explain why the probably that $p_n + 2j$ is not prime is approx $1-\frac{2}{\log (p_n+2j)}$, and what is the relationship between $j$ and $n$. thanks $\endgroup$
    – Penelope
    Commented Apr 15, 2021 at 23:47
  • $\begingroup$ The PNT says that $\pi(x)\sim \sum_{2n\le x} \frac{2}{\log n}$, the random model for the primes says that $2n$ is prime with a probability $2/\log n$ and that those "random variables" are (approximatively) independent for different $n$. This is just a model, not the truth, but it gives surprising good predictions in a lot of different settings. $\endgroup$
    – reuns
    Commented Apr 15, 2021 at 23:59
  • $\begingroup$ Hi @reuns - I am almost there but not quite. The probability $n$ is prime is $1/\log(n)$ from the approx observation of prime density, and reflected in the PNT. How do we go from this to $2/\log(n)$ ? $\endgroup$
    – Penelope
    Commented Apr 16, 2021 at 0:14
  • $\begingroup$ Just discarding the even numbers, because the prime gaps are even. $\endgroup$
    – reuns
    Commented Apr 16, 2021 at 0:24
  • 1
    $\begingroup$ The probability that $n$ is prime is $1/\log n$, the probability that $n$ is prime knowing that it is even is $0$, the probability knowing that it is odd is $2/\log n$, that's the model. $\endgroup$
    – reuns
    Commented Apr 16, 2021 at 0:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .