[Math] Remainders of primes

prime numbers

Maybe an idiot question but I can't find any info!
We divide successive prime numbers by some fixed prime number $n$ (e.g. 7 or 17).
We'll get some remainders $r[i]= 1..n-1$
Is there any law or theorem about their distribution?
It seems Fermat's Little theorem and Chinese remainder theorem don't work..
I've tried it in Mathematica and it seems remainders are chaotic. But "Poincaré 3D view" $\{ r[i],r[i-1],r[i-2]\}$ shows some lines and nets.

UPD Thanks to everybody, esp. TonyK! It seems the answer is:

Let $\mathbb{P}(d)$ – probabilty for distance between successive primes to be $d$.
(It depends on value of "first" number and known only numerically). If some prime number $p_1$
has reminder $r_1$ when divided by $n$, than probability for the next prime $p_2$
to have reminder $r_2$ is: $$\sum_{k=0}^{\infty} \mathbb{P}(r_2-r_1+k \cdot n)$$

Best Answer

The Wikipedia article Dirichlet's theorem on arithmetic progressions answers your question:

...different arithmetic progressions with the same modulus have approximately the same proportions of primes. Equivalently, the primes are evenly distributed (asymptotically) among each congruence class modulo d.

In other words, for any $k$ with $0 < k < n$, the proportion of integers $i$ such that $r[i] = k$ is equal to $1/(n-1)$ (since $n$ is prime).

More formally: Given an integer $N > 0$, let $p_N(k)$ be the proportion of integers $i$ with $0 < i \le N$ such that $r[i] = k$. Then $p_N(k)$ tends to $1/(n-1)$ as $N$ tends to $\infty$.

It is possible to make a more precise statement concerning the rate of convergence of $p_N(k)$, but I don't expect that any more concrete result is possible.

Related Question