# E077: Indicator via character orthogonality (sanity check). ```{figure} ../_static/experiments/e077_hero.png :width: 80% :alt: Preview figure for E077 ``` **Tags:** `number-theory`, `quantitative-exploration`, `visualization`, `dirichlet-characters` ## Highlights - Uses character orthogonality to reconstruct residue indicators. - Measures reconstruction error / maximal partial sums across characters. - Explores how primitive characters vary with the modulus. ## What this experiment does A standard identity expresses an indicator of a residue class using Dirichlet characters. For gcd(a,q)=1 and gcd(n,q)=1: 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/e077/`: - `figures/fig_01_indicator_error.png` ## How to run ```bash make run EXP=e077 ``` ## 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/e077.md :start-after: "" :end-before: "" ``` ::: {dropdown} params.json (snapshot) :open: ```{literalinclude} ../params/e077.json :language: json ``` ::: ## References {cite:t}`davenport2000multiplicativenumbertheory, nivenzuckermanmontgomery1991introductiontheorynumbers` ## Related experiments - {doc}`e064` (Dirichlet character tables (phase view).) - {doc}`e065` (Orthogonality matrix for Dirichlet characters.) - {doc}`e066` (Character partial sums: cancellation profiles.) - {doc}`e122` (E122: Character averages over primes) - {doc}`e106` (E106: Character gallery: real vs. complex)