The Apollonian gasketThe Apollonian gasket

The Apollonian gasket

Three mutually tangent circles leave two circles tangent to all three, one in each of the two curvilinear triangles they bound. Draw both, and every new triple of tangent circles repeats the move; the circles multiply forever, their total area exhausts the region they started in, and what is left over, a set of measure zero, is the Apollonian gasket. This page identifies that gasket with an object the tree already keeps. The Farey stack is a moire on the line whose bright nodes are the reduced fractions, each lit floor(Q/b) times at depth Q for a node of denominator b; the circles of one particular integral packing rest on the line exactly at those nodes, one circle to a fraction, the circle over a/b carrying curvature 2 b^2. The stack is the packing's shadow.

Every claim carries a tag. Proved means derived here from definitions. Verified means recomputed from scratch, or checked against the published literature. Conjecture marks a reading the tables support and no proof reaches, Refuted a claim this page kills. The generator is lab/rs/apollonian, which grows a packing from its root quadruple in exact integers and checks Descartes on every quadruple it makes. The Apollonian demo grows the packing and lays the stack under it, and the Farey sequence page builds the stack the circles shadow.

It is not the other gasket

The tree already has a gasket, and the two share a name and nothing else. The desk's gasket is the design of code 7 at base 2: the attractor of three maps x -> (x + c)/2, one ratio, three pieces, dimension log 3/log 2 = 1.584962500721... exactly, a closed form in one line. The Apollonian gasket is the limit set of the Apollonian group, generated by the four inversions in the dual circles, each of them the circle through the three tangency points of the other three of a mutually tangent quadruple: the maps are Mobius, not similarities, they carry no single ratio, the pieces meet at tangency points where the derivative is 1, and no closed form for its dimension is known. The two objects do not even have the same kind of dimension: one is a ratio of logarithms of integers, the other is not known to be any closed form at all. Proved for the design, where the maps are similarities of ratio 1/2 satisfying the open set condition, and Verified for the gasket against the literature below, where every published value is a computation and the best of them is an interval.

Descartes

Four mutually tangent circles with curvatures k_1, k_2, k_3, k_4, a curvature being the reciprocal of the radius and negative for a circle containing the other three, satisfy (k_1 + k_2 + k_3 + k_4)^2 = 2 (k_1^2 + k_2^2 + k_3^2 + k_4^2). Read as a quadratic in k_4 its two roots are k_1 + k_2 + k_3 +- 2 sqrt(k_1 k_2 + k_2 k_3 + k_3 k_1), the two circles that fit in the two triangles, and they sum to 2(k_1 + k_2 + k_3). So the second circle is got from the first with no square root at all, by the reflection k_4' = 2(k_1 + k_2 + k_3) - k_4. Proved, by Vieta on that quadratic. An integer root quadruple therefore makes every curvature in the packing an integer, and the whole growth is integer arithmetic.

The reflection moves the positions too, and it moves them by the same rule. Write a circle of curvature k centred at (x, y) as the integer triple (k, k x, k y), and a line as k = 0 with (k x, k y) its outward unit normal. The reflection acts on all three coordinates at once, v' = 2(v_1 + v_2 + v_3) - v, and six exact integer identities hold on every quadruple it makes. Proved: they hold on the two root quadruples by hand and the reflection preserves them, so the runs below, which recheck all six on every one of their 575969269 quadruples with 0 failures, test the integer arithmetic and not the algebra. With B(u, v) = (sum u_i)(sum v_i) - 2 sum u_i v_i on the four columns of the quadruple, the six are B(k, k) = B(k, kx) = B(k, ky) = B(kx, ky) = 0 and B(kx, kx) = B(ky, ky) = -4. The first is Descartes; the rest are the position half of the same theorem, and all six survive the reflection because the reflection lies in the orthogonal group of B. The reflection is the Apollonian group in coordinates: inversion in the dual circle fixes the other three and sends the fourth to its reflection. On the strip root the dual circle of the line y = 0 passes through (0, 1), (1, 1) and (1/2, 1/2), so it is centred (1/2, 1) of radius 1/2, and inversion in it sends y = 0 to the circle of centre (1/2, 7/8) and radius 1/8, which is 2(v_1 + v_2 + v_3) - v = (8, 4, 7) exactly.

