On a Diophantine equation that generates all integral Apollonian Gaskets

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 occurrences of Pythagorean triples in such gaskets is discussed.


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, then recursively inscribing new circles (disks) in the curvilinear triangular regions (called "ideal triangles") formed between the circles. Figure 1 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 D 2 , (c) the regular threefold gasket, which has symmetry D 3 , and (d) a general gasket that may have no mirror symmetry.

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, then recursively inscribing new circles (disks) in the curvilinear triangular regions (called "ideal triangles") formed between the circles. Figure 1 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 D 2 , (c) the regular threefold gasket, which has symmetry D 3 , and (d) a general gasket that may have no mirror symmetry.
It turns out that that there exist an infinite number of integral Apollonian packings, where the curvature of every circle/disk is an integer.
Recall that four pairwise tangent circles are said to be in Descartes configuration. Suppose a,b,c,d are curvatures of four such circles. Then Descartes' circle formula states 2(a 2 + b 2 + c 2 + d 2 ) = (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 d 1 and d 2 , such that  2(a 2 + b 2 + c 2 + d 2 ) = (a + b + c + d) 2 . (1.1) 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 d 1 and d 2 , such that Disks d 1 and d 2 will be called Boyd-dual. As observed by 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 equations (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, i.e., by the five least bends. Why five will become clear when we consider symmetries, Appendix A.
Examples of integral Apollonian gaskets include these:   (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.

Integral 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.
Every solution to (2.1) corresponds to an Apollonian gasket with the following quintet of the major bends (curvatures): Theorem 2.1. There is a one to one correspondence between the irreducible integral Apollonian gaskets and the irreducible quadruples of non-negative integers B, k, n, µ ∈ N that are solutions to quadratic equation Every solution to (2.1) corresponds to an Apollonian gasket with the following quintet of the major bends (curvatures): Corollary 2.2. The Apollonian gasket is integral iff gcd(B, k, n) = 1. 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 = (B 2 + µ 2 )/k). Equation (2.1) leads to an algorithm producing all integral Apollonian gaskets, ordered by the curvatures, presented in Figure 2.2: Appendix A shows the first 183 entries for the main bend varying from 0 through 32.  Figure 2 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 = (B 2 +  2 )/k). Equation (2.1) leads to an algorithm producing all integral Apollonian gaskets, ordered by the curvatures, presented in Figure 3: for B = 1 to whatever you wish for  = 0 to int(B/3) evaluate H = B 2 +  2 for k = 2 to int(H) if n = H/k is an integer and gcd(B,k,n) = 1 then the quintet of main curvatures is (-B, B+k, B+n, B+k+n-2, B+k+n+2) next k next  next B Appendix A shows the first 183 entries for the main bend varying from 0 through 32.  Proof Theorem 2.1. (We denote a circle and its curvature by the same symbol). Consider an Apollonian gasket of disks inscribed inside a circle of curvature B (bend equal to −B). Draw an axis through the center of this circle and the center of the next largest circle B 1 (the horizontal axis A in Figure 2.3). 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 L 0 and L 1 are the images of B and B 1 , respectively.
The next largest circle, B 2 , will show up in the strip as a circle B 2 . It will intersect the axis A. Various Apollonian gaskets will result by varying the strip's width (that is the parameter ρ) and the height h of the center of the circle B 2 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 radius K centered at O carries a point at distance d from O to a point at distance d 5 4 Proof Theorem 2.1: (We denote a circle and its curvature by the same symbol). Consider an Apollonian gasket of disks inscribed inside a circle of curvature B (bend equal to -B). Draw an axis through the center of this circle and the center of the next largest circle B 1 (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 L 0 and L 1 are the images of B and B 1 , respectively. The next largest circle, B 2 , will show up in the strip as a circle B' 2 . It will intersect the axis A. Various Apollonian gaskets will result by varying the strip's width (that is the parameter ) and the height h of the center of the circle B 2 ' 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 radius K centered at O carries a point at distance d from O to a point at distance d' according to 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 We shall analyze the Apollonian gasket as the inversive image of the Apollonian strip, disk by disk: Step 0. Recall that B  N represents the curvature of the encompassing circle of the gasket.
Step 1. To calculate the curvature B 1 of the greatest circle inside (the image of L 1 ), apply (2.3 i) to the point of intersection of L 1 and axis A to get: Since B is an integer, so is the last term; denote it by k = B 2  . Clearly, k can be any nonnegative integer (to make B 1  B). according to 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 We shall analyze the Apollonian gasket as the inversive image of the Apollonian strip, disk by disk: Step 0. Recall that B ∈ N represents the curvature of the encompassing circle of the gasket.
Step 1. To calculate the curvature B 1 of the greatest circle inside (the image of L 1 ), apply (2.3)i) to the point of intersection of L 1 and axis A to get: Since B is an integer, so is the last term; denote it by k = B 2 ρ. Clearly, k can be any nonnegative integer (to make B 1 ≥ B).
Step 2. For B 2 , the image of B 2 , use (2.3)ii to get As before, we conclude that the last term must be an integer; denote it by n. Clearly, n ≥ k (to make B 2 ≥ B 1 ).
Step 3. Similarly, we get a formula for the next largest circle B 3 located below B 2 , the image of B 3 . Simply use the above formula with h = h − 2ρ instead of h to get 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: Integers k, n and m are not independent; take the definition for n and eliminate h and r from it to get 4nk = 4B 2 + m 2 , 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: The additional upper bound for µ comes from the fact that k takes its greatest value at k = B 2 + µ 2 . Thus the last inequality of (2.5), k ≥ 2µ, implies: and therefore (after squaring) This ends the proof.

