An interesting video on the gaps between consecutive primes:
What grabbed my attention most was what Conway dubbed Jumping Champions: the gap size or sizes which are most common among primes under some upper limit n. For the first few primes the most common gap size is 2, but then 4 starts to become as common or more common for a little while, and then above n = 179, 6 starts to be a contender; for n above 947, 6 is the undisputed jumping champion — up until about n = 1.74×1035, after which 30 is the new champion. Until 210 is, around n = 6.4×10425.
The way I like to think about it is this:
Consider six consecutive numbers starting with a multiple of 6: 6m, 6m+1, 6m+2, 6m+3, 6m+4, and 6m+5. Of these 6m, 6m+2, and 6m+4 are even, so cannot be prime, and 6m and 6m+3 are multiples of 3, so cannot be prime. Then the only ones that could be prime are the second and the sixth, 6m+1 and 6m+5. (We’re just doing the first two steps of the Sieve of Eratosthanes here, and using six consecutive numbers because 6=2×3.) Of course the next six numbers start with the next multiple of 6, so the second and sixth of them are also prime candidates, and so on. What this means is that for x to be a prime number (higher than 3), x must equal 1 or 5 modulo 6.
What you can see is that for two numbers to be primes differing by 2 (twin primes), the lower one must equal 5 modulo 6. For them to be primes differing by 4 (cousin primes), the lower one must equal 1 modulo 6. But to be primes differing by 6 (sexy primes), the lower one can equal either 1 or 5 modulo 6.
From that you’d expect, for a large enough upper bound, the number of twin and cousin primes should be about equal and the number of sexy primes should be about double that. And that’s true. For numbers up to 10000, there are 205 pairs of twin primes, 203 cousin prime pairs, and 411 sexy prime pairs.
Now, for the gap between two consecutive primes to be 2, the first must equal 5 modulo 6, and for it to be 4, the first must be 1 modulo 6, but for it to be 6, the first must be either 1 or 5 modulo 6, and there must not be another prime 2 or 4 above it. For numbers below a few hundred, if you have two primes differing by 6, there’s a good chance there’s another prime between them, so you don’t have that many gaps of 6 between consecutive primes. But as you go to larger and larger numbers, the density of primes drops until you get to a point where primes separated by 6 are unlikely to have a prime between them. Once that happens, the larger number of sexy prime pairs means gaps of 6 become more common than gaps of 2 or 4, so 6 becomes the jumping champion.
But you can play the same game with three steps of the Sieve. Look at 30m, 30m+1, 30m+2 … 30m+29, knock out the multiples of 2, 3 and 5 (we’re using 30 numbers because 2×3×5=30), and you’re left with eight prime candidates — equal to 1, 7, 11, 13, 17, 19, 23, or 29 modulo 30. Of those you find six with another prime candidate 6 higher, six with a prime candidate 12 higher, six again with 18 higher and six with 24 higher. But all eight have prime candidates 30 higher. (There seems to be no cute name for pairs of primes differing by 30.)
So, similarly to the above, you’d expect prime pairs differing by 30 to outnumber pairs differing by 6, 12, 18, or 24, by about a factor of 8/6 = 1.33 and again, that’s right: for numbers up to 10000, there are 411 primes differing by 6, 404 differing by 12, 417 differing by 18, 404 differing by 24, and 536 differing by 30 — just about exactly 1.33 times larger. And for small upper bounds the likelihood of two primes differing by 30 to have no primes between them is small, but for larger and larger numbers the density of primes drops and eventually most primes differing by 30 do not have any primes in between. And then 30 becomes the jumping champion. Unfortunately not until about 1.74×1035, though, and enumerating all primes to that point and verifying 30’s championship would be just a little infeasible.
Or a lot, really.
And then 210=2×3×5×7 takes over, by similar reasoning, but very much further up the number line. And so on and on.