TOPICS
Search

Average Prime Gap


The average of the prime gaps up to the nth prime number p_n is the arithmetic mean of the first n-1 prime gaps, so

 g^__n=1/(n-1)sum_(k=1)^(n-1)(p_(k+1)-p_k)=(p_n-2)/(n-1).
(1)

Here, the bar denotes the average. The equality on the right follows because the sum is a telescoping sum. Each interior prime cancels, leaving p_n-p_1=p_n-2. The prime number theorem, in the equivalent form p_n∼nlnn, therefore gives

 g^__n∼lnp_n.
(2)

Thus the average gap grows without bound. Individual gaps fluctuate substantially around this scale. In particular, Goldston et al. (2009) proved that the limit inferior

 liminf_(n->infty)(p_(n+1)-p_n)/(lnp_n)=0,
(3)

and the stronger result on bounded gaps between primes gives infinitely many gaps no larger than 246 (Polymath 2014). Neither result says that the average prime gap is bounded.


See also

Bounded Gaps Between Primes, Prime Gaps, Prime Number Theorem

Explore with Wolfram|Alpha

References

Goldston, D. A.; Pintz, J.; and Yildirim, C. Y. "Primes in Tuples I." Ann. Math. 170, 819-862, 2009. https://doi.org/10.4007/annals.2009.170.819.Polymath, D. H. J. "Variants of the Selberg Sieve, and Bounded Intervals Containing Many Primes." Res. Math. Sci. 1, Article 12, 2014. https://doi.org/10.1186/s40687-014-0012-7.Veritasium. "We're 99.9% Sure This Pattern Is True, but No One Can Prove It." Jun. 14, 2026. https://www.youtube.com/watch?v=8HBDE-msUjw.

Cite this as:

Weisstein, Eric W. "Average Prime Gap." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/AveragePrimeGap.html

Subject classifications