The strip packing

The root quadruple (0, 0, 2, 2) is two lines and two circles: the lines y = 0 and y = 1, and the circles of diameter 1 centred at (0, 1/2) and (1, 1/2). Descartes reads (0 + 0 + 2 + 2)^2 = 16 = 2(0 + 0 + 4 + 4). In coordinates the four are (0, 0, -1), (0, 0, 1), (2, 0, 1) and (2, 2, 1), and the packing they generate is periodic in x with period 1. Proved: reflecting (2, 0, 1) in the other three gives (2, 4, 1), the circle at x = 2, so the swapped quadruple is the two lines with the circles at x = 1 and x = 2, which is the root translated by one; a packing is generated by any of its quadruples, so the translation by one carries the packing onto itself. The circle moves by two, the quadruple by one.

The coordinates read tangency to a line straight off the integers. A circle of positive curvature in the strip packing is tangent to y = 0 exactly when k y = 1, and to y = 1 exactly when k y = k - 1. Proved: the centre height of a circle tangent to y = 0 from above is its radius, so y = 1/k. No geometry is needed to sort the packing into the circles that touch a line and the circles that do not. Both statements need the positive curvature, and the two lines are excluded by hand: y = 1 is (0, 0, 1), which passes the near test k y = 1 without resting on y = 0, and y = 0 is (0, 0, -1), which passes the far test k y = k - 1 in the same way.

The Ford circles

In the strip packing the circles tangent to the line y = 0 are exactly the Ford circles: for every reduced a/b, with no interval assumed, the circle of curvature 2 b^2 centred at (a/b, 1/(2 b^2)), resting on the line at a/b, and nothing else. Proved. The packing fills the whole strip, so a/b runs over every rational; one period carries the reduced a/b of [0, 1).

The base of the induction is the root: a/b = 0/1 and 1/1 are the two circles of curvature 2 = 2 * 1^2. The step is Descartes with a line in the quadruple. Given two line-tangent circles of curvatures 2 b^2 and 2 d^2 tangent to each other, the quadruple (0, 2 b^2, 2 d^2, k) forces k^2 - 2 S k + 4 (b^2 - d^2)^2 = 0 with S = 2(b^2 + d^2), whose discriminant is 4 S^2 - 16 (b^2 - d^2)^2 = 64 b^2 d^2, a square. The two roots are 2 (b + d)^2 and 2 (b - d)^2: the Ford circle over the mediant (a + c)/(b + d) and the one over the Stern-Brocot parent (a - c)/(b - d), which at the base b = d = 1 is the line y = 1 of curvature 0. So the reflection carries the parent to the mediant, exactly, in integers.

Tangency is the Farey condition, and it is an identity rather than an estimate. For the circles over a/b and c/d the squared centre distance minus (r_1 + r_2)^2 is (a/b - c/d)^2 - 4 r_1 r_2 = ((a d - b c)^2 - 1)/(b^2 d^2). Two Ford circles are tangent when (a d - b c)^2 = 1 and have disjoint closures otherwise; they never overlap. Proved, from that one line. Two Farey neighbours therefore carry tangent circles, their mediant is reduced, and each of the two new pairs is again a neighbour pair, so the Stern-Brocot tree rooted at (0/1, 1/1) reaches every reduced fraction of (0, 1) exactly once and the reflection tracks it. Translating by the period carries those circles to every other reduced a/b, and a translation leaves b and so the curvature 2 b^2 alone.

The converse closes the word "exactly". Let C be any circle of the packing tangent to y = 0 at p, of radius r. C and the Ford circle over a/b fail to be disjoint precisely when abs(p - a/b) < sqrt(2 r)/b. If p is irrational, Dirichlet gives infinitely many a/b with abs(p - a/b) < 1/b^2, and every one of them with b > 1/sqrt(2 r) then overlaps C; circles of a packing have disjoint interiors, so p is rational. Write p = a/b reduced. Two circles tangent to the line at one point are nested, so C and the Ford circle over a/b are equal or one contains the other, and only equality is allowed. Proved.

