Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Out of the 78499 prime number under 1 million. There are 32821 prime gaps (difference between two consecutive prime numbers) of a multiple 6. A bar chart of differences and frequency of occurrence shows a local maximum at each multiple of 6. Why is 6 so special?

enter image description here

share|improve this question
On the question editor there is a picturesque icon; if you hover over it it should say something like "add picture." Click it and the rest is easy. –  anon Feb 6 '12 at 19:53
@anon Thanks very much for that. –  Hardy Feb 6 '12 at 20:04

5 Answers 5

up vote 8 down vote accepted

To provide a different perspective on Vhailor's answer: note that if $p$ is a prime $\gt 3$, then $p+6k$ is guaranteed not to be divisible by $2$ or $3$ for any $k$; in effect these gaps are 'pre-sieved' to weed out possible multiples of $2$ and $3$ that could keep the number at the other end from being prime. If you expanded your chart out further you would see similar spikes at the multiples of $30$, since those numbers are also 'pre-sieved' for $5$. (In fact, if you were to expand your table out to all the prims less than $2\times 10^{35}$, you would find the total number of gaps of length $30$ to be more than the number of gaps of length $6$ - see http://mac6.ma.psu.edu/primes/ for the details!)

share|improve this answer

All prime numbers except 2 and 3 are of the form $6k±1$, so whenever you fall on a pair $6k+1$, $6l+1$ their difference will be a multiple of $6$, same goes for a pair $6k-1$,$6l-1$.


share|improve this answer

Here is a recent paper on how the prime numbers are a perfect example of harmonic acceleration between two poles, where the multiples of 6 (6z, acceleration) is the second derivative of z^3. http://www.wseas.us/e-library/conferences/2012/CambridgeUSA/MATHCC/MATHCC-05.pdf

Yes, I am the author.

share|improve this answer
Thanks buddy i 'll try go through the paper –  Hardy Mar 7 '12 at 20:44

Excepting the first two gaps, all prime gaps are between numbers that are either $1$ or $5$ modulo $6$. Under the assumption that both cases are equally likely, half the prime gaps will be between numbers in the same class, and therefore of size $0$ modulo $6$, and the other half will be between numbers in different classes, which split up into sizes that are $2$ and $4$ modulo $6$. Since each of the latter cases only gets one quarter of the total, it is clear that ignoring all other factors, gaps that are $2$ or $4$ modulo $6$ are about half as likely to occur as gaps of the same approximate magnitude that are $0$ modulo $6$. You can check this in your chart. (Particular gap sizes are also subject to influences of other primes than $2$ or $3$, which explains some other irregularities one can observe.)

share|improve this answer

6 is "special" because it is 3# (primorial, products of the first n primes) = 2*3. The first primorial is 2, and generates all even and odd numbers through 2x + (0,1). The second primorial, 6, generates all primes greater than 3 through 6x + (1,5). Disclaimer: this formula also generates composites.

The third primorial generates all primes greater than 5 with 30x + (1,7,11,13,17,19,23,29)... And so on

The high concentration of prime distances equal to six has more to do with the rarity of "new composites" eliminated by large prime seives. 997, the largest prime sieve to establish all primes under a million, only removes 1 composite under a million. As you get further from 0, the prime patterns are largely preserved. This has led to the twin prime and k-tuple conjectures, among others.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.