# On a Diophantine Equation That Generates All Integral Apollonian Gaskets

Authors: Jerzy Kocik
Journal: ISRN Geometry
 (2012)

---

## Abstract

A remarkably simple Diophantine quadratic equation is known to generate all, Apollonian integral gaskets (disk packings). A new derivation of this formula is presented here based on inversive geometry. Also, occurrence of Pythagorean triples in such gaskets is discussed.


---

## Body

## 1. Introduction

Apollonian disk packing (or Apollonian gasket) is a pattern obtained by starting with three mutually tangent circles of which one contains the other two and then recursively inscribing new circles (disks) in the curvilinear triangular regions (called “ideal triangles’’) formed between the circles. Figure1 shows a few examples, including (a) a special case of the noncompact “Apollonian strip,” (b) the Apollonian window, which is the only case that has symmetry D2, (c) the regular threefold gasket, which has symmetry D3, and (d) a general gasket that may have no mirror symmetry.Various Apollonian disk packings.
(a)(b)(c)(d)It turns out that there exist an infinite number ofintegral Apollonian packings, where the curvature of every circle/disk is an integer.Recall that four pairwise tangent circles are said to be in theDescartes configuration. Suppose a, b, c, and d are curvatures of four such circles. Then, the Descartes circle formula states(1.1)2(a2+b2+c2+d2)=(a+b+c+d)2.
One may use this formula to obtain the curvature of the fourth circle d, given the first three. Being a quadratic equation, it yields two solutions, say d1 and d2, such that(1.2)d1+d2=2(a+b+c).
Disks d1 and d2 will be called the Boyd  dual. As observed by the Boyd [1], this “linearized’’ version of (1.1) provides a handy tool for determining the curvatures in a particular Apollonian gasket starting with the first four values. In particular, it follows that if the first four values are integers, so are all.Remark 1.1.
For consistency, the curvature of the circle that contains all of the remaining ones must be given a negative value for (1.1) and (1.2) to hold. It is customary to replace the term “curvature’’ by “bend’’ to account for this convention. Another way of looking at this is to think of disks rather than circles, where the greatest circle is the boundary of an exterior, unbounded, region. This way no two disks in an Apollonian gasket overlap.In this note, Apollonian gaskets will be labeled by the bends of the five greatest circles, that is, by the five least bends. Why five will become clear when we consider symmetries, the appendix.Examples of integral Apollonian gaskets include(0,0,1,1,1): Apollonian belt (Figure 1(a)),(-1,2,2,3,3): Apollonian window (Figure 1(c)),(-2,3,6,7,7): less regular gasket, but with D1 symmetry,(-6,11,14,15,23): quite irregular case.Note that the regular gasket (see Figure1) cannot have integer bends as its quintet of curvatures is, up to scale, (1-√3,2,2,2,10+2√3), and hence its curvatures are populated by elements of ℤ[√3]. Due to (1.2), the integrality of the first four circles determines integrality of all disks in the packing. An integral Apollonian packing is irreducible if the bends have no common factor except 1.The problem is to classify and determine all irreducible integral Apollonian gaskets.


## 2. Integer Disk Packing: The Formula

