The picture, plainly
"Coprime" just means sharing no common factor — gcd(a,b)=1. Two random integers are coprime about 61% of the time (that famous 6/π² ≈ 0.6079 constant). That's the n = 0 case: one number, one comparison.
Now make it harder. Instead of asking whether r is coprime to a single number M, ask whether it's coprime to the whole block M, M+1, M+2, …, M+n — all n+1 of them, simultaneously. Every extra integer in the block is one more way for r to fail. The density has to drop. C(n) (in its raw form D(n), see below) is exactly that shrinking probability, tracked for every block length.
See it happen
Below is a live r × M lattice, defaulting to the Ring layout used throughout the rest of the site (switch to Grid any time). A point lights up when r is coprime to every integer in the block {M, …, M+n}. Drag n — top bar, panel slider, or Play — and watch the pattern thin out, while the measured density locks onto the formula's prediction.
Building the formula, piece by piece
The whole thing is an Euler product — one independent factor per prime, multiplied together. The trick is that a block of n+1 consecutive integers interacts with small primes very differently than with large ones.
Worked example — n = 1 (block length 2)
Take the smallest nontrivial case: is r coprime to both M and M+1? Block length is 2, so the saturation cutoff is p ≤ 2 — only p = 2 is saturated.
Reading the live table
Move the n slider at the top of the page and watch this table update — it's the same split you just walked through, computed live.
| quantity | value |
|---|
Full working — every prime, nothing left out
The table above summarizes; this one shows the entire Euler product prime by prime, exactly the way it's actually computed — toggle between decimal and exact fraction, click any row to see the substitution worked out, and watch the running product converge on C(n).
▸ Show full working prime-by-prime Euler product · decimal or fraction
Why does the pattern repeat?
A reader on the original post asked about a self‑similar, repeating pattern that seemed to "scale at some frequency" in the lattice views. It's not connected to the zeta function's zeros or anything spherical — it's much more down‑to‑earth, and it falls straight out of the sieve structure above.
Whether a cell (r, M) lights up depends only on r and M modulo small primes — divisibility by 2 repeats every 2 integers, by 3 every 3, by 5 every 5, and so on. Once you've accounted for every saturated prime up to n+1, the whole coprimality pattern repeats exactly with period 2·3·5·7·… — the primorial of those primes. That's the "unknown frequency": it isn't unknown at all, it's the product of the small primes below the block length, and it grows combinatorially (2, 6, 30, 210, 2310, …) rather than smoothly, which is exactly what makes the self‑similarity look like it's "scaling" as you zoom — each new saturated prime multiplies the repeat period by that prime. This is the same mechanism behind the classic Sieve of Eratosthenes visualizations and Stern–Brocot / Farey self‑similarity elsewhere on this site (Page 1's Farey and Ford‑circle views included).