# Uniformity of the distribution of the prime numbers on the prime residue classes (mod $m$)

Given positive integers $m$, $r$ and $n$, let $\pi(m,r,n)$ denote the number of prime numbers $p \leq n$ in the residue class $r$ (mod $m$). Further let $1 = r_1 < r_2 < \dots < r_{\varphi(m)} = m-1$ be the prime residues (mod $m$), and let $\sigma \in {\rm Sym}(\{r_1, \dots, r_{\varphi(m)}\})$ be a permutation of them. Are there always infinitely many $n \in \mathbb{N}$ such that $\pi(m,\sigma(r_1),n) < \pi(m,\sigma(r_2),n) < \dots < \pi(m,\sigma(r_{\varphi(m)}),n)$?

If the answer is yes, are explicit bounds $B(m)$ known such that for every permutation $\sigma$ of the prime residues (mod $m$) there is at least one such $n$ less than $B(m)$?

If the answer is no, for which permutations $\sigma$ are there infinitely many such $n$, and for which are not?

• There is a nice survey paper related to your question here by Granville and Martin: arxiv.org/pdf/math.NT/0408319.pdf See especially the discussion of work by Rubinstein and Sarnak (1994) beginning on p. 24 and, if I am understanding your question correctly, the remarks (under suitable assumptions) at the top of p. 26, as well as the discussion thereafter. – Benjamin Dickman May 25 '14 at 13:03