I have recently noticed an unusual pattern in the distribution of odd primes.
Each one of the following sets contains approximately half of all odd primes:
- $A_n=\{4k+1: 0\leq k\leq n\}=\{1,5,9,13,\dots,4n+1\}$
- $B_n=\{4k+3: 0\leq k\leq n\}=\{3,7,11,15,\dots,4n+3\}$
- $C_n=\{6k+1: 0\leq k\leq n\}=\{1,7,13,19,\dots,6n+1\}$
- $D_n=\{6k+5: 0\leq k\leq n\}=\{5,11,17,23,\dots,6n+5\}$
More precisely:
- Let $P(S)$ denote the number of odd primes in the set $S$
- Let $\pi(x)$ denote the number of odd primes smaller than $x$
Then for every sufficiently large value of $n$:
- ${P(A_n)}\approx{P(B_n)}\approx\frac12\pi(4n+4)$
- ${P(C_n)}\approx{P(D_n)}\approx\frac12\pi(6n+6)$
Now, all of this is pretty easy to observe (though probably not so easy to prove).
The following facts are subsequently obvious for every sufficiently large $n$ as well:
- ${P(A_n)}\leq{P(B_n)}\implies{P(A_n)}\leq\frac12\pi(4n+4)\leq{P(B_n)}$
- ${P(A_n)}\geq{P(B_n)}\implies{P(A_n)}\geq\frac12\pi(4n+4)\geq{P(B_n)}$
- ${P(C_n)}\leq{P(D_n)}\implies{P(C_n)}\leq\frac12\pi(6n+6)\leq{P(D_n)}$
- ${P(C_n)}\geq{P(D_n)}\implies{P(C_n)}\geq\frac12\pi(6n+6)\geq{P(D_n)}$
This is because $A_n$ and $B_n$ as well as $C_n$ and $D_n$ are "complementary" to each other:
- The set ${A_n}\cap{B_n}$ is empty, and the set ${A_n}\cup{B_n}$ contains all odd primes smaller than $4n+4$
- The set ${C_n}\cap{D_n}$ is empty, and the set ${C_n}\cup{D_n}$ contains all odd primes smaller than $6n+6$
Nevertheless, for almost every value of $n$:
- ${P(A_n)}\leq{P(B_n)}$
- ${P(C_n)}\leq{P(D_n)}$
The graphs and table below provide some empirical evidence:

range | odd primes | cases where either P(A)>P(B) or P(C)>P(D)
-----------|------------|-------------------------------------------
10000 | 1228 | 0
100000 | 9591 | 1
1000000 | 78497 | 239
10000000 | 664578 | 239
100000000 | 5761454 | 1940
I would expect primes to be equally distributed between $A_n$ and $B_n$ and between $C_n$ and $D_n$.
In other words, I would expect:
- [Number of primes of the form $4k+1$] $\approx$ [Number of primes of the form $4k+3$]
- [Number of primes of the form $6k+1$] $\approx$ [Number of primes of the form $6k+5$]
But since the empirical evidence above suggests otherwise, my questions are:
- Is this indeed the case, or do they become equally distributed on a larger range?
- If this is indeed the case, what research has been conducted attempting to explain it?
Thanks