Pairwise Coprimality in the Menger Sponge

Pairwise Coprimality in the Menger Sponge

Carlo Mitchener

First published 2026-08-23, revised 2026-09-03

PDF · TeX

Cut a cube into twenty-seven, throw away the seven that touch the middle, repeat forever: that is the Menger sponge, and reading a surviving subcube's address in base three turns it into a triple of whole numbers. Ask an arithmetic question about that geometry - how often do the three coordinates share no prime factor, pairwise? On the full lattice the answer is a classical constant. On the sponge it is a different one, and the whole difference lives at the single prime 3: drilling the holes costs the coordinates exactly 12.25 percent of their odds.

The twenty-seven digit vectors in three slices: seven crossed out by the sponge, thirteen of the twenty survivors dark because they keep the prime three away from every coordinate pair.
The twenty-seven digit vectors in three slices: seven crossed out by the sponge, thirteen of the twenty survivors dark because they keep the prime three away from every coordinate pair.

A level-LL sponge point is a triple whose LL base-three digit vectors (a,b,c)(a,b,c) each have at most one entry equal to 11; there are 20L20^L of them, and PLP_L is the fraction whose coordinates are pairwise coprime, with the convention gcd(0,n)=n\gcd(0,n) = n.

Theorem. limLPL=1320p3(13p2+2p3)=351400C3=0.251620868451255\lim_{L\to\infty} P_L = \frac{13}{20}\prod_{p\neq 3}\left(1-\frac{3}{p^2}+\frac{2}{p^3}\right) = \frac{351}{400}\,C_3 = 0.251620868451255\ldots, where C3=0.286747428434479C_3 = 0.286747428434479\ldots is the classical three-integer pairwise-coprimality constant.

Every prime but 3 behaves exactly as it does on the full lattice; at 3 the lattice factor 20/2720/27 is replaced by 13/2013/20, because a coordinate is divisible by 3 exactly when its last digit is 0, and only 13 of the 20 digit vectors keep two zeros apart. The other primes need a character estimate and a counting bound fibred over a pair of coordinates - fibres of size 3, exponent log3(20/3)=1.727>1\log_3(20/3) = 1.727 > 1, where the usual one-coordinate fibring gives 8 and 0.8340.834 and proves nothing. The same proof settles any base-qq digit design with F>qκI|F| > q\kappa_I on every coordinate pair. The scripts re-count all 64 million level-six points (15,141,28815{,}141{,}288 of them pairwise coprime, density 0.2365830.236583) and explain why the finite levels sit below the limit: the digits are biased mod 2, and the exact level-LL factor at 2 is 1234(3/5)L+14(1/5)L=0.4416\frac12-\frac34(3/5)^L+\frac14(-1/5)^L = 0.4416 at L=5L = 5 against its limit 12\frac12.

  • Grew from the coprime page of the MrlyMath tree.
  • paper.pdf - the paper.
  • tectonic paper.tex rebuilds it; python3 scripts/verify.py re-checks every number; python3 scripts/figure.py redraws the design.