A unit circle is the set of points satisfying x² + y² = 1 — but the same parameters (radius = 1, circumference = 2π, rotation θ ∈ [0, 2π)) manifest in many different geometric shapes and coordinate systems. Think of it as the same mathematical object viewed through different lenses. The Farey modular residue rings visualized here are precisely one such lens: the classical circle becomes a discrete, modular shell system — and the structures below illuminate why this connection is so deep.
| Geometry / System | Shape of "Unit Circle" | Key Equation |
|---|---|---|
| Euclidean | Circle | x² + y² = 1 |
| Manhattan (L¹) | Diamond | |x| + |y| = 1 |
| Chebyshev (L∞) | Square | max(|x|,|y|) = 1 |
| Polygon limit | Regular n-gon → circle | n → ∞ |
| Complex / Fourier | Exponential rotation | z = eiθ |
| Topology (mod 1) | Wrapped number line | ℝ/ℤ |
| Lattice shells | Integer rings | x² + y² = r² |
| Modular residues | Discrete Farey rings | r/m ∈ Farey(N) |
Each rational r/m is placed on ring m at angle θ = 2πr/m, corresponding to the m-th roots of unity
These points form a regular m-gon on the unit circle. The full structure across all rings 1 ≤ m ≤ N is a modular lattice on concentric circles.
The multiplicative units modulo m are the residues coprime to m:
Their count is Euler’s totient φ(m). These are the Farey fractions — the blue points in the visualiser. They define the primitive angular directions not eliminated by the divisibility structure of m.
Each modulus generates a regular polygon. The primorial sequence eliminates composite directions one prime at a time:
What remains after each step are exactly the angular rays where primes can occur. Use the hierarchy navigator below to walk through each level interactively.
All primes greater than p must lie on the unit-group rays of the primorial modulus M = 2·3·…·p:
For M=30 this gives 8 rays; for M=210, 48 rays. The gap overlay marks which pairs carry twin primes (gap=2), cousin primes (gap=4), or sexy primes (gap=6).
Twin prime candidates (p, p+2) correspond to residue pairs (r, r+2) both coprime to M. Their angular separation on ring m is:
As M grows through primorial extensions, admissible twin-prime ray pairs lift to the refined lattice. The candidate directions are preserved through sieve refinement — visible as parallel chord pairs in the gap overlay.
By the Franel–Landau theorem, the Riemann Hypothesis is equivalent to the Farey discrepancy satisfying:
The near-uniform angular distribution visible at finite N is consistent with RH. It is not a proof — only a geometric shadow of the analytic statement.
The proportion of primitive residues mod m decays to zero by the Euler product:
The lattice refines as m grows while allowed directions simultaneously thin — a precise quantification of prime sparsity. Averaged over all m ≤ N this density converges to 6/π² = 1/ζ(2). The hierarchy navigator tracks φ(N)/N live.
The ring structure is the discrete skeleton of a Laurent series. For a rational function with poles at coprime prime residues r₁,r₂,… mod N, the complex plane splits into annular convergence regions — one per gap between consecutive pole radii.
gcd(r,m)=1 points are independent Laurent terms: irreducible partial fractions that generate new series coefficients. gcd(r,m)>1 points are reducible — they collapse to lower-denominator rings, contributing no new terms, exactly as reducible fractions cancel in partial fraction decomposition. The 6/π² coprime density is therefore also the fraction of independent Laurent basis elements across all rings.
The N-body panel uses these same rₖ as orbit positions — bodies in the annular band between poles. Use the explorer below to see the decomposition live as you change N.
The exact prime counting function is given by the explicit formula, where each nontrivial zero ρ = ½ + iγn of ζ(s) contributes one oscillatory correction:
Each conjugate pair ρ, ρ¯ produces a real cosine wave of frequency γn log x. Your Farey discrepancy DN measures whether these oscillations stay bounded — the Franel–Landau equivalence to RH. The N-body panel places bodies at the residue positions rk = pk mod N, which are the discrete analog of the xρ phase evaluations. Each conjugate zero pair (γn, −γn) mirrors the (r, N−r) mirror involution on your coprime ring.