All integral Apollonian disk packings may be determined using a simple Diophantine quadratic equation with constraints. The derivation of this formula is a much simpler alternative to that of “super-Apollonian packing’’ [2–4] and is based on inversive geometry.Theorem 2.1.
There is a one-to-one correspondence between the irreducible integral Apollonian gaskets and the irreducible quadruples of nonnegative integersB,k,n,μ∈ℕ that are solutions to quadratic equation
(2.1)B2+μ2=kn
with constrains
(2.2)(i)0≤μ≤B√3,(ii)2μ≤k≤n.
Every solution to (2.1) corresponds to an Apollonian gasket with the following quintet of the major bends (curvatures):
(2.3)(B0,B1,B2,B3,B4)=(-B,B+k,B+n,B+k+n-2μ,B+k+n+2μ).Corollary 2.2.
The Apollonian gasket is integral if and only if gcd(B,k,n)=1.Figure2 locates the curvatures of the theorem in the Apollonian gasket. Note that the triple of integers (B,μ,k) is also a good candidate for a label that uniquely identifies an Apollonian gasket (since n is determined by n=(B2+μ2)/k).Figure 2
An Apollonian gasket and its four greatest circles (smallest curvatures).Equation (2.1) leads to an algorithm producing all integral Apollonian gaskets, ordered by the curvatures, presented in Algorithm 1.Algorithm 1:An algorithm that produces all integral disk packings.
forB=1 to whatever you wishforμ=0 to int (B/√3)evaluateH=B2+μ2fork=2μ to int(√H)ifn=H/k is an integer and gcd (B,k,n)=1then the quintet of main curvatures is(-B,B+k,B+n,B+k+n-2μ,B+k+n+2μ)nextknextμnextBThe appendix shows the first 183 entries for the main bend varying from 0 to 32.Example 2.3.
Figure3 shows that there are only 3 Apollonian gaskets for B=6.Figure 3Proof of Theorem2.1 (We denote a circle and its curvature by the same symbol).
Consider an Apollonian gasket of disks inscribed inside a circle of curvatureB (bend equal to -B). Draw an axis through the center of this circle and the center of the next largest circle B1 (the horizontal axis A in Figure 4). Inverting the gasket through a circle K of radius 2/B will produce an Apollonian belt, shown in the figure on the right side of the gasket. Denote its width by 2ρ. Lines L0 and L1 are the images of B and B1, respectively.
The next largest circle,B2, will show up in the strip as a circle B2′. It will intersect the axis A. Various Apollonian gaskets will result by varying the strip width (i.e., the parameter ρ) and the height h of the center of the circle B2′ above the axis. Clearly, the range of h is the interval [0,ρ), as going beyond would result in repetitions of the Apollonian arrangements.
Recall the basic formulas of inversive geometry: inversion through a circle of radiusK centered at O carries a point at distance d from O to a point at distance d′ according to(2.4)dd′=K2,
and a disk of radius r with center distance d from O is mapped to a disk of radius r′ with its center located at distance d′ according to
(2.5)(i)r′=rR2d2-r2,(ii)d′=dR2d2-r2.
We will analyze the Apollonian gasket as the inversive image of the Apollonian strip, disk by disk.Step 1.
Recall thatB∈N represents the curvature of the encompassing circle of the gasket.Step 2.
To calculate the curvatureB1 of the greatest circle inside (the image of L1), apply (2.5)(i) to the point of intersection of L1 and axis A to get:
(2.6)B1=B+B2ρ︸k.
Since B is an integer, so is the last term; denote it by k=B2ρ. Clearly, k can be any nonnegative integer (to make B1≥B).Step 3.
ForB2, the image of B2′, we use (2.5)(ii) to get
(2.7)B2=1r′=1ρ⋅d2-ρ2(2/B)2=B24ρ⋅(d2-ρ2)(simplification)=B24ρ⋅((2B+ρ)2+h2-ρ2)(Pythagoreanthm)=B+4+h2B24ρ︸n
As before, we conclude that the last term must be an integer; denote it by n. Clearly, n≥k (to make B2≥B1).Step 4.
Similarly, we get a formula for the next largest circleB3 located below B2, the image of B3′. Simply use the above formula with h′=h-2ρ instead of h to get
(2.8)B3=1ρ⋅d2-ρ2(2/B)2=B24ρ⋅((2B+ρ)2+(h2-ρ2)2-ρ2)=B+ρB2︸k+4+h2B4ρ︸n-hB2︸m.
Quite pleasantly, the first three terms coincide with terms from previous steps. Since we have already established that they must be integers, so is the last one; denote it by m. Thus we have three integers defined by the geometry of the construction:
(2.9)n=4+h2B24ρ,k=ρB2,m=hB2.
Integers k,n, and m are not independent; take the definition for n and eliminate h and r from it to get
(2.10)4nk=4B2+m2,
from which it follows immediately that m must be even, say m=2μ. Reduce the common factor of 4 to get the “master equation’’ (2.1).As to the constraints, the order of the curvatures gives three inequalities:
(2.11)B1≥B⟹k≥0,B2≥B1⟹n≥0,B3≥B2⟹k≥2μ.
The additional upper bound for μ comes from the fact that k takes its greatest value at k=B2+μ2. Thus, the last inequality of (2.11), k≥2μ, implies:
(2.12)B2+μ2≥2μ,
and therefore (after squaring)
(2.13)B2>3μ2.
This ends the proof.Figure 4
The method of inversion.


