The relative entropy of primes in arithmetic progressions is really small
Alex Cowan
TL;DR
The paper investigates whether primes in a fixed modulus $q$ behave like iid uniform residues in $(\mathbb{Z}/q\mathbb{Z})^\times$. It formalizes a KL-divergence based test using the empirical residue distribution $M_x$ and the random model $\mathrm{Unif}((\mathbb{Z}/q\mathbb{Z})^\times)$, defining $T_q = D_{\mathrm{KL}}(M_x \parallel \mathrm{Unif}((\mathbb{Z}/q\mathbb{Z})^\times))$ and $\tau_q = D_{\mathrm{KL}}(\pi(x;\cdot \bmod q) \parallel \mathrm{Unif}((\mathbb{Z}/q\mathbb{Z})^\times))$, and studying the percentile $\mathbb{P}(T_q<\tau_q)$. A central technical contribution is an explicit left-tail bound for the left tail of the KL divergence for multinomials via the method of types (Theorem 1), enabling rigorous control of aberrant small KL values. Empirically, for $x=10^8$ and various $q$, the relative entropies are markedly smaller than those of iid uniform samples, indicating strong interdependence among primes modulo $q$ beyond Chebyshev bias. The work bridges probabilistic information-theoretic tools with arithmetic statistics, highlighting a nonrandom structure in the distribution of primes in residue classes and motivating further theoretical exploration of the underlying correlations.
Abstract
Fix a modulus $q$. One would expect the number of primes in each invertible residue class mod $q$ to be multinomially distributed, i.e. for each $p \,\mathrm{mod}\, q$ to behave like an independent random variable uniform on $(\mathbb{Z}/q\mathbb{Z})^\times$. Using techniques from data science, we discover overwhelming evidence to the contrary: primes are much more uniformly distributed than iid uniform random variables. This phenomenon was previously unknown, and there is no clear theoretical explanation for it. To demonstrate that our test statistic of choice, the KL divergence, is indeed extreme, we prove new bounds for the left tail of the relative entropy of the uniform multinomial using the method of types.
