Prime number races refresher¶
A prime number race compares prime counts in different residue classes, e.g.
Although \(\pi(x;q,a)\sim \mathrm{Li}(x)/\varphi(q)\) suggests “no winner,” finite ranges often show persistent preferences (biases).
How this repository measures a race (Phase 2 convention). For each reduced residue class \(a\) (with \(\gcd(a,q)=1\)) we compare \(\pi(x;q,a)\) to the baseline \(\mathrm{li}(x)/\varphi(q)\) and define the error term
The classic example: Chebyshev’s bias mod 4¶
Empirically, for many ranges of \(x\) one observes
Rubinstein–Sarnak analyze this phenomenon through the lens of \(L\)-function zeros and propose models for the distribution of race leaders.
Practical notes for experiments¶
Bias claims depend on how you sample \(x\) (linear vs log-grid); be explicit.
With small cutoffs (say \(x\le 10^7\)), you’ll see “apparent stability” that may later flip; that’s expected.
Counting primes is the bottleneck; keep an eye on runtime and memory, and record parameters in your manifest.
References¶
See References.
Experiments in this repository¶
E112 — Prime race curves \(\pi(x;q,a) - \pi(x;q,b)\): sign changes and time-in-lead.