# E074: Prime race mod 8: leaderboard among 1,3,5,7. ```{figure} ../_static/experiments/e074_hero.png :width: 80% :alt: Preview figure for E074 ``` ```{figure} ../_static/experiments/e074_hero_2.png :width: 80% :alt: Preview figure for E074 ``` **Tags:** `number-theory`, `quantitative-exploration`, `visualization`, `prime-races`, `aps` ## Highlights - Computes prime-race differences π(x;q,a) − π(x;q,b) on a grid of x values. - Visualizes lead changes and the size of fluctuations as x grows. - Adds a derived statistic (normalization / θ-variant) to compare behaviors. ## What this experiment does This experiment tracks four residue classes modulo 8: The implementation focuses on a compact, reproducible numerical workflow: deterministic parameter defaults, structured output folders, and one or more figures saved for the gallery. ## Outputs This experiment writes into `out/e074/`: - `figures/fig_01_leader_fractions.png` - `figures/fig_02_counts_minus_mean.png` ## How to run ```bash make run EXP=e074 ``` ## Notes - The gallery preview figure shipped with the documentation uses conservative cutoffs so builds stay fast. If you run the experiment locally, increase the cutoffs to see the asymptotic regime more clearly. - Prime-race plots depend on the chosen sampling of `x` (linear vs. log grid). The qualitative “who leads” picture can change when you zoom in. ## Published run snapshot If this experiment is included in the docs gallery, include the published snapshot (report + params). ```{include} ../reports/e074.md :start-after: "" :end-before: "" ``` ::: {dropdown} params.json (snapshot) :open: ```{literalinclude} ../params/e074.json :language: json ``` ::: ## References {cite:t}`granvillemartin2006primenumberraces, rubinsteinsarnak1994chebyshevsbias` ## Related experiments - {doc}`e072` (Prime race mod 4: pi(x;4,3) vs. pi(x;4,1).) - {doc}`e073` (Prime race mod 3: pi(x;3,2) vs. pi(x;3,1).) - {doc}`e075` (Prime race statistic: distribution on a log-grid.) - {doc}`e112` (E112: Prime race: π(x;q,a) − π(x;q,b)) - {doc}`e081` (Prime race sign changes: first crossings table.)