Opener Explorer Deep Analysis Geometric Canvas ζ(2) GCD Lift Paper K Constant Spectral D_χ Explorer
C ≈ 0.530711806246
Compute up to M
1,000
MAX
M computed
Σφ(m) / Σm
6/π² target
0.6079271019
Er(N) error
|Er|·N
Total coprime
Total non-coprime
cop / noncop ratio
Sign changes
OLS slope log|Er|
Convergence to 6/π²
Chart 01 Σφ(m) / Σm converging to 6/π² — prime spikes & primorial dips Running coprime fraction across all M from 1 to N. Primes (gold ticks) push the ratio upward — φ(p)/p = (p−1)/p is always above the current ratio at large p. Primorials (coral markers) are structural local minima: φ(p#)/p# = ∏(1−1/p) decreases with each new prime factor by Mertens’ third theorem. The dashed line is 6/π².
Chart 02 φ(M)/M per integer — primes cluster near 1, primorials near 0 Raw coprimality density for each M. Primes (gold): φ(p)/p = (p−1)/p → 1. Primorials (coral): φ(p#)/p# = ∏(1−1/p) → 0 by Mertens. The horizontal line at 6/π² is the long-run average. Everything above the line pushes Er upward; everything below pulls it down. The step direction is provably determined by whether this value exceeds the current running ratio.
Error term Er(N) = Σφ/ΣM − 6/π²
Chart 03 Er(N) signed — prime upward spikes, primorial downward pulls Signed deviation from 6/π². At every prime p (gold ticks): Er moves upward because φ(p)/p = (p−1)/p > current ratio — this is a provable exact rule with zero exceptions verified to N = 100,000. At primorials (coral dots): the ratio dips to a local minimum. Sign changes (small teal dots) are dense — the ratio oscillates above and below 6/π² constantly.
Chart 04 |Er(N)| · N — decay faster than O(1/N) If Er(N) were exactly O(1/N), this product would be bounded. It is — but it also fluctuates. The unconditional bound is O((log N)2/3/N) by Walfisz (1963) on the summatory totient; under RH the bound improves to O(N−3/2+ε), making |Er|·N → 0. The teal envelope shows (log N)2/3 for comparison.
Chart 05 log|Er(N)| vs log N — decay rate diagnostic Log-log convergence rate. Slope = −1: O(1/N). Slope = −3/2: RH conditional bound O(N−3/2). The empirical OLS slope (teal) sits near −1 but the R² is low — dense oscillation dominates the fit. This is expected: the error oscillates at nearly every step, making the log-log slope a rough guide, not a precise measurement.
GCD distribution & Mertens structure
Chart 06 GCD distribution — P(gcd = g) → 6/(π²g²) = 1/(ζ(2)g²) For each GCD value g, the fraction of pairs (r, M) with gcd(r, M) = g converges to 6/(π²g²). This is a complete decomposition of the coprime density: the non-coprime residues split by GCD value following the zeta function. The gold bars are the empirical fractions; the teal line is the theoretical 6/(π²g²). The g=1 bar is 6/π² — the main convergence target.
Chart 07 Primorial coprimality density φ(p#)/p# → 0 — Mertens’ third theorem At each primorial p# = 2·3·5·…·p, the coprime density φ(p#)/p# = ∏q≤p(1−1/q). By Mertens’ third theorem, this product ≈ e−γ/log(p) where γ ≈ 0.5772 is the Euler–Mascheroni constant. It approaches 0 as p → ∞, making primorials the densest cluster of non-coprime residues at any scale — the structural reason they are local minima of the running ratio.
Chart 08 Er(N) vs E(N) — structural anti-correlation at every prime At every prime p: Er(N) moves UP (because φ(p)/p > current ratio) and E(N) = R(N)−C moves DOWN (because φ(p+1)/(p+1) ≤ 1/2 < C suppresses the lift term). This is exact — zero exceptions to N = 100,000. Pearson correlation r ≈ −0.93. They do not converge to a constant ratio — they oscillate in opposite directions at primes and drift independently at composites.
Analytic structure & open questions
Theorem — Convergence (classical, Euler/Dirichlet)
Σm=1N φ(m) / Σm=1N m  →  6/π² = 1/ζ(2) = ∏p(1 − 1/p²)    as N → ∞
Why. By Mertens’ summatory totient theorem: Σφ(m) ~ 3N²/π². And Σm = N(N+1)/2 ~ N²/2. So the ratio ~ (3N²/π²) / (N²/2) = 6/π². The error term Er(N) ~ 2δ(N)/N² where δ(N) = Σφ(m) − 3N²/π².
Theorem — Exact step formula (provable, verified to N = 100,000)
Er increases at step M  ⇔  φ(M)/M > current ratio  ⇔  φ(M)/M > Σφ/Σm
Proof. After adding M: new ratio = (Σφ + φ(M)) / (Σm + M). This exceeds the old ratio iff (Σφ + φ(M))·Σm > Σφ·(Σm + M), i.e. φ(M)·Σm > Σφ·M, i.e. φ(M)/M > Σφ/Σm.  □

At prime p: φ(p)/p = (p−1)/p. Once the running ratio is below (p−1)/p (which it is for all but the smallest primes), every prime pushes Er upward. This is why 9,590 out of 9,592 primes to N = 100,000 increase the ratio — the two exceptions are p = 2 and p = 3 where the ratio starts above (p−1)/p.
Theorem — Primorial minima via Mertens’ third theorem
φ(p#)/p# = ∏q≤p(1 − 1/q) ≈ e−γ / log(p) → 0
Why primorials are local minima. At M = p# (primorial), φ(M)/M takes its minimum value among all integers with the same number of prime factors. Each new prime q multiplies M by q and multiplies φ(M)/M by (1−1/q) < 1. Mertens’ third theorem says the product ∏(1−1/p) over primes up to x behaves like e−γ/log(x) as x → ∞, where γ ≈ 0.5772 is the Euler–Mascheroni constant. So φ(p#)/p# → 0, and every primorial creates a downward spike in the running ratio — a structural local minimum.
Theorem — GCD distribution (classical)
P(gcd(r, M) = g)  →  6/(π² g²) = 1/(ζ(2) g²)    as M → ∞
The full non-coprime structure is encoded in ζ(2): the fraction of pairs (r, M) with gcd = g converges to 6/(π²g²). Summing over all g gives Σ 6/(π²g²) = (6/π²)·ζ(2) = 1, as required. The g = 1 term is the coprime density 6/π² itself. Chart 06 shows this decomposition live.
Decay rate — known bounds, open question
Er(N) = O((log N)2/3 / N)   unconditional (Walfisz 1963)
Er(N) = O(N−3/2+ε)   conditional on RH
Structure. Er(N) ~ 2δ(N)/N² where δ(N) = Σφ(m) − 3N²/π². Walfisz (1963) proved δ(N) = O(N·(log N)2/3·(log log N)1/3), giving Er(N) = O((log N)2/3/N) unconditionally. Under RH, δ(N) = O(N1/2+ε), giving Er(N) = O(N−3/2+ε) — much faster than O(1/N).

Empirically. |Er|·N oscillates between 0.007 and 0.719 across windows of 10,000 steps — consistent with O((log N)2/3/N) but not settling to a clean limit. The OLS slope on log|Er| vs log N sits near −1 with R² ≈ 0.02 in the second half — the oscillation dominates the fit. Bounded |Er|·N is the stronger empirical evidence than any slope estimate.

Open question. The exact constant in the Walfisz bound is not known. Whether the empirical oscillation envelope can be sharpened analytically connects directly to the distribution of zeros of ζ(s).