## 3. Symbols of the Circles in an Apollonian Gasket

Thesymbol of a circle [5, 6] is a formal fraction
(3.1)ẋ,ẏb,
where b=1/r denotes the bend (signed curvature) of the circle and the position of the center is
(3.2)(x,y)=(ẋb,ẏb).
By reduced coordinates we mean the pair (ẋ,ẏ). In the case of the Apollonian window (packing with the major curvatures (-1,2,2,3,3)), the reduced coordinates and the bend of each circle are integers, see Figure 5.Figure 5
Apollonian window with labels.The Boyd linearization (1.2) for bends in the Descartes configurations holds for the reduced coordinates since they satisfy a quadratic equation due to the extended the Descartes circle theorem [2–4]. Thus’
(3.3)ẋ4+ẋ4′=2(ẋ1+ẋ2+ẋ3),ẏ4+ẏ4′=2(ẏ1+ẏ2+ẏ3).Remark 3.1 (the geometric interpretation of the integrality of the labels).
Every circle in the Apollonian window is an integer multiple of its radius above the horizontal axis and from the vertical axis. This is a generalization of Pappus’ arbelos theorem [7] for a single chain in an arbelos-like figure, illustrated in Figure 6.
The question is whether the same may be expected for other integer Apollonian disk packings, that is, are the three numbers in the label all integers?Figure 6
Classical Pappus’ arbelos theorem: the base is divided randomly, yet every circle in the chain is an even multiple of its radius above the axis.Proposition 3.2.
In the case of the coordinate system with the center located at the center of circleB (see Figure 4), the labels for the Apollonian gasket generated from (B,n,k,μ) are as presented in Figure 7.Figure 7
Labels of circles in the Apollonian packing[B,μ,n,k].Proof.
Direct calculations.One can check that the circles of curvaturesB+k+n±μ are the Boyd dual with respect to the triple of mutually tangent circles of bends (-B,B+n,B+k).The above proposition implies that the reduced coordinates for circles are fractional unlessB∣k (see the symbol for B1 in the figure). Since we have also 2μ≤k (constraints) and the need for k∣2μ (see the symbols for the reduced y-coordinate), we conclude that we would need μ=0 or k=2μ.This happens in two cases: Apollonian window(-1,2,2,3,3) and Apollonian strip (0,0,1,1,1), that is, for [B,μ,k,n] equal to [1,0,1,1] or [0,0,0,1], respectively. However, if k∣μ (which happens “often,’’ whenever μ=0), all reduced y-coordinates are integer. This is a special (integral) case of Pappus’ observation since μ=0 corresponds to the pattern shown in Figure 6, (see the appendix).


## 4. Pythagorean Triples in Apollonian Gaskets