The lab checks the identification in both directions and in exact integers. Walking the Stern-Brocot tree to denominator 4000 makes 4863601 mediants against sum_{b <= 4000} phi(b) - 1 = 4863601, with the reflection returning (k, k x, k y) = (2 r^2, 2 p r, 1) at the mediant p/r every time, no broken quadruple and no non-tangent parent pair. Growing the packing itself on one period to curvature 2097152 makes 20770674 circles, of which 318963 have k y = 1; every one of them is a Ford circle, and 318963 is sum_{b <= 1024} phi(b) - 1. Verified (lab/rs/apollonian, verbs ford and strip), and the same count comes back at Q = 32 and Q = 181, 323 and 10059. Distinctness of the grown circles is controlled at T = 2048, where 2448 circles are 2448 distinct; past that the count is the generator's, which is sound because each swap strictly raises the curvature.

The stack is the shadow

The Farey stack lights the node a/b exactly floor(Q/b) times at depth Q. Under the Ford identification the stack is the packing's shadow on the line: a node is lit floor(Q sqrt(2/k)) times, where k = 2 b^2 is the curvature of the one circle of the strip packing resting on it, and the nodes lit at depth Q are exactly the tangency points of the line-tangent circles of curvature at most 2 Q^2. Proved, by composing the brightness law with the identification, and Verified: at Q = 1024 the packing offers 318963 line-tangent circles of curvature at most 2 Q^2 on one period against the stack's sum_{b <= Q} phi(b) - 1 nodes in (0, 1), the node 0/1 sitting on the period's edge.

The total brightness is a closed form and it is the same on both sides. Summing floor(Q/b) over the nodes of the half-open period [0, 1) gives Q(Q + 1)/2. Proved: the sum is sum_{b <= Q} phi(b) floor(Q/b) = sum_{n <= Q} sum_{b | n} phi(b) = sum_{n <= Q} n. Verified at Q = 50, 200, 1000, 4000: 1275, 20100, 500500, 8002000. The Stern-Brocot walk covers (0, 1) and gives Q(Q + 1)/2 - Q; the node 0/1, of denominator 1 and brightness Q, closes the period and the sum.

The census

Curvatures at most T are finite in number, N(T), once the packing is bounded or the strip packing is cut to one period. The lab grows the tree with the reflection, one new circle per node, and counts. N(T) counts what the tree grows, the root quadruple excluded: the four curvatures -1, 2, 2, 3 of the bounded root are not in the table, and neither is the root circle at x = 0 that the half-open period [0, 1) keeps. The convention costs four circles in the bounded column and one in the strip column at every T; every ratio below is read off the counts as printed.

Tstrip, one period(-1, 2, 2, 3)
10^39503325
10^41929867163
10^53904781359167
10^6789913827463391
10^7-555198593

The count grows like a power of T, and the local exponent read as the ratio log(N(T_2)/N(T_1))/log(T_2/T_1) lands at 1.305, the fourth place being the grid's: 1.3057 on the bounded decades, 1.3060 on the strip decades, 1.3056 on the strip octaves. Verified (lab/rs/apollonian, verbs strip and census). On the bounded packing over the decade grid to T = 10^7 the ratios are 1.5185, 1.3043, 1.3053, 1.3061, 1.3055, 1.3057; on the strip packing over the same grid to T = 10^6 they are 1.3802, 1.2965, 1.3078, 1.3061, 1.3060, and over the octave grid to T = 2097152 they are 1.2925, 1.2722, 1.2716, 1.2925, 1.3073, 1.3011, 1.3064, 1.3050, 1.3056. The flat reading log N(T)/log T is a different and much slower number, 1.2492 at T = 10^7 and still climbing, because the constant in front has not been divided out; no digit on this page is fitted, every one is a ratio of two counts and two bounds.