Symbols of the circles in an Apollonian gasket
The symbol of a circle [5,6] is a formal fractioṅ x,ẏ b where b = 1/r denotes the bend (signed curvature) of the circle and the position of the center is By reduced coordinates we mean the pair   y x  , . 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.
Boyd's linearization (1.2) for bends in Descartes configurations holds for the reduced coordinates, since they satisfy a quadratic equation due to the extended Descartes Circle Theorem [LGM]. Thus:

Remark:
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 [Wil] for a single chain in an arbelos-like figure, illustrated in Figure 6.    By reduced coordinates we mean the pair (ẋ,ẏ). 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 3.1.
Boyd's linearization (1.2) for bends in Descartes configurations holds for the reduced coordinates, since they satisfy a quadratic equation due to the extended Descartes Circle Theorem [2,3,4]. Thus: x 4 +ẋ 4 = 2(ẋ 1 +ẋ 2 +ẋ 3 ) andẏ 4 +ẏ 4 = 2(ẏ 1 +ẏ 2 +ẏ 3 ). (3.1) 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 [11] for a single chain in an arbelos-like figure, illustrated in where b = 1/r denotes the bend (signed curvature) of the circle and the position of the cente is By reduced coordinates we mean the pair   y x  , . In the case of the Apollonian Window (packing with the major curvatures (-1, 2, 2, 3, 3)), the reduced coordinates and the bend o each circle are integers, see Figure 5.
Boyd's linearization (1.2) for bends in Descartes configurations holds for the reduce coordinates, since they satisfy a quadratic equation due to the extended Descartes Circl Theorem [LGM]. Thus: The geometric interpretation of the integrality of the labels. Every circle in th 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 [Wil] for a singl 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? 8 7 packings, that is: Are the three numbers in the label all integers? Proposition 3.1: In the case of the coordinate system with the center located at the center of circle B (see Figure 4), the labels for the Apollonian gasket generated from (B, n, k, ) are as presented in Figure 7.
One can check that the circles of curvatures B + k + n   are 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 unless B|k (see the symbol for B 1 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.
One can check that the circles of curvatures B+k+n±µ are 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 unless B|k (see the symbol for B 1 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µ.

Pythagorean triples in Apollonian gaskets
Given two tangent circles C 1 and C 2 , 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.

Pythagorean triples in Apollonian gaskets
Given two tangent circles C 1 and C 2 , we construct a triangle the hypotenuse of which joins the centers and the other sides of which are horizontal or vertical with respect to some fixed axes.
We shall associate with this triangle a triple of numbers, namely The actual size of the triangle's sides is the above triple scaled down by the factor of b 1 b 2 . Hence the symbol for such triangles: Clearly,  2 +  2 =  2 . If the reduced coordinates are integers, then the triples (4.1) are Pythagorean triples! The Apollonian Window thus contains infinitely many Pythagorean triples [jk]. A few are displayed in Figure 8.

.2)
We shall associate with this triangle a triple of numbers, namely The actual size of the triangle's sides is the above triple scaled down by the factor of b 1 b 2 . Hence the symbol for such triangles: Clearly, ∆ 2 + Γ 2 = H 2 . 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

Pythagorean triples in Apollonian gaskets
Given two tangent circles C 1 and C 2 , we construct a triangle the hypotenuse of which joins the centers and the other sides of which are horizontal or vertical with respect to some fixed axes.
We shall associate with this triangle a triple of numbers, namely The actual size of the triangle's sides is the above triple scaled down by the factor of b 1 b 2 . Hence the symbol for such triangles: Clearly,  2 +  2 =  2 . If the reduced coordinates are integers, then the triples (4.1) are Pythagorean triples! The Apollonian Window thus contains infinitely many Pythagorean triples [jk]. A few are displayed in Figure 8.   Now, for the arbitrary integer packing. Consider the four major circles B 0 , B 1 , B 2 , B 3 in an Apollonian gasket (Figure 3.2). Pairwise, they determine six right triangles. Each of the thick segments in Figure 4.2 represents the hypotenuse of one of them. This sextet will be called the principal frame for the gasket.
We shall prove later that if the corresponding triples ∆, Γ, H are integers, so are all triples in the gasket, But first: 9 Now, for the arbitrary integer packing. Consider the four major circles B 0 , B 1 , B 2 , B 3 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.
We shall prove later that if the corresponding triples , ,  are integers, so are all triples in the gasket, But first:

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 Figure 7   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 Figure  3.3 and 4.2, as follows: Proof. Direct calculation from the data of Proposition 3.2.
The master equation is used to bring the triples to a form where the only fractional terms contain B/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, non-integer term, a multiple of 2Bµ/k or 2B 2 /k. The fact that it can be done proves the following theorem:  Proof. The following implication is direct Combining the premise with the result: k 2 |2B 2 2µ 2 ⇒ k 2 |4(Bµ) 2 ⇒ k|2µB. Every entry of (4.3) may be expressed as a linear integral combination of B, k, n, µ 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, or k = 2, is sufficient.

Linear recurrence for Pythagorean triples in an Apollonian gasket
Consider four circles in Descartes configuration, C 1 , . . . , C 4 (see Figure 5.1). 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: horizontal side: They form the frame of the Descartes configuration. Now, complement the picture with a circle C 4 , Boyd-dual to C 1 (see Figure 5.1). This leads to a new frame, the frame of the Descartes configuration C 4 , C 2 , C 3 , C 4 . 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 3.3, the transition of frames is given by Proof. Using the linear relations (1.2) and (3.1), we can express the position and the curvature of the new, fifth, circle in terms of the initial four: We can calculate the Pythagorean vectors for each pair C 4 C i , 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 C 4 C 1 :

12
The Γ's follow the same argument. Only B s are slightly different: Thus the transformation is linear in the entries of ∆, Γ, and, B, with integer coefficients, as stated.

11
We can calculate the Pythagorean vectors for each pair C' 4 C i , 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 C' 4 C 1 : The Γ's follow the same argument. Only B's are slightly different: ' Thus the transformation is linear in the entries of Δ, Γ, and, Β, 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), e.g., 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:

13
(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 = [∆|Γ].

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 If we see it as B 2 + µ 2 = hypotenuse 2 -one may identify the corresponding (scaled) triangle in Figure 2.3 as the one with legs being the diameter 2/B of the encompassing circle and altitude h of the center of circle B 2 -the inversive image of circle B 2 . Each solution to the master equation may also be viewed as an integral isotropic vector [B, µ, n, k] T in the Minkowski space R 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.

A. List of integral packings
Here we provide a list of the first 200 integer Apollonian packings. First, however, a few words on symmetry of these arrangements. 14

Appendix: List of integral packings
Here we provide a list of the first 200 integer Apollonian packings. Fist, however, a few words on symmetry of these arrangements. Only two integral Apollonian packings have rich symmetry: that of Apollonian Strip, and of Apollonian Window (D 2 ). Otherwise we have two cases, that of symmetry C 1 and D 1 , which will be labeled as follows: Skew means no nontrivial symmetry (thus symmetry of type C 1 ).
For cases with single axis symmetry (D 1 ) we shall distinguish two cases: Odd -mirror symmetry D1, with exactly three circles cut by the axis of symmetry Even -mirror symmetry with infinitely many circles on the axis Even* -even symmetry that is obtained "accidentally" by algorithm in Figure 3, where the two greatest congruent circles are not images of the congruent disks in the Apollonian strip Consult Figure A1 for visualization.

Appendix: List of integral packings
Here we provide a list of the first 200 integer Apollonian packings. Fist, however, a few words on symmetry of these arrangements. Figure A1: Types of symmetries and arrangements. The second circle, b, is thicker Only two integral Apollonian packings have rich symmetry: that of Apollonian Strip, and of Apollonian Window (D 2 ). Otherwise we have two cases, that of symmetry C 1 and D 1 , which will be labeled as follows: Skew means no nontrivial symmetry (thus symmetry of type C 1 ).
For cases with single axis symmetry (D 1 ) we shall distinguish two cases: Odd -mirror symmetry D1, with exactly three circles cut by the axis of symmetry Even -mirror symmetry with infinitely many circles on the axis Even* -even symmetry that is obtained "accidentally" by algorithm in Figure 3, where the two greatest congruent circles are not images of the congruent disks in the Apollonian strip Consult Figure A1 for visualization. Only two integral Apollonian packings have rich symmetry: that of Apollonian Strip, and of Apollonian Window (D 2 ). Otherwise we have two cases, that of symmetry C 1 and D 1 , which will be labeled as follows: Skew means no nontrivial symmetry (thus symmetry of type C 1 ).
For cases with single axis symmetry (D 1 ) we shall distinguish two cases: Odd -mirror symmetry D 1 , with exactly three circles cut by the axis of symmetry Even -mirror symmetry with infinitely many circles on the axis Even* -even symmetry that is obtained "accidentally" by algorithm in Figure 2.2, where the two greatest congruent circles are not images of the congruent disks in the Apollonian strip Consult Figure A1 for visualization.

16
Yet another attribute of an Apollonian packing is a shift, which we define as the degree the disk on the horizontal axis in the Apollonian strip is raised above this axis in terms of the fraction of its radius. shift = h/ρ = 2µ k .
See Figure 2.3. It has values in the interval [0,1] and it measures the degree the gasket is off the axial symmetry: 0 for odd symmetry D 1 and 1 for even symmetry D 1 . The fractional value indicates lack of axial symmetry, except the cases of "accidental" even* symmetry, when n = k (this gives B 1 = B 2 ). Table A1 displays first 24 integral Apollonian gaskets including symmetry type, principal disk quintet, the parameters B, k, n, µ, and the shift factor. The first even* case is also included. Table A2 contains a longer list of integer Apollonian gaskets for the principal curvatures from 1 through 32. Curvature quintets (in brackets) are followed by shift factor.

15
Yet another attribute of an Apollonian packing is a shift, which we define as the degree the disk on the horizontal axis in the Apollonian strip is raised above this axis in terms of the fraction of its radius. Figure 4. It has values in the interval [0,1] and it measures the degree the gasket is off the axial symmetry: 0 for odd symmetry D 1 and 1 for even symmetry D 1 . The fractional value indicates lack of axial symmetry, except the cases of "accidental" even* symmetry, when n = k (this gives B 1 = B 2 ) Table A1 displays first 24 integral Apollonian gaskets including symmetry type, principal disk quintet, the parameters B, k, n, , and the shift factor. The first even* case is also included.