Six and Prime Number Statistics
One of the curious places the number 6 turns up is in the distribution of Prime Numbers. The Prime Number Theorem states that the quantity of primes found in n integers is approximately
n/(ln n)To see how the Primes are distributed, one can create a histogram of the distance between Primes
The most frequently occuring gap is, of course, 6! Not only that, but the peaks in the distribution (the red bars) are all multiples of 6!
Here is the same data plotted on a logarithmic scale. The bars at the high end are a little more eratic, but that will change as the sample population increases. This database contains only the Primes up to 1,000,000 (79,498 Primes). If we increased the database to the point where we had about 100,000 6-gaps, we could predict that the maximum gap would be 12 bars to the right or approximately 130 (note the actual max in this data set, 114, is higher than the 102 predicted by the slope of the line connecting the peaks). Anybody have a million prime database they can lend me?
Back to The Joy of Six