Look at the first few primes: 2, 3, 5, 7, 11, and 13. Notice
they have irregular gaps between them: 2 is followed immediately by
the prime 3, 3 is followed by one composite, 5 by one, but 7 by three.
We call the number of composites following a prime the length of
the prime gap. For example, the prime gaps after 2, 3, 5 and
seven are 0, 1, 1 and 3 respectively. By the prime number theorem, the
"average gap" between primes less than n is log(n). See
the page on prime gaps (linked below) for much more information.
Warning: Some authors define the prime gap to be the difference between consecutive primes, this is a number one larger than our definition.
Related pages (outside of this work)