The residues are the arithmetic of the packing, and the census sees them and nothing more: which integers inside those classes occur is a different question, carried below as a citation. The bounded packing (-1, 2, 2, 3) uses exactly the eight residues 2, 3, 6, 11, 14, 15, 18, 23 mod 24, over all 555198593 circles of curvature at most 10^7; the strip packing, which is not primitive, uses the four residues 0, 2, 8, 18, 4144636, 6223160, 6241134 and 4161744 of its 20770674 circles of curvature at most 2097152. Verified, same run.

The dimension

The exponent is the Hausdorff dimension of the residual set, and it is not the desk's to prove. The number of circles of curvature at most T in a bounded Apollonian packing is asymptotic to c T^alpha with alpha the residual dimension. Verified against Kontorovich and Oh 2011, whose theorem is stated for any given bounded packing and whose abstract prints alpha ~ 1.30568(8); the census above is a reading of that theorem and not a proof of it.

The dimension itself is 1.3056867280498771846..., rigorous to 128 places. Verified against Vytnova and Wormell 2024, whose Theorem 1.1 gives dim_H(A) = 1.3056867280 4987718464 5986206851 0408911060 ... +- 10^(-129) by an effective Ruelle-Bowen computation on a Chebyshev-Lagrange approximation of the transfer operator. The same source records the history the census sits on: Boyd 1973's bracket 1.300197 < dim_H < 1.314534 was the first rigorous one and for fifty years the only one, McMullen 1998 reached 1.305688 by an eigenvalue algorithm and it is correct to five places, and Bai and Finch 2018 reached 30 places non-rigorously with an induced transfer operator. The census's bounded reading 1.3057 is alpha correctly rounded to four places, off by 1.3e-5; the strip's 1.3056 and 1.3060 agree to three, off by 8.7e-5 and 3.1e-4. Three places is what the local ratios support and the fourth is the grid's.

The parabolic tangencies are why the closed form is missing. The gasket is the limit set of a Kleinian group, and the generators fix the tangency points with derivative 1, so the transfer operator has no spectral gap in the naive space and the classical dimension algorithms converge slowly: this is the reason McMullen's discretisation was accurate to five places and not more, and the reason the first rigorous bracket stood for fifty years. The tree makes no claim here.

The local-global question

The curvatures lie in six or eight residue classes mod 24 and the question is which integers in those classes actually appear. This one is closed by others and carried here only as a citation. The local-global conjecture, that every sufficiently large integer in one of those classes appears as a curvature, is false: Haag, Kertzer, Rickards and Stange 2023 prove that certain quadratic and quartic families are missed, the obstruction coming from quadratic and quartic reciprocity and belonging to the thin Apollonian group rather than to its Zariski closure. The eight-class census above is this page's only statement in this direction, and it is a count, not a claim about which integers in those classes occur.

No design has this dimension

A design is the attractor of a subset of the base^dim maps x -> (x + c)/base: finitely many similarities, all of one ratio 1/base, satisfying the open set condition, so its dimension is log N/log base for an integer cell count N. The gasket is the attractor of a system of Mobius maps of no common ratio with parabolic fixed points at the tangencies, so its dimension is not forced into that shape and, as far as anything proved goes, is not in it. A design of base at most 100 has the gasket's dimension only if base^alpha is an integer, and none is: the nearest approach over 2 <= base <= 100 is 52^alpha = 174.005426001, then 68^alpha, 89^alpha, 49^alpha, 23^alpha and 20^alpha at gaps 0.008182, 0.011684, 0.015094, 0.022279, 0.026750, and the worst gap is 0.488110 at base 47. Verified (lab/rs/apollonian, verb design), computed from the rigorous alpha above. This is a check and not a theorem: alpha is not known to be irrational, so no finite table can close the question, and the table says only that the two families do not meet inside the window the tree can see. It refutes equality and nothing weaker. The nearest design dimension in the window is log 351/log 89 = 1.305694144, off alpha by 7.4 * 10^-6, with log 247/log 68 = 1.305694579 next at 7.9 * 10^-6: a design can come this close and still not be the gasket.