Given two tangent circlesC1 and C2, we construct a triangle whose hypotenuse joins the centers and the other sides of which are horizontal or vertical with respect to some fixed axes.We will associate with this triangle a triple of numbers, namely,(4.1)(Δ,Γ,H)=(b1ẋ2-b2ẋ1,b1ẏ2-b2ẏ1,b1+b2).
The actual size of the triangle sides is the above triple scaled down by the factor of b1b2. Hence, the symbol for such triangles is(4.2)Δ,Γ,Hb1b2.
Clearly, Δ2+Γ2=H2. If the reduced coordinates are integers, then the triples (4.1) are Pythagorean triples. The Apollonian window thus contains infinitely many Pythagorean triples [5, 6]. A few are displayed in Figure 8.Figure 8
Pythagorean triples in the Apollonian window.Now, for the arbitrary integer packing. Consider the four major circlesB0, B1, B2, and B3 in an Apollonian gasket (Figure 6). Pairwise, they determine six right triangles. Each of the thick segments in Figure 9 represents the hypotenuse of one of them. This sextet will be called the principal frame for the gasket.Figure 9
Labels of circles in the Apollonian packing[B,μ,n,k].We will prove later that if the corresponding triplesΔ, Γ, H are integers, so are all triples in the gasket, But first we have the following.Proposition 4.1.
The labels of the six right triangles in an Apollonian gasket whose hypotenuses join the pairs of the first four greatest circles are, in notation as in Figures7 and 9, as follows:(4.3)a=k,0,k-B(B+k),b=n-2B2/k,-2μB/k,n-B(B+n),c=k+n-2μ-2B2/k,2B-2μB/k,k+n-2μ-B(B+k+n-2μ),A=-2b-k+2μ+4Bμ/k,-2(B-n+μ+2B2/k),2B+2n+k-2μ(B+n)(B+k+n-2μ),B=-2B+n-2μ-2B2/k,2(B+k-μ-2B2/k),2B+n+2k-2μ-B(B+k+n-2μ),C=2B+k-n+2B2/k,2μ+2μB/k,2B+k+n(B+k)(B+n).Proof.
Direct calculation from the data of Proposition3.2.The master equation is used to bring the triples to a form where the only fractional terms containB/k as a factor. Note that, in general, each of the entries for the reduced coordinates is a linear combination with integer coefficients of B,k,n, and μ plus the only, possibly, noninteger term, a multiple of 2Bμ/k or 2B2/k. The fact that it can be done proves the following theorem.Theorem 4.2.
Ifk∣2B2 (or, equivalently  k∣2Bμ), then all triples (4.1) in the integer Apollonian gasket (B,  μ, k) are integers (form Pythagorean triples).Proof.
The following implication is direct:(4.4)k∣2B2⟹k∣(2μk-2μ2)⟹k∣2μ2.
Combining the premise with the result, k2∣2B22μ2⇒k2∣4(Bμ)2⇒k∣2μB. Every entry of (4.3) may be expressed as a linear integral combination of B, k, n, and μ and an extra term of either 2Bμ/k or 2Bμ/k. This proves the claim.Integer Pythagorean triples happen frequently. For instance, each of the conditions:μ=0, or k=1, k=2 is sufficient.


## 5. Linear Recurrence for Pythagorean Triples in an Apollonian Gasket

Consider four circles in the Descartes configuration,C1,…,C4 (see Figure 10). The four centers determine six segments that we view as hypotenuses of triangles. They give, after rescaling, six Pythagorean triangles with sides denoted as follows:(5.1)horizontalside:Δij=bibj(xi-xj)=ẋibj-ẋjbi,verticalside:Γij=bibj(yi-yj)=ẏibj-ẏjbi,hypotenuse:Bij=bibj(1bi+1bj)=bi+bj
with i,j=1,…,4. Note that Δij=-Δji and Γij=-Γji but Bij=Bji. They form the frame of the Descartes configuration.Figure 10
(a) A frame (b) and an adjacent frame. Circle 4′ is shaded.Now, complement the picture with a circleC4′, the Boyd dual to C1 (see Figure 10). This leads to a new frame, the frame of the Descartes configuration C4′,C2,C3,C4. Quite interestingly, the elements of the new frame are linear combinations of the elements of the initial frame.Theorem 5.1.
Following the notation of (5.1) and Figure 7, the transition of frames is given by(5.2)Δ41′=-Δ41+2Δ21-2Δ13,Γ41′=-Γ41+2Γ21′-2Γ13′,B41′=-B41+2B12+2B13.Proof.
Using the linear relations (1.2) and (3.3), we can express the position and the curvature of the new, fifth, circle in terms of the initial four:
(5.3)ẋ4′=2ẋ1+2ẋ2+2ẋ3-ẋ4,ẏ4′=2ẏ1+2ẏ2+2ẏ3-ẏ4,b4′=2b1+2b2+2b3-b4.
We can calculate the Pythagorean vectors for each pair C4′Ci, i=1,2,3. By some magic, due to the following regroupings and adding zeros, these can be expressed in terms of the initial four Pythagorean vectors only, as shown here for the pair C4′C1:
(5.4)Δ41′=ẋ4′b1-ẋ1b4′=(2ẋ1+2ẋ2+2ẋ3-ẋ4)b1-ẋ1(2b1+2b2+2b3-b4)=ẋ1b4-ẋ4b1+2(ẋ2b1-ẋ1b21)+2(ẋ3b1-ẋ1b3)=-Δ41+2Δ21-2Δ13.
The Γ’s follow the same argument. Only B′s are slightly different:
(5.5)B41′=b4′+b1=-b4+3b1+2b2+2b3=4b1+2b2+2b3-(b1+b4)=-B41+2B12+2B13.
Thus, the transformation is linear in the entries of Δ, Γ, and, B, with integer coefficients, as stated.Actually, we have proved a little more.Corollary 5.2.
If the (scaled) triangles formed by the initial Descartes configuration are integer, so are all of the triangles of the Apollonian window.Matrix Description
Now we may rephrase our findings on transitions between frames in terms of matrices. The data for the Pythagorean triangles in each frame may be expressed as three vectors (columns), for example, for the initial frame,Δ=[Δ41,Δ42,Δ43,Δ12,Δ23,Δ31]T and similarly for Γ and B. Similarly for the second frame, we have Δ′, Γ′, and B′.Here are the three matrices of the transition from a frame to the corresponding subsequent frame:(5.6)A=[1000000000010000-100001-2-2201020-2-10002],B=[00000-10100000001000-2-1200000-21-2120002],(5.7)C=[000010000-100001000012200-10-2020000-221].
(vertical and horizontal lines in the matrices are drawn for easier inspection). Now acting with them on the initial vectors Δ and Γ, one may reconstruct all the interior triangles. Vectors Δ and Γ may be combined into a single matrix, T=[Δ∣Γ]:
(5.8)T=[Δ41Γ41Δ42Γ42Δ43Γ43Δ12Γ12Δ23Γ23Δ31Γ31],B′=[B41B42B43B12B23B31]
The vector B is transformed to B′ by matrices like A,B,andC, where all of the entries are to be replaced by their absolute values.We conclude with two examples of Apollonian packings in which every triangle for adjacent circles determines a Pythagorean triple, see Figures11 and 12. Only some of the triangles are displayed.Figure 11
Arrangement(b0,b1,b2,b3)=(-2,3,6,7) or (B,μ,k,n)=(2,4,4,5). Left side shows symbols of the principal and other circles, and right side shows Pythagorean triples.Figure 12
Arrangement(b0,b1,b2,b3)=(-3,5,8,8) or (B,μ,k,n)=(3,4,5,5). Both symbols (left) and Pythagorean triples (right). The triangles are reported with absolute values of sides.


## 6. Concluding Remarks

Integral Apollonian disk packings have a topic of much interest for a while [2–4, 8, 9] and their occurrence has been analyzed. Yet it is not clear whether the integral Apollonian disk packings admit coordinate systems in which the reduced coordinates are integral, except the known cases of Apollonian strip and Apollonian window. We have, however, a frequent occurrence of gaskets that admit integral Pythagorean triples, constructed in Sections 4 and 5.Yet another intriguing remark concerns the master equation(6.1)B2+μ2-nk=0.
If we see it as B2+μ2=hypotenuse2—one may identify the corresponding (scaled) triangle in Figure 4 as the one with legs being the diameter 2/B of the encompassing circle and altitude h of the center of circle B2—the inversive image of circle B2. Each solution to the master equation may also be viewed as an integral isotropic vector [B,μ,n,k]T in the Minkowski space ℝ3,1  a la Pedoe map from circles to vectors, see [6]. Such vectors represent points in this Minkowski space—degenerated circles of radius 0.



---

*Source: 348618-2012-04-05.xml*