Apollonian Packings: Number Theory II. Spherical and Hyperbolic Packings

Nicholas Eriksson University of California at Berkeley Berkeley, CA 94720 Jeffrey C. Lagarias University of Michigan Ann Arbor, MI 48109

(February 1, 2005)

ABSTRACT

Apollonian circle packings arise by repeatedly filling the interstices between mutually tan- gent with further tangent circles. In Euclidean space it is possible for every circle in such a packing to have integer radius of curvature, and we call such a packing an integral Apol- lonian circle packing. There are infinitely many different integral packings; these were studied in the paper [8]. Integral circle packings also exist in spherical and hyperbolic space, provided a suitable definition of curvature is used (see [10]) and again there are an infinite number of dif- ferent integral packings. This paper studies number-theoretic properties of such packings. This amounts to studying the orbits of a particular subgroup of the group of integral automorphs A of the indefinite quaternary quadratic form Q (w,x,y,z) = 2(w2+x2+y2+z2) (w+x+y+z)2. D − This subgroup, called the Apollonian group, acts on integer solutions QD(w,x,y,z)= k. This paper gives a reduction theory for orbits of acting on integer solutions to Q (w,x,y,z)= k A D valid for all integer k. It also classifies orbits for all k 0 (mod 4) in terms of an extra param- ≡ eter n and an auxiliary class group (depending on n and k), and studies congruence conditions on integers in a given orbit.

Keywords: Circle packings, Apollonian circles, Diophantine equations, Lorentz group AMS Subject Classification: 11H55

1. Introduction

A Descartes configuration is a set of four mutually touching circles with distinct tangents. A (Euclidean) Apollonian circle packing in the plane is constructed starting from a Descartes configuration by recursively adding circles tangent to three of the circles already constructed in the packing; see [10], [5], [6], and Figure 1. Apollonian packings can be completely described by the set of Descartes configurations they contain. The curvatures (a, b, c, d) of the circles in a Descartes configuration satisfy an algebraic relation called the Descartes circle theorem. Using the Descartes quadratic form

Q (a,b,c,d) := 2(a2 + b2 + c2 + d2) (a + b + c + d)2, (1.1) D − 182 182 114 146 146 114 86 86 131 62 62 131 186 42 42 186 150 75 75 150 26 143 143 26 171 171 90 90 87 87 194 194 35 182 182 35 107 66 66 107 158 158 111 14 14 111

122 122 131 131 47 47 147 147 98 98 98 98

167 167

170 59 59 170

191 191 -1 195 30 30 195 74 74 138 138 95 95 194 194 194 194 6 119 119 6 62 62 179 179 170 170 186 186 110 110 110 110

174 174 54 54 150 150 131 167 11 39 83 143 179 111 59 23 23 59 111 179 143 83 39 11 167 131 162 3 162 98 98 183 183 147 50 50 147 182 87 87 182 134 134 134 134 63 191 191 63 179 179 18 155 155 18 86 86

95 95 27 167 167 27 126 114 114 126 71 71 38 135 38 110 110 38 135 38 174 174

183 183 51 107 107 51 66 15 66 83 83 102 102 102 102

123 123 146 35 146 171 171

198 198 198 198 63

99

143

195

195 143 99 63 198 198 198 198 171 171 146 146 123 35 123 102 102 102 102 83 83 66 2 2 66 51 51 183 107 107 183

174 15 174

38 135 38 110 110 38 135 38 71 71 126 114 114 126 167 167 27 95 95 27

86 86 155 155 179 179 191 191 63 134 134 134 134 63 18 182 87 87 182 18 147 147 183 50 50 183 98 162 162 98 167 179 179 167 131 83 143 111 59 150 150 59 111 143 83 131 54 39 39 54 174 23 23 174 110 110 110 110

186 186 170 170 179 179 11 62 62 11 119 119

194 194 194 194 95 95 138 138 74 74 195 30 30 195 191 191

170 170

59 167 167 59 98 98 98 98 147 6 6 147 47 47 131 131 122 122

111 111 158 158 107 3 107 66 66 182 182 194 35 35 194 87 87 90 14 14 90 171 171

143 143 150 75 26 26 75 150 186 42 42 186 131 62 62 131 86 114 114 86 146 182 182 146

Figure 1: The Euclidean Apollonian circle packing ( 1,2,2,3) − the Descartes circle theorem states that

QD(a,b,c,d) = 0. (1.2)

Descartes originally stated this relation in another algebraic form; see [10]. In order to have this formula work in all cases, the curvatures of the circles in a Descartes configuration must be given proper signs, as specified in [10] and [5]. The form QD is an integral quadratic form in four variables, and the equation (1.2) has many integer solutions. If the initial Descartes configuration generating a (Euclidean) Apollonian packing has all four circles with integral curvatures, then it turns out that all the circles in the packing have integer curvatures. This integer structure was studied in the first paper in this series [8] using the action of a particular discrete subgroup of automorphisms of the Descartes quadratic form, which was there termed the Apollonian group . It is a group of integer A matrices, with generators explicitly given in 3. The Descartes configurations in a (Euclidean) § Apollonian packing are described by an orbit of the Apollonian group. That is, the Apollonian group acts on the column vector of curvatures of the initial Descartes configuration, and generates the curvature vectors of all Descartes configurations in the packing. This fact explains the preservation of integrality of the curvatures. The Apollonian group and its relevance for Apollonian packings was already noted in 1992 by S¨oderberg [19]. The first paper in this series [8] studied Diophantine properties of the curvatures in Eu- clidean integer Apollonian circle packings, based on the Apollonian group action. In [10] it was observed that there exist notions of integer Apollonian packings in spherical and hyperbolic geometry. These are based on analogues of the Descartes equation valid in these geometries, as

2 follows. In hyperbolic space, if the “curvature” of a circle with hyperbolic radius r is taken to be coth(r), then the modified Descartes equation for the “curvatures” of circles in a Descartes configuration is

QD(a,b,c,d) = 4. (1.3)

Similarly, in spherical space, if the “curvature” of a circle with spherical radius r is defined to be cot(r), then the modified Descartes equation is

Q (a,b,c,d)= 4. (1.4) D − There exist integral Apollonian packings in both these geometries, in the sense that the (spher- ical or hyperbolic) “curvatures” of all circles in the packing are integral; see the examples in Figures 2 and 3 below. Again, the vectors of “curvatures” of all Descartes configurations in such a packing form an orbit under the action of the Apollonian group. The purpose of this paper is to study Diophantine properties of the orbits of the Apollonian group acting on the integer solutions to the A

QD(a,b,c,d)= k, (1.5)

where k is a fixed integer. Integer solutions exist for k 0 or 3 (mod 4), and our results ≡ on reduction theory in 3 are proved in this generality. Our other results are established § under the more restrictive condition k 0 (mod 4), where we will always write k = 4m. ≡ These results cover the motivating cases k = 4 corresponding to spherical and hyperbolic ± Apollonian packings, as well as the Euclidean case k = 0. We note that the Apollonian group is a subgroup of infinite index in the group Aut(Q , Z) of all integer automorphs of the A D Descartes quadratic form QD. As a consequence, the integral solutions of QD(a,b,c,d) = k (for k 0 or 3 ( mod 4)) fall in an infinite number of orbits under the action of . In contrast, ≡ A these same integral points fall in a finite number of orbits under the full Aut(QD, Z)-action. In 2, we study the distribution of integer solutions to the equation Q (a,b,c,d) = 4m, § D determining asymptotics for the number of such solutions to these equations of size below a given bound. These asymptotics are obtained via a bijective correspondence between integral representations of integers 4m by the Descartes form and representations of integers 2m by the Lorentzian form Q (W,X,Y,Z) = W 2 + X2 + Y 2 + Z2, and then applying results of L − Ratcliffe and Tschantz [17] on integer solutions to the Lorentzian form. In 3, we describe the Apollonian group, and apply it to give a reduction algorithm for § quadruples v = (a,b,c,d) satisfying QD(v) = k in a fixed orbit of the Apollonian group, starting from an initial integer quadruple satisfying QD(v) = k. This reduction algorithm differs in appearance from that given in part I [8, Sect. 3], which treated the case k = 0; however we show its steps coincide with those of the earlier algorithm when k = 0. A quadruple obtained at the end of this algorithm is called a reduced quadruple. We classify reduced quadruples as two types, root quadruples and exceptional quadruples. We show that for each orbit containing a root quadruple, the root quadruple is the unique reduced quadruple in that orbit. For each fixed k we show that there are at most a finite number of orbits not containing a root quadruple. Each of these orbits contain at least one and at most finitely many reduced quadruples, each of which is by definition an exceptional quadruple. We show that such orbits can only occur when k > 0, and we call them exceptional orbits. Their existence is an interesting new phenomenon

3 221 221 145 181 181 145 290 113 113 290 202 85 85 202 269 130 61 61 130 269 185 41 208 208 41 185 250 149 74 74 149 250 136 136 224 224

277 25 25 277 170 170

233 233 89 234 234 89 201 201 272 80 80 272 193 193 34 165 165 34 106 65 65 106 157 208 208 157 218 218 289 273 104 13 13 104 273 289 210 210

200 200

224 105 105 224 114 114

274 274 205 40 40 205

146 241 241 146 250 250 97 81 81 97

136 136

169 58 205 205 58 169

184 184 0 194 29 29 194 73 234 234 73 137 224 224 137 221 249 249 221 88 216 216 88 177 145 145 177 5 88 88 5 45 45 130 130 281 121 121 281 185 184 184 185

109 93 250 250 93 109

125 125 53 205 205 53 101 101 130 160 10 245 32 66 112 170 192 130 80 42 16 16 42 80 130 192 170 112 66 32 245 10 160 130 241 193 113 2 113 193 241 81 218 218 81 152 152 245 197 98 33 181 181 33 98 197 245 165 165 178 56 56 178 117 200 85 85 200 117 56 120 120 56 178 161 161 178 138 138 17 256 256 17 85 85 256 256 205 205

261 261 186 186 88 88

213 133 133 213 265 26 96 96 26 265 125 65 65 125 298 125 125 298 40 160 160 40 273 121 121 273 128 61 61 128 37 122 21 21 122 37 173 173

152 152 176 58 58 176

50 113 113 50 229 229

232 232 65 8 65 293 293 82 82 106 106 101 53 53 101 122 136 18 136 122

101 101 32

50

72

98

128

128 98 72 50 32 101 101

136 18 136 101 53 53 101 106 106 82 82

293 293 65 65 232 232

229 229 1 113 113 1 50 58 58 50 176 152 152 176

173 8 173

122 122 37 128 21 21 128 37 273 61 121 121 61 273 160 160 298 40 125 125 40 298 125 65 65 125 265 96 96 265 213 133 133 213 88 88 26 186 186 26 261 261

205 205 256 256 85 256 256 85 138 138 178 161 161 178 120 120

56 117 200 85 85 200 117 56 178 178 17 165 56 56 165 17 245 197 98 181 181 98 197 245 152 152 81 218 33 33 218 81 241 193 113 113 193 241 160 245 170 192 130 130 192 170 245 160 130 66 112 80 42 101 101 42 80 112 66 130 53 32 205 205 32 53 125 125

250 16 16 250 109 93 93 109

185 184 184 185 121 121 281 130 130 281 10 45 45 10 88 88

177 145 145 177

216 216 221 249 88 88 249 221 137 224 224 137 73 234 234 73 194 29 29 194 184 184

169 205 205 169 58 136 136 58 97 81 81 97 250 250 241 241 146 5 5 146 205 205 274 40 40 274 114 114 224 105 105 224 200 200

210 210

289 273 273 289 218 104 104 218 157 157 106 208 2 208 106 65 65 165 165 193 34 34 193 272 80 80 272 201 201 234 234 233 89 13 13 89 233 170 170 277 277

224 224 136 136 250 149 74 25 25 74 149 250 185 208 208 185

269 41 41 269 130 61 61 130 202 85 85 202 290 113 113 290 145 181 181 145

Figure 2: The spherical Apollonian circle packing (0,1,1,2)

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 7 7 1 1 1 1 1 1 1 7 7 1 1 1 1

7 7 1 7 7 1 1 1 1 1 1 17 17 1 1 1

1 1 1 1 1 1 1 17 17 1 7 7 7 17 17 7 7 7 17 17 17 17 1 1 1 1 1 1 1 1

1 1 31 31 1 1 1 17 31 31 17 1 17 17 7 7 1 7 7 1 1 1 1 1 17 17 1 1 31 31 1 1 49 49 1 1 1 17 17 1 7 7 7 7 1 17 17 1 1 1 1 17 17 1 1 7 7 1 1 1 1 1 17 17 31 31

49 49 31 31

49 49 49 49 31 49 17 17 49 31

17 49 49 17 1 1 1 49 49 1 1 1 1 7 7 1

1 1 1 49 49 1 49 49

1 1 17 17 1 1

7 7 31 31 1 1 1 1 49 49 1 1 1 71 71 1

17 97 97 17 7 7 -1

17 17

1 1 1 1

1 31 31 1 1 1 17 17 1 1 7 7 17 17 1 7 7 1 97 97 1 17 7 7 17 1 1 71 71 1 1 1 17 49 49 17 31 31 49 31 31 49 97 97 1 97 97 1 127 17 17 127 1 127 127 1 1 49 49 1 49 97 49 49 97 49 1 31 97 97 31 1

1 17 49 49 17 1 1 1 7 49 97 97 49 7

127 49 49 127

49 49 97 97 1 97 97 1 1 17 97 97 17 1

49 49 49 49 1 7 17 7 7 17 31 49 71 97 127 97 71 49 31 17 145 7 145 127 127 145 7 145 17 31 49 71 97 127 97 71 49 31 17 7 7 17 7 1 1 97 97 1 1 17 49 97 97 49 17 1 97 97 1 127 49 49 127 1 97 1 97 17 49 49 17 145 145 31 31 161 161 49 97 49 97 97 49 97 49 71 17 17 71 31 127 127 31

17 49 49 17 97 31 161 161 31 97 49 49 49 49 1 31 31 1 161 161 1 17 49 49 17 1 7 49 71 71 49 7 1 49 97 97 49 1 127 127 17 49 161 161 49 17 1 31 31 1 1 49 49 1 7 7 1 1 1 1

17 31 31 17 17 17

7 199 199 7 161 161 127 127 1 17 97 97 17 1 1 1 31 71 71 31 1 161 161 1 1 49 49 1 7 7 97 199 199 97 1 161 161 1 31 127 127 31 17 17 97 161 161 97 17 17 7 49 49 7 97 97 17 145 145 17 199 199 1 1 17 17 1 1 1 1 1 1 17 145 145 17 127 127 7 49 49 7 17 17

1 1 97 97 1 1

1 161 161 1

7 7 1 7 1 1 1

7 7

1 161 161 1 1 97 97 1 7 7 1 49 145 145 49 1 1 1 7 7 127 127 1 241 241 1 1 17 1 1 1 199 199 1 97 97 1

241 241 1 1 1 31 1 1 1

1 161 161 1

1 1 1 49 1 1 1

1 241 241 1 71

97

127

161

199

241

241 199 161 127 97 71 1 241 241 1 1 1 1 1 1 49 1 1 161 161 1 1 1 1 1

1 241 31 241 1 1 97 97 1 199 199 1 1 1 1

241 241 1 127 127 1 7 17 7 1 1

1 49 145 145 49 1 7 7 1 97 97 1 1 161 161 1 7 7

1 1 1 1 7 7

1 161 161 1 1 1 97 97 1 1 1 17 49 49 17 1 7 127 127 7 17 145 145 17 1 1 1 7 1

1 1

199 199 17 145 145 17 97 97 1 7 17 49 49 17 7 1 17 17 97 161 161 97 17 17 127 127 1 161 161 1 31 97 199 199 97 31 7 7 1 1 49 161 161 49 1 31 71 71 31 1

1 17 97 97 17 1 127 127 161 161 199 199

7 17 17 7 1 31 31 1 17 17

1 1 1 1 7 7 49 49 1 31 31 1 17 49 161 161 49 17 127 127 1 49 97 97 49 1 49 71 71 49 1 1 161 161 1 7 17 31 49 49 31 17 7 1 49 49 49 49 97 161 161 97 17 49 31 31 49 17 31 31 1 127 127 1 71 97 97 71 49 161 97 49 49 97 161 49 31 31 145 145 49 49 97 17 17 97 1 1 17 97 127 49 49 127 97 17 1 17 49 97 97 97 97 49 17 1 7 17 71 97 127 97 145 145 127 127 145 145 97 127 97 71 17 7 7 49 49 71 49 49 71 49 49 7 1 31 31 49 49 31 31 1 17 17 97 97 17 17 1 97 17 17 97 1 97 97 1 7 49 49 7 1 127 49 49 127 7 49 97 97 49 7 1 1 49 7 7 49 1 17 17 1

1 31 97 97 31 1 49 97 49 49 97 49 1 49 49 1 1 127 127 1 1 127 17 17 127 1 97 97 97 97

49 31 31 49 31 31 17 49 49 17 1 1 1 71 71 1 1 1 17 97 97 17 7 7 7 7 17 17 1 7 7 1

1 17 17 1 1 31 31 1

1 1 1 1 1 1 17 17 7 7

17 97 97 17 1 71 71 1 1 49 49 1 1 1 1 31 31 1 7 7 1 1 17 17 1 1 49 49 49 49 1 1 1 1 1 1 1 1 1 1 1 49 49 1 1 1 7 49 49 7 17 17 31 49 49 31 49 49 17 17 49 49 31 31 49 49

31 31 17 17 1 1 1 1 1 17 17 1 1 7 7 1 17 17 1 7 7 7 7 1 17 17 1 49 1 49 1 31 31 1 1 1 1 17 17 1 1 1 1 1 1 1 1 7 7 7 7 17 17 17 31 31 17 1 1 1 1 31 31 1 1 1 1 1 1 1 1 1 1 17 17 17 17 7 7 7 7 7 17 17 7 1 1 1 1 17 17 1 1 1 1 1 1 1 1 17 17 1 1 7 7 1 1 1 7 7 1

1 1 1 1 1 1 1 7 7 1 1 1 1 7 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Figure 3: The hyperbolic Apollonian circle packing ( 1,1,1,1) −

4 uncovered in this work. They do occur in the hyperbolic Apollonian packing case k = 4, where we show there are exactly two exceptional orbits, labeled by the hyperbolic Descartes quadruples (0, 0, 0, 2) and ( 1, 0, 0, 1), respectively. We give a geometric interpretation of these − exceptional hyperbolic Apollonian packings. As examples, Figure 2 shows the spherical (k = 4) Apollonian packing with root quadruple − (0, 1, 1, 2), after stereographic projection. Figure 3 shows the hyperbolic (k = 4) Apollonian packing with root quadruple ( 1, 1, 1, 1), using the unit disc model of the hyperbolic plane. − For more on the geometry of Apollonian packings in spherical and hyperbolic space consult [10]. In 4, we count the number N (4m, n) of root quadruples a = (a,b,c,d) with Q (a)= § root − D 4m having smallest member a = n. We give a formula for this number in terms of the − class number of (not necessarily primitive) integral binary quadratic forms of discriminant 4(n2 m) under GL(2, Z)-equivalence. The class number interpretation applies only when − − n2 > m. For certain m > 0 there may exist root quadruples with parameters n2 m, ≤ and information on them is given in Theorem 3.3 in 3. For the hyperbolic case the only § value not covered is n = 1. Associated to it is an infinite family of distinct root quadruples − ( 1, 1,c,c) c 1 . Figure 3 pictures the Apollonian packing with root quadruple ( 1, 1, 1, 1). { − | ≥ } − The class number equivalence allows us to derive good upper bounds for the number of such root quadruples with smallest value a = n as n , namely − → ∞ N (4m, n)= O n(log n)(log log n)2 . root − If m = 1, then these bounds are interpretable as bounds on the integral spherical and ± hyperbolic packings with boundary an enclosing circle of (spherical or hyperbolic) curvature n. In 5 we investigate congruence restrictions on the integer curvatures which occur in a § packing, for the case of spherical and hyperbolic packings, i.e., k = 4. We show that there ± are always non-trivial congruence conditions modulo 12 on the set of integers that can occur in a given packing. It seems reasonable to expect that such congruence conditions can only involve powers of the primes 2 and 3 and that all sufficiently large integers which are not excluded by these congruence conditions actually occur. Various open problems are raised at the end of 4 and in 5. In addition, in the case of § § Euclidean Apollonian packings, it is known that there are Apollonian packings which have stronger integer properties, involving the centers of the circles as well as the curvatures. These were studied in Graham et al. [5], [6], and [7]. It remains to be seen if there are analogues of such properties (for circle centers) in the spherical and hyperbolic cases.

Acknowledgments. Much of this work was done while the authors were at AT&T Labs- Research, whom the authors thank for support. N. Eriksson was also supported by an NDSEG fellowship. The authors thank the reviewer for helpful comments.

2. Integral Descartes Quadruples

The Descartes quadratic form QD is the quaternary quadratic form

Q (w,x,y,z) = 2(w2 + x2 + y2 + z2) (w + x + y + z)2. (2.1) D −

5 Its matrix representation, for v =[w,x,y,z]T , is 1 1 1 1 − − − T T 1 1 1 1 QD(v)= v QDv = v − − −  v. 1 1 1 1 − − −  1 1 1 1  − − −  This form is indefinite with signature (+, +,+, ). We consider integral representations of an − integer k by this quaternary quadratic form. For an integer quadruple v = (w,x,y,z) Z4, ∈ Q (w,x,y,z) 0 or 3 (mod 4), according to the parity of w + x + y + z. We define the D ≡ Euclidean height H(v) of a (real) quadruple v = (w,x,y,z) to be H(v):=(w2 + x2 + y2 + z2)1/2. Notice that we reserve the usual notation, v , for another meaning in 3. | | § We relate integer representations of even k of the Descartes form to integer representations k of 2 of the Lorentz form Q (W,X,Y,Z)= W 2 + X2 + Y 2 + Z2. L − in Lemma 2.1 below. The relation only works for even k, so in this section we consider only the case k 0 (mod 4), so that ≡ QD(w,x,y,z)= k = 4m. (2.2) The Lorentz form has the matrix representation, for v =[W,X,Y,Z]T , 1000 − T 0 100 QL(v)= v   v. 0 010  0 001   The Descartes form and Lorentz form are related by  T 2QL = J0QDJ0 , (2.3) where 1 1 1 1 1 1 1 1 1 J0 =  − −  . 2 1 1 1 1 − −  1 1 1 1   − −  2   Notice that J0 = I. Let NL(k, T ) count the number of integer representations of k by the Lorentz form of Eu- clidean height at most T and let ND(k, T ) denote the number of solutions of (2.2) of Euclidean height at most T . T T Lemma 2.1. The mapping (W,X,Y,Z) = J0(w,x,y,z) gives a bijection between real so- lutions of Q (w,x,y,z) = 4r and real solutions of Q (W,X,Y,Z) = 2r for each r R, and D L ∈ this bijection preserves the Euclidean height of solutions. In the case where r = m Z this ∈ bijection restricts to a bijection between integer representations of 4m by the Descartes form and integer representations of 2m by the Lorentzian form. In particular, for all integers m,

ND(4m, T )= NL(2m, T ).

6 Proof. There is a bijection on the level of real numbers, by (2.3), since J0 is invertible, and 2 QD(w,x,y,z) = 4r if and only if QL(W,X,Y,Z) = 2r. A calculation using J0 = I shows that

H(w,x,y,z)= w2 + x2 + y2 + x2 = W 2 + X2 + Y 2 + Z2 = H(W,X,Y,Z).

Now suppose that r = m Z. The mapping takes integral solutions (w,x,y,z) to ∈ integral solutions (W,X,Y,Z) because all integral solutions of QD(w,x,y,z) = 4m satisfy w + x + y + z 0 (mod 2), as can be seen by reducing the Descartes equation (2.2) modulo ≡ 2. In the reverse direction integral solutions go to integral solutions because all solutions of Q (w,x,y,z) = 2m have W + X + Y + Z 0 (mod 2), similarly. 2 L ≡ Representation of integers by the Lorentz form has been much studied; see Radcliffe and Tschantz [17]. Their results immediately yield the following result.

Theorem 2.2. For each nonzero integer m, there is an explicitly computable rational number c(2m) such that

π 2 2 ND(4m, T )= c(2m) T + o(T ), (2.4) L(2, χ−4) in which ∞ ( 1)n L(2, χ )= − 0.9159. −4 (2n + 1)2 ≈ n=0 X We have c( 2) = 3 and c(2) = 5 . − 4 4

Proof. From Lemma 2.1 the problem of counting integral solutions to QD(w,x,y,z) = 4m of height at most T is equivalent to counting the number of integral solutions to QL(W,X,Y,Z)= 2m of Euclidean height at most T . We use asymptotic formulae of Radcliffe and Tschantz for the number r(n,k,T ) of solutions to the Lorentz form X2 +X2 + +X2 = k with X T , − 0 1 ··· n | 0|≤ for any n 2 for any fixed nonzero k. We take n = 3, and their formula for k < 0 in [17, ≥ Theorem 3, p. 505] is

Vol(S2) r(3,k,T )= δ(3, k)T 2 + O(T 3/2), (2.5) 2 in which Vol(S2) = π and δ(3, k) is a density constant for the representation in the sense of Siegel [18]. We need asymptotics for the number of solutions s(n,k,T ) to the Lorentz form QL(W,X,Y,Z)= k of Euclidean height below T , which is given by

1 s(n,k,T ) := r n,k, (T 2 k) . r2 − ! The asymptotic formula (2.5) yields

Vol(S2) s(3,k,T )= δ(3, 2m)T 2 + O(T 3/2). (2.6) 4

7 Their result [17, Theorem 12, p. 518] evaluates the constant δ(3, k) in terms of the value of an L-function, as

δ (3, k) 1 δ(3, k)= p , −4 −2 (1 ( p )p )! · L(2, χ−4) pY| k −

in which each δp(3, k) is an effectively computable local density which is a rational number. We now set k = 2m, and obtain a formula of the desired shape (2.4), with

1 δ (3, 2m) c(2m)= p . 4 (1 ( −4 )p−2) − p ! Radcliffe and Tschantz [17, Theorem 4, p. 510] also obtained an asymptotic formula for solutions to the Lorentz form with k > 0, which gives

Vol(S2) r(3,k,T )= δ(3, k)T 2 + o(T 2). 2 We derive a similar asymptotic formula for s(n,k,T ) (without explicit error term), by setting k = 2m, and proceeding as above. The particular values c( 2) = 3 and c(2) = 5 are derived from Table II in Radcliffe and − 4 4 Tschantz [17, p. 521], using k = 2. 2 ± Remarks. (1) The case k = 0 exhibits a significant difference from the pattern of Theo- rem 2.2. In [8, Theorem 2.1] it was shown that

2 1 π 2 2 ND(0, T )= T + O(T (log T ) ). 4 L(2, χ−4) π That is, the coefficient c(0) = 4 is transcendental. (2) Theorem 2.2 implies that the number of hyperbolic Descartes quadruples of Euclidean 5 height below T is asymptotically 3 the number of spherical Descartes quadruples of height below T , as T . That is, → ∞ N (4, T ) 5 lim D = . (2.7) T →∞ N ( 4, T ) 3 D − 3. Reduction Theory and Root Quadruples

The results of this section apply to the general case

QD(w,x,y,z)= k, (3.1) with k 0 or 3 (mod 4) an integer. We introduce the Apollonian group, and present a reduc- ≡ tion procedure which, given an integral Descartes quadruple, uses the action of the Apollonian group to transform it to a reduced quadruple, which is minimal according to a certain measure. The reduced quadruples then classify integral Apollonian circle packings, generally uniquely, but up to a finite ambiguity in some exceptional cases.

8 3.1. Apollonian Group

In [8] and [10] Apollonian circle packings were specified in terms of the set of Descartes con- figurations they contain. This set of configurations completely describes the packing, and it was observed there that, in a suitable coordinate system, they form as the orbit of any single Descartes configuration in the packing under the motion of a discrete group, the Apollonian group.

Definition 3.1. The Apollonian group = S , S , S , S is the subgroup of GL(4, Z) gen- A h 1 2 3 4i erated by the four integer 4 4 matrices × 1222 1 0 00 − 0 100 2 1 2 2 S1 =   , S2 =  −  , 0 010 0 0 10  0 001 0 0 01     10 0 0 100 0  01 0 0 010 0 S3 =   , S4 =   . 2 2 1 2 001 0 − 00 0 1 2 2 2 1    −      The Apollonian group is a subgroup of the integer automorphism group Aut(QD, Z) of the Descartes form under congruence, which is the largest subgroup of GL(4, Z) which leaves QD invariant; that is,

UT Q U = Q , for all U , (3.2) D D ∈A

a relation which needs only be checked on the four generators Si. In particular it preserves T the level sets QD(v)= k. It acts on all (real) Descartes quadruples v = (a,b,c,d) (viewed as column vectors) via matrix multiplication, sending v to Uv. The group Aut(QD, Z) is very large, and can be put in one-to-one correspondence with a finite index subgroup of the integer Lorentzian group O(3, 1, Z) (using the correspondence (2.3) in 2). The Apollonian group is of infinite index in Aut(Q , Z), and it has infinitely § A D many distinct integral orbits for each integer k 0 or 3 (mod 4), the values for which integral ≡ solutions exist. Geometrically, the generators S in correspond to inversions with respect to a circle i A passing through three intersection points in a Descartes configuration. This inversion gives a new Descartes configuration in the same packing, leaving three of the circles fixed; see [5, Section 2]. In particular the group can be viewed as acting on column vectors v =[a,b,c,d]T giving the “curvatures” in a Descartes configuration, converting it to the curvatures of another Descartes configuration in the packing. The generators Si allow us to move around inside the packing, from one Descartes configuration to a neighboring configuration. From (2.1) and (3.1) we see that if the curvatures a,b,c of three touching circles are given, then the curvatures of the two possible circles which are tangent to these three satisfy

d,d′ = a + b + c 4(ab + bc + ac)+ k. ± p

9 Therefore d + d′ = 2(a + b + c). If we begin with circles with curvatures a,b,c,d, the curvature d′of the other circle which touches the first three is

d′ = 2(a + b + c) d. − The Apollonian group action corresponding to this sends (a,b,c,d) to (a,b,c,d′), which is the action of S4. In particular, if we start with an integer quadruple, this procedure will only create other integer quadruples. This group is studied in Aharonov [1], Graham et al. [5], [6] and S¨oderberg [19].

Definition 3.2. An integral Descartes ensemble [v] is an orbit of the Apollonian group A A acting on an integral quadruple v = (w,x,y,z)T Z4. That is, [v] := Uv : U . ∈ A { ∈ A} All elements x [v ] are integer quadruples satisfying ∈A 0

QD(x)= QD(v0)= k.

We are most interested in the case L(v) := w + x + y + z 0 (mod 2), where k = 4m. For the ≡ cases m = 1, 1 such ensembles give the set of Descartes quadruples in an integral spherical − (resp. hyperbolic) Apollonian circle packing. This section addresses the problem of classifying the orbits of the Apollonian group acting on the set of all integral solutions QD(v)= k for a fixed value of k.

3.2. General Reduction Algorithm

We present a reduction procedure which, given an integral quadruple v0, finds an element of (locally) “minimal” size in the orbit [v ]. We will show that every orbit contains at least one A 0 and at most finitely many reduced elements. In most cases the “minimal” quadruple is unique and is independent of the starting point v0 of the reduction procedure, and this is the case for root quadruples defined below. However when k > 0 there sometimes exist exceptional integral Descartes ensembles containing more than one reduced element, and the outcome of the reduction procedure depends on its starting point in the orbit. We show that for each fixed k there are in total at most finitely many such exceptional orbits. The general reduction procedure given below greedily attempts to reduce the size of the T elements in a Descartes quadruple v := (a,b,c,d) by applying the generators Si to decrease the quantity

v := a + b + c + d . | | | | | | | | | | General reduction algorithm. Input: An integer quadruple (a, b, c, d). (1) Order the quadruple so that a b c d. Then test in order 1 i 4 whether some ≤ ≤ ≤ ≤ ≤ S decreases v := a + b + c + d . For the first S that does, apply it to produce a new i | | | | | | | | | | i quadruple, and continue. (2) If no S strictly decreases v , halt. Declare the result a reduced quadruple. i | |

10 This reduction procedure is slightly different from the reduction algorithm used in part I [8] for the case k = 0. The part I reduction procedure applied only to quadruples with L(a)= a + b + c + d> 0, and tried to decrease the invariant L(a)= a + b + c + d at each step, halting if this could not be done. Although the general reduction algorithm uses a different reduction rule, one can show in this case that it takes the identical sequence of steps as the reduction algorithm in part I; see the remark at the end of 3.3. Thus the general reduction § algorithm can be viewed as a strict generalization of the algorithm of [8]. We will classify reduced quadruples as either root quadruples or exceptional quadruples, as defined in the following theorem.

Theorem 3.1. The general reduction algorithm starting from any nonzero integer quadruple a = (a,b,c,d) always halts in a finite number of steps. Let the reduced quadruple at termination be ordered as a = (a,b,c,d) with a b c d. Suppose L(a) = a + b + c + d 0. Then ≤ ≤ ≤ ≥ exactly one of the following holds: (i) The quadruple a satisfies

a + b + c d> 0. (3.3) ≥ In this case we call a a root quadruple. (ii) The quadruple a satisfies

a + b + c 0 < d. (3.4) ≤ In this case we call a an exceptional quadruple. If a is a reduced quadruple such that L(a) < 0, then a∗ := ( d, c, b, a) is a reduced − − − − quadruple with L(a∗) > 0. We call such a a root quadruple (resp. exceptional quadruple) if and only if a∗ is a root quadruple (resp. exceptional quadruple).

Proof. The integer-valued invariant a := a + b + c + d strictly decreases at each step of | | | | | | | | | | the reduction algorithm. It is nonnegative, so the process stops after finitely many iterations. Now suppose that a is reduced and L(a)= a + b + c + d 0. We must show that (i) or (ii) ≥ holds. Now d> 0 because a is nonzero. The condition that a be reduced requires S a a , | 4 |≥| | and since S a = (a,b,c,d′) with d′ = 2(a + b + c) d, this condition is d′ d = d. Now 4 − | |≥| | d′ d gives a + b + c d which is (i), while d′ d gives a + b + c 0 which is (ii). 2 ≥ ≥ ≤− ≤ The definition of root quadruple formulated in Theorem 3.1 is not identical in form to the definition of root quadruple used in part I [8] for the case k = 4m = 0. However they are equivalent definitions, since the reduction algorithms take identical steps, as remarked above.

3.3. Root Quadruples

We first show that the reduction algorithm is well behaved for all orbits [v] containing a root A quadruple.

Theorem 3.2. Let [v] be a nonzero integer orbit of the Apollonian group, and suppose that A [v] contains a root quadruple a. Then: A

11 (1) The quadruple a is the unique reduced quadruple in [v]. A (2) All values L(x) for x [v] are nonzero and have the same sign. If this sign is positive, ∈A then the general reduction algorithm starting from any x [v] applies only S until the root ∈A 4 quadruple is reached.

Proof. It suffices to prove the result in the case when the root quadruple has L(a) = a+b+c+d 0, because the case L(a) < 0 can be treated using a∗. Without loss of generality ≥ we may reorder the quadruple a b c d (since is invariant under conjugation by ≤ ≤ ≤ A elements of the symmetric group on 4 letters, represented as permutation matrices). Now the root quadruple condition (3.3) yields

L(a)= a + b + c + d>a + b + c d> 0. (3.5) ≥ This implies that a + b d c 0, (3.6) ≥ − ≥ where the last inequality follows from the ordering.

Claim. Let b [v] be a Descartes quadruple and let P b = (w,x,y,z) be its coordinates ∈A σ permuted into increasing order w x y z. Then these coordinates satisfy: ≤ ≤ ≤ Property (P1): w + x 0. ≥ If b does not equal the given root quadruple a then these coordinates satisfy:

Property (P2): 0

To prove the claim, we observe that every quadruple b = a in [v] can be written as 6 A b = S S S a with each S S , S , S , S , for some k 1, and with S = S for ik ik−1 ··· i1 ij ∈ { 1 2 3 4} ≥ ij 6 ij−1 2 j k, since all S2 = I. We proceed by induction on the number of multiplications k. ≤ ≤ i The case k = 0 is the root quadruple a, which satisfies property (P1) by (3.6). For the base case k = 1 we must verify that properties (P1) and (P2) hold for S a for 1 j 4, where a j ≤ ≤ is the given root quadruple. Without loss of generality we may assume a = (a,b,c,d) has the ordering a b c d; a permutation of a merely permutes the four values Sja. Consider ≤ ′ ≤ ≤ first S1a = (a ,b,c,d). We assert that the ordering of the elements of S1a is

b c d

a′ := 2(b + c + d) a = (b + c + d) + (b + c + d a) > b + c + d. (3.8) − − This inequality holds since b a 0 from the ordering while d> 0 and c 0 from (3.5). This − ≥ ≥ yields a′ > b + c + d (a + b)+ d d, which establishes (3.7). Property (P1) for S a asserts ≥ ≥ 1 that b + c 0, and this holds by (3.6). Property (P2) for S a asserts that 0 < b + c + d 0, using both (3.5) and (3.6), ≥ while the right inequality follows from (3.8). This proves the base case for S1a. The proofs

12 of the base cases Sja for j = 2, 3 are essentially the same as for S1a. In these cases the one ′ curvature that changes becomes strictly larger than d. Finally we treat S4a = (a,b,c,d ). The ordering that holds here is

a b c d′. ≤ ≤ ≤ Indeed we have

d′ = 2(a + b + c) d = (a + b + c) + (a + b + c d) a + b + c d, (3.9) − − ≥ ≥ by (3.5). If d = d′ we stay at the root quadruple, so we may assume d′ > d in what follows. Property (P1) for S a asserts a + b 0, and this holds by (3.6). Property (P2) for S a asserts 4 ≥ 4 0 < a + b + c d we must have a + b + c>d. Using this fact, we see that the inequalities in (3.9) are both strict, which gives the right inequality a + b + c 0 holds by (3.5). Thus properties (P1) and (P2) hold for S4a as well, or else we stay at the root quadruple. This verifies (P1) and (P2) in all cases, and shows that if b = S a = a, then the largest coordinate j 6 in b is unique and is the coordinate in the j-th position. For the induction step, for k + 1 given k, we suppose that b = S S S a with b = a, ik ik−1 ··· i1 6 k 1, and we include in the induction hypothesis the assertion that the largest coordinate of ≥ ′ b is unique and occurs in the ik-th coordinate position. Let b = (w,x,y,z)= Pσb denote its rearrangement in increasing order w x y z, where P isa4 4 permutation matrix. The ≤ ≤ ≤ σ × induction hypothesis asserts that (P1) and (P2) hold for b′, together with the strict inequality ′ y

corresponds to choosing Sik+1 = Sik . Indeed S4 changes the largest coordinate, which Sik did −1 at the previous step by the induction hypothesis, so that Sik+1 := Pσ S4Pσ = Sik . The first ′ ′ case is S1b = (w ,x,y,z). We assert that

x y zx + y + z, − − since property (P2) for b′ gives x + y + z>w + 2x + 2y w. Next property (P1) for b′ gives ≥ x + y + z (w + x)+ z z > y 0, ≥ ≥ ≥ whence w′ > x + y + z z and (3.10) follows. Property (P1) for S b′ asserts x + y 0, ≥ 1 ≥ which holds since x + y w + x 0, using Property (P1) for b′. Property (P2) for S b′ ≥ ≥ 1 asserts 0 < x + y + z

w y zz. Now x′ = 2(w+y+z) x = (w+y+z)+(w+y+z x) >w+y+z − − since property (P2) for b′ gives w + y + z > 2w + x + 2y x. Next w + y w + x 0 holds ≥ ≥ ≥

13 by property (P1) of b′, so w + y + z z > 0 whence x′ >z, and (3.11) follows. Property (P1) ≥ for S b′ now asserts w + y 0, which holds since w + y + z z. Property (P2) for S b′ now 2 ≥ ≥ 2 asserts 0 < w + y + z 0. Thus all quadruples in the packing have L(b) > 0. We ′ ′ next show b is not reduced. Indeed property (P2) gives S4b = (w,x,y,z ) with 0 < z = 2(w + x + y) z

For QD(a) = k with k fixed there are infinitely many distinct root quadruples. The next result determines various of their properties.

Theorem 3.3. (1) Any root quadruple a = (a,b,c,d) with Q (a)= k and a b c d and D ≤ ≤ ≤ L(a) > 0 satisfies

0 b c d. (3.12) ≤ ≤ ≤ In addition, if k > 0, then

a< 0, (3.13) and if k 0 then ≤ a k . (3.14) ≤ | | (2) For each pair of integers (k, n) therep are only finitely many root quadruples a with − Q (a) = k and a = n, with the exception of those pairs (k, n) = (4l2, l) with l 0. In D − − − ≥ each latter case there is an infinite family of root quadruples ( l,l,c,c): c max(l, 1) . { − ≥ } Proof. (1) The condition (3.3) implies a + b d c 0, so that b 0, and the ordering ≥ − ≥ ≥ gives (3.12). We view the Descartes equation QD(a) = k as a quadratic equation in a, and solving it gives

a = b + c + d 4(bc + bd + cd)+ k ± The ordering and (3.12) give a b b + cp+ d, which shows that the minus sign must be taken ≤ ≤ in the square root, and

a = b + c + d 4(bc + bd + cd)+ k (3.15) − p

14 Using (3.3) we have

2(bc + bd + cd) = (bc + d(b + c)) + (bc + bd + cd) (b2 + d(d a) + (bc + bd + c2) ≥ − = b2 + c2 + d2 +[bc + d(b a)], − which gives

4(bc + bd + cd) (b + c + d)2 +[bc + d(b a)]. ≥ − As a consequence (3.15) yields

a (b + c + d) (b + c + d)2 + k. (3.16) ≤ − For k > 0 this immediately gives p

a b + c + d (b + c + d)2 + 1 < 0, ≤ − which is (3.13). p For k 0 we must have w := b + c + d k so that the square root above is real, whence ≤ ≥ | | (3.16) gives p a max [w w2 + k]= k , ≤ w≥√|k| − | | p p which is (3.14). Indeed the function f(w)= w √w2 + k on this domain is maximized at its − left endpoint w = k , since | | p w f ′(w) = 1 < 0 for w> k . − √w2 + k | | p Root quadruples with a> 0 do occur for some negative k. For example v = (2, 3, 4, 7) is a root quadruple for k = Q (v)= 96. D − (2) We take the values Q (a) = k and a = n as fixed. To show finiteness, it suffices to D − bound c above, in terms of k and n. The conditions a + b + c d and 0 b c d yield ≥ ≤ ≤ ≤ 0 d 3c, 0 b c and 2c a c. ≤ ≤ ≤ ≤ − ≤ ≤ We have d = a + b + c x for some x 0, and substituting this in (3.15) gives − ≥ a = a + 2b + 2c x 4(b + c)(a + b + c x) + 4bc + k. − − − This simplifies to p

0 = 2b + 2c + x (2b + 2c x)2 + ( x2 + 4ab + 4ac + 4bc + k), − − − so we must have p

x2 = 4ab + 4ac + 4bc + k. (3.17)

Now d c + (a + b x) c gives ≥ − ≥ a + b x 0. ≥ ≥

15 Squaring the left inequality and rearranging gives a2 + 2ab + b2 x2 = 4ab + 4ac + 4bc + k, ≥ which yields

(a b)2 4(a + b)c + k (3.18) − ≥ We have c b 0, and holding a and k fixed and letting b grow, one sees that the right side ≥ ≥ grows at least as fast as 4b2 while the left side grows like b2, so one concludes that b is bounded above. One can now check that (3.18) implies

b 3 a + k . ≤ | | | | This bound shows that the left side of (3.18) is bounded above, yielding

4(a + b)c (4 a )2 + k . ≤ | | | | We have a + b x 0, and whenever a + b > 0 then this inequality bounds c above, with ≥ ≥ c ( a )2 + k , as was required. ≤ | | | | There remains the case a+b = x = 0. Letting a = l, we have b = l and d = a+b+c x = c. − − Thus we have the quadruple a = ( l,l,c,c) with the requirement c l 0. All of these are − ≥ ≥ root quadruples except for l = c = 0 which gives the excluded value (0, 0, 0, 0). Here Q(a) = 4l2, and for each l 0 we obtain the given infinite family of root quadruples. 2 ≥ Remark. For k 0 the upper bound a k in Theorem 3.3(1) is not sharp in general. For ≥ ≤ | | the case k = 4 of spherical root quadruples, this upper bound gives a 2, but all spherical − p ≤ root quadruples satisfy the stronger bound a 0. To see this, observe that a = 2 can only ≤ hold with b + c + d = 2 in (3.16), and since b c d are nonnegative integers we must have ≤ ≤ b 0 so a 0, a contradiction. Similarly a = 1 gives 1 b + c + d 5 in (3.16), with the ≤ ≤ ≤ ≤ 2 same contradiction. The case k = 0 does occur with the spherical root quadruple (0, 1, 1, 2) pictured in Figure 2.

Remark. We conclude this subsection by showing that the notions of reduction algorithm and root quadruple used here agree for k = 0 with those used in part I [8]. The part I reduction procedure applied only to quadruples with L(a) = a + b + c + d > 0, and tried to greedily decrease the invariant L(a) = a + b + c + d at each step, halting if this could not be done. Although the general reduction algorithm uses a different reduction rule, in this special case it takes the identical series of steps as the reduction algorithm in part I, so defines the identical notion of root quadruple. Indeed, suppose k = 0 and L(a) > 0. We will need a result from Theorem 3.4(3) below, which shows that there are no exceptional quadruples for k = 0. so the general reduction algorithm always halts at a root quadruple. Comparing Theorem 3.2(2) with Lemma 3.1 (iii) of [5] shows all the steps are identical. Namely, after reordering the curvatures in increasing order, both algorithms always apply S4. Finally we check that the halting rules coincide, i.e., that a is minimized where L(a) is minimized. For | | both algorithms the minimal element in a root quadruple is non-positive, with the other three elements nonnegative (see Theorem 3.3(1) and [5, Lemma 3.1(3)]). Furthermore the first non- positive element encountered in either algorithm is never changed subsequently. Since the two algorithms coincide up to this point, and afterwards the two invariants remain in the fixed relation a = L(a) + 2 a , for fixed a , their halting criteria coincide. | | | | | |

16 3.4. Exceptional Quadruples

We next consider orbits [v] that contain exceptional quadruples. A Theorem 3.4. Let [v] be a nonzero integer orbit of the Apollonian group. A (1) If [v] contains an exceptional quadruple, then it contains elements v , v with L(v ) > A 1 2 1 0 and L(v2) < 0. (2) There can be more than one exceptional quadruple in [v]. A (3) Exceptional quadruples can exist only for k 1. For each k 1 there are only finitely ≥ ≥ many exceptional quadruples with Q (a)= k, all with H(a)2 2k2. D ≤ Proof. (1) Let a = (a,b,c,d) be an exceptional quadruple in [v], with a b c d. It A ≤ ≤ ≤ suffices to treat the case L(a)= a + b + c + d 0, since we can otherwise apply the argument ≥ to a∗. Now Theorem 3.1 gives a + b + c 0 and d > 0. Take v = S a = (a′,b,c,d)T and ≤ 1 1 L(v ) = 3(a + b + c + d) 4a> 0 if a< 0, while if a = 0 then a = b = c = 0 and so d> 0 and 1 − L(v ) > 0 in this case. Next, take v = S a = (a,b,c,d′). Then L(v ) = 3(a + b + c) d< 0 1 2 4 2 − if d> 0, while if d = 0 then a = b = c = d = 0, a contradiction. (2) The quadruple a = ( 2, 3, 5, 12) with a = 22 and Q (a) = k = 360 is an ex- − − − | | D ceptional quadruple. Its neighbors are ( 2, 3, 5, 32), ( 2, 3, 9, 12), ( 2, 7, 5, 12), and − − − − − − − − (6, 3, 5, 12). Now ( 2, 3, 9, 12) has a neighbor b = ( 2, 3, 9, 4) which is also an excep- − − − − − − − tional quadruple. (3) Let k be fixed. Let a = (a,b,c,d) be an exceptional quadruple ordered with a b ≤ ≤ c d. By hypothesis ≤ S (a) 2 a 2 for 1 j 4. (3.19) | j | ≥| | ≤ ≤ We will show that necessarily k 1 and that ≥ H(a)2 = a2 + b2 + c2 + d2 2k2. (3.20) ≤ The minimality property (3.19) and the bound (3.20) are both invariant under reversing all signs, so by multiplying by 1 if necessary we may suppose that L(a)= a+b+c+d 0 without − ≥ loss of generality. Since (a,b,c,d) = (0, 0, 0, 0) we have d > 0. The condition S a 2 a 2 6 | 4 | ≥ | | requires that either (i) a+b+c d or (ii) a+b+c 0. By Theorem 3.1 exceptional quadruples ≥ ≤ correspond to case (ii), and those with L(a) > 0 are characterized by the condition

d> 0 a + b + c. ≥ This condition necessarily implies a 0. We consider three exhaustive cases. In each case, ≤ we change notation so that a,b,c are nonnegative; for example, if a 0 b c d, then we ≤ ≤ ≤ ≤ multiply a by 1 so that a = ( a,b,c,d). − − Case 1. a b c 0 < d. − ≤− ≤− ≤ We have

k = Q (a) = a2 + b2 + c2 + d2 2ab 2ac 2bc + 2ad + 2bd + 2cd D − − − = a2 + b2 + c2 + d2 + 2b(d a) + 2a(d c) + 2c(d b) − − − a2 + b2 + c2 + d2 = H(a)2. ≥

17 Since a = (0, 0, 0, 0) we infer k 1, and also (3.20) holds in this case. 6 ≥ Case 2. a b 0 c d. − ≤− ≤ ≤ ≤ We have

k = Q (a) = a2 + b2 + c2 + d2 2ab + 2ac + 2bc + 2ad + 2bd 2cd D − − = (a b)2 + (c d)2 + 2ac + 2bc + 2ad + 2bd. − − Every term on the right is nonnegative, which implies k 0. This gives the additional ≥ information (since a b and d c) that ≥ ≥ b a b + √k and c d c + √k. ≤ ≤ ≤ ≤ k k as well as ac,bc,ad,bd 2 . If either of a, b is nonzero then each of c,d is at most 2 . Similarly ≤ k if either of c,d are nonzero then a, b are at most 2 . Now suppose both a = 0 and b = 0. Then k = (c d)2, and there is a reduction step that takes (0, 0,c,d) (0, 0,c, 2c d), whence − 7→ − 2c d d, so that either c = d, or c = 0. The case c = d gives a root quadruple, which is | − | ≥ excluded, and in the remaining case (0, 0, 0,d) we have k = d2 > 0, and then c,d √k, and in ≤ all these subcases

H(a)2 = a2 + b2 + c2 + d2 k2 ≤ holds. The argument if c = d = 0 is similar. In all these cases we infer that k > 0, and that (3.20) holds. Case 3. a 0 b c d. − ≤ ≤ ≤ ≤ We have

k = Q (a) = a2 + b2 + c2 + d2 + 2ab + 2ac 2bc + 2ad 2bd 2cd D − − − = (a + b)2 + (c d)2 + 2(a b)(c + d) (3.21) − − In the exceptional case we must have a + b + c 0, so that a b + c. This gives a b, − ≤ ≥ ≥ whence all terms on the right side of (3.21) are nonnegative, and one is strictly positive so k > 0. Also (3.21) gives a, b √k, and using a b + c it also gives ≤ ≥ k (c d)2 + 2c(c + d) 3c2 + d2. ≥ − ≥ It follows that

H(a)2 = a2 + b2 + c2 + d2 2k 2k2, ≤ ≤ and (3.20) holds. 2

On comparing Theorem 3.3 and Theorem 3.4 we see that: An integer Apollonian group orbit [v] contains an exceptional quadruple if and only if it contains quadruples with L(x ) > 0 A 1 and L(x2) < 0. We conclude this section by determining the exceptional quadruples for spherical and hyper- bolic Apollonian packings, i.e., for k = 4. There are no exceptional quadruples for spherical ± packings (k = 4) by Theorem 3.4 (3), so we need only treat the hyperbolic case. −

18 Theorem 3.5. For k = 4 the exceptional orbits [v] are exactly those containing an element A that has a zero coordinate. There are exactly two such orbits, one containing two exceptional quadruples (0, 0, 0, 2), and the other containing the exceptional quadruple ( 1, 0, 0, 1). ± − Proof. By Theorem 3.2(3), there are finitely many exceptional quadruples for k = 4. From (3.20), we see that if (a,b,c,d) is an exceptional quadruple, then a2 + b2 + c2 + d2 32. A ≤ computer search shows that there are exactly 7 quadruples with a b c d satisfying this ≤ ≤ ≤ bound along with a + b + c + d 0. They are ≥ ( 1, 0, 0, 1), (0, 0, 0, 2), ( 1, 1, 1, 1), ( 1, 1, 2, 2), ( 1, 1, 3, 3), (0, 0, 1, 3), (0, 0, 2, 4) . { − − − − } It is easy to check that the first five are all reduced while the last two are not. Furthermore, the third, fourth and fifth quadruples are root quadruples, so may be discarded. Thus only ( 1, 0, 0, 1), (0, 0, 0, 2) remain, and these are exceptional. The orbit of (0, 0, 0, 2) also contains − the reduced quadruple ( 2, 0, 0, 0); see Figure 4. The packing with exceptional quadruple − ( 1, 0, 0, 1) is shown in Figure 5. − If fact, if [v] does contain a circle of curvature 0, then it necessarily contains an exceptional A quadruple. Setting a = 0, the orbit contains a integer quadruple (0,b,c,d) with

F (b,c,d) := b2 + c2 + d2 2(bc + bd + cd) = 4. (3.22) − Without loss of generality, assume that the elements are ordered b c d and that b 0. | |≤| |≤| | ≤ We claim that necessarily b = 0. Case 1. b 0, c> 0, d> 0. ≤ Now

f(b,c,d) = b2 + c2 + d2 + 2 bc + 2 bd 2 cd | | | |− | | = b2 + (c d)2 + 2 bc + 2 bd − | | | | If b 1, then c , d 1 also and F (b,c,d) 12 +02 +2+2 = 5 which gives us a contradiction. | |≥ | | | |≥ ≥ So we must have b = 0. Case 2. b 0, c 0, d> 0. ≤ ≤ Here b c d gives bd > bc , so | |≤| |≤| | | | | | F (b,c,d) = b2 + c2 + d2 + 2 bd + 2 cd 2 bc | | | |− | | b2 + c2 + d2 + 2 cd ≥ | | If b 1, then so are c and d , so F (b,c,d) 5, a contradiction. Thus b = 0. | |≥ | | | | ≥ Case 3. b,c,d 0. ≤ First, apply the reduction algorithm to (0,b,c,d). Notice that the first coordinate always stays 0 because S1 can never make it any smaller. The algorithm halts when S4 can no longer reduce b + c + d , that is, when d′ d . Combining this with d + d′ = 2(b + c), we get d > b + c . | | | | | | | |≥| | | | | | Therefore

b2 + c2 + d2 b2 + c2 + (b + c)2 = 2b2 + 2bc + 2c2. ≤ Since bc,bd,cd 0, we have bc + bd + cd b 2 + bc + c 2. Thus, ≥ ≥| | | | | | F (b,c,d)= b2 + c2 + d2 2(bc + bd + bd) 0 − ≤

19 and hence cannot satisfy (3.22), a contradiction. So there are no solutions in this case. The claim b = 0 is proved, so any quadruple with one element zero is contained in the same packing as some (0, 0,c,d). Now solve 2(c2 + d2) = (c + d)2 + 4 and we see that we must have (0, 0,c,d) = (0, 0,n,n + 2) for some n Z. Reduction by the Apollonian group ∈ changes (0, 0,n,n + 2) (0, 0,n,n 2), and therefore there are only two packings containing → − a curvature zero circle, those are the packing containing (0, 0, 0, 2) and the packing containing ( 1, 0, 0, 1). 2 − To understand the geometric nature of the exceptional hyperbolic packings, we identify the real hyperbolic plane H with the interior of the unit disk, with ideal boundary the circle of radius 1 centered at the origin. Recall that the curvature of a hyperbolic circle is given by coth r, where r is the hyperbolic radius of the circle. For circles contained in the real hyperbolic plane, r is positive and er + e−r coth r = 1 er e−r ≥ − with equality if and only if r = . However we will allow hyperbolic Apollonian circle packings ∞ which lie in the entire plane. We have a second copy of the hyperbolic plane which is the exterior of the closed unit disk, and we use the convention that (positively oriented) circles entirely contained in the exterior region have the sign of their curvature reversed, in which case coth r ranges from 1 to . Euclidean circles that intersect the ideal boundary (unit circle) are − −∞ treated as hyperbolic circles of pure imaginary radius, and these cover the remaining range 1 coth r 1. A hyperbolic circle of curvature 0 is a hyperbolic geodesic, which corresponds − ≤ ≤ to a Euclidean circle which intersects the ideal boundary (unit circle) at right , and a hyperbolic circle of curvature 1 is a horocycle, i.e., a circle tangent to the ideal boundary. The two exceptional integral hyperbolic packings are pictured in Figures 4 and 5, respec- tively. The pictures are not drawn to the same scale; in each one the dotted circle represents the ideal boundary of hyperbolic space, and is not a circle belonging to the packing. The hyperbolic packing (0, 0, 0, 2) contains exactly three circles assigned hyperbolic curvature zero, while the hyperbolic packing ( 1, 0, 0, 1) contains infinitely many circles assigned hyperbolic − curvature zero.

4. Distribution of Integer Root Quadruples

In this section we restrict to the case k = 4m. We enumerate root quadruples v = (w,x,y,z), and without essential loss of generality we only consider such quadruples with L(v) = w + x + y + z > 0. The root quadruples are classified according to the size of their minimal element, say w = n, where we suppose n> 0. In the spherical and hyperbolic cases k = 4 − ± this corresponds geometrically to characterizing the distinct integral Apollonian packings that have an outer enclosing circle of signed curvature n. − Definition 4.1. Let Nroot(k; n) count the number of integer root quadruples v = (w,x,y,z) − to Q (v)= k with L(v)= w + x + y + z > 0 and w = n. D − In [8, Sec. 4] the number N (0, n) of Euclidean root quadruples was interpreted as a root − class number for binary quadratic forms under a GL(2, Z) action. This interpretation was dis- covered starting from an exact formula for the number of (Euclidean) root quadruples having

20 -840 -840 -684-760 -760-684 -544-612 -612-544 -420-480 -480-420 -312-364 -364-312 -804 -264 -264 -804 -652 -220 -220 -652 -516 -516 -180-798 -798-180 -852 -852 -396 -144-646 -646-144 -396 -696 -696 -624-292 -112-510 -510-112 -292-624 -492 -84 -390 -390 -84 -492 -744-432-204 -204-432-744 -606 -286-680 -680-286 -606 -600 -600 -60 -608 -608 -60 -324 -324

-796 -796 -596 -596 -472-276 -476 -476 -276-472 -720 -132 -198 -198 -132 -720

-390 -416 -416 -390 -776 -776 -714 -714

-852 -40 -40 -852 -580 -580 -360 -360

-516-192 -380 -570 -570 -380 -192-516 -308 -308 -582 -126 -126 -582 -456 -456 -260 -260 -832 -76 -76 -832 -156 -442 -442 -156 -632 -632 -264 -486 -672 -672 -486 -264 -400 -400 -564 -564 -756 -596-222 -222-596 -756 -440 -24 -24 -440 -730 -730

-532 -532 -330 -330 -426 -540 -540 -426 -600 -600 -816 -176 -176 -816 -616 -212 -212 -616

-444 -564 -468 -468 -564 -444 -300 -70 -70 -300

-552-184 -184-552 -444 -408 -408 -444 -582 -140 -140 -582 -672 -672 -2 -234 -234 -256 -96 -96 -256 -352 -352 -492 -774 -752 -752 -774 -492 -804 -804 -494 -494 -286 -286

-572 -572

-732 -732 -436 -436

-216 -586 -586 -216 -544 -544 -646 -296 -12 -12 -296 -646 -36 -374 -374 -36 -252 -252

-796 -624 -624 -796 -656 -102 -492-154 -154-492 -102 -656 -384 -272 -272 -384 -522 -200 -456 -456 -200 -522 -72 -222-452 -600 -600 -452-222 -72 -330 -330 -492 -492 -560 -244 -244 -560 -492 -80 -80 -492 -600-120-390 -390-120-600 -208 -208 -470 -264 -264 -470 -312 -396 -396 -312 -180-606 -186 -92 -92 -186 -606-180 -252 -252 -240 -240 -336 -336 -456 -30 -30 -456 -432 -432 -540 -340 -340 -540 -660 -168 -168 -660 -792 -792 -372 -372 -180 -180 -56 -56

-288 -288 -300 -300 -90 -90

-132 -132

-182 -182

-240 -240

-306 -306

-792 -792 -660 -660 -540 -540 -432 -432 -336 -336 -252 -252 -180 -180 -210 -210 -600 -600 -606 -156 -156 -606 -110 -110 -120 -72 -72 -120 -384 -224 -224 -384 -236 -236 -796 -390 -390 -796 -42 -42 -120 -120 -132 -132

-544 -72 -72 -544 -560 -560

-216-646 -656-222 -222-656 -646-216 -130 -130 -452 -162 -20 -20 -162 -452 -436 -436 -732 -732 -148 -48 -48 -148 -60 -168 -168 -60 -88 -88 -120 -140 -140 -120 -200 0 -200

-522 -522 -804 -4 -4 -804 -272 -272 -492 -492 -104 -104 -36 -200 -200 -36 -256 -120 -60 -60 -120 -256 -774 -774 -672 -102-600 -600-102 -672 -296 -60 -60 -296 -586 -162 -28 -28 -162 -586 -624-200 -200-624 -168 -66 -66 -168 -330 -84 -84 -330 -572 -572 -286 -492 -492 -286 -96 -752 -6 -6 -752 -96 -552 -552 -132 -132 -148 -78 -78 -148 -582 -20 -84 -36 -36 -84 -20 -582 -184 -236 -48 -48 -236 -184 -42 -130 -88 -140 -8 -8 -140 -88 -130 -42 -120 -28 -28 -120 -470 -72 -104 -60 -60 -104 -72 -470 -300 -312 -110 -224 -66 -66 -224 -110 -312 -300 -156 -44 -44 -156 -210 -210 -444 -186 -78 -36 -10 -10 -36 -78 -186 -444 -616 -616 -44 -12 -12 -44 -816 -92 -240-456 -14 -14 -456-240 -92 -816 -372 -16 -16 -372 -306 -306 -180 -300 -182-240 -18 -18 -240-182 -300 -180 -264 -132 -20 -20 -132 -264 -90 -22 -22 -90 -56 -288 -288 -56

-168 -168 -30 -340 -340 -30 -492 -492 -244 -244

-756 -396 18 18 -396 -756 -208 16 16 -208 -564 14 14 -564 -80 12 12 -80 -492 -492 -400 10 36 36 10 -400 -154-456 28 28 -456-154 -264 36 36 -264 8 48 48 8 -252 42 42 -252 -832 20 20 -832 -374 56 56 -374 28 30 30 28 -12 40 60 60 40 -12 -156 6 24 24 6 -156 -486 12 12 -486

-456 48 48 -456 20 36 36 20

42 42 -596 4 4 -596 -494 -494 -222-440 -440-222 -76 -730 -352 -352 -730 -76 -632 -632 -516 -234 56 36 36 56 -234 -516 -444 30 30 -444 -426 -564 -564 -426 -582 -140 -140 -582 -192 -212 12 12 -212 -192 -600 -408 -408 -600 -360 -70 24 24 -70 -360 -580 40 40 -580

-852 60 60 -852 -540 -540 -468 -468 -176 -176

-330 2 -330 -532 -532

60 60 40 40 -720 -24 24 24 -24 -720 -472 -472 36 36 -276 12 12 -276 -672 -672 -796 -442 -442 -796 30 30 -260 -260 -132-390-776 56 56 -776-390-132 -380-126 -126-380 -324 4 -324 -600 -308 -308 -600 42 42 -570 -570 20 20 -40 48 6 48 -40 -744 28 28 -744 -714 -714 -432 -416 8 -416 -432 -204-606 -596-198 -198-596 -606-204 36 36

-492 -476 10 -476 -492

12

14 -60 16 -60 18 -608 -608 -624 -624 -292 -286 -286 -292 -680 -680 -696 -696 -84 -84

-852 -390 -390 -852 -396 -396 -112 -112

-510 -510 -516 -516

-144 -22 -144 -20 -646 -646 -652 -18 -652 -180 -16 -180 -798 -798 -804 -14 -804 -220 -220

-264 -12 -264 -44 -44 -312 -312 -364 -10 -364 -420 -420 -36 -36 -480 -78 -78 -480 -544 -544 -612 -612 -684 -684 -760 -760 -840 -840 -66 -8 -66

-28 -84 -84 -28 -60 -60 -104 -104

-140 -140 -88 -88 -48 -48 0 -130 -130 0 -148 -6 -148

-168 -168 -120 -20 -20 -120 -60 -120-200 -200-120 -60 -162 -162 -224 -42 -132 -132 -42 -224

-840 -72 -236 -236 -72 -840 -760 -760 -684 -110 -110 -684 -612 -156 -156 -612 -544 -210 -210 -544 -480 -480 -420 -420 -364 -364 -312 -312 -264 -264

-220-798 -798-220 -306 -306 -804 -240 -240 -804 -180-646 -182 -182 -646-180 -132 -132 -652 -652 -144-510 -510-144 -288 -90 -90 -288

-516 -390 -300 -300 -390 -516 -112 -340-168 -56 -56 -168-340 -112 -680 -680

-608 -608 -396 -286 -396 -396 -286 -396 -852 -208 -180 -180 -208 -852 -84 -372 -372 -84 -476 -456 -456 -476 -416-714 -374-252-154 -80 -80 -154-252-374 -714-416 -696 -198 -198 -696 -292 -492 -492 -292 -596 -570 -244 -244 -570 -596 -494 -30 -30 -494 -624 -308 -352 -492 -492 -352 -308 -624 -672 -672 -442 -408 -234 -234 -408 -442 -60 -260 -532 -468 -456 -456 -468 -532 -260 -60 -330 -330 -126 -176 -140 -240 -240 -140 -176 -126 -606 -606 -540 -444 -264 -264 -444 -540 -380 -380 -492-204 -70 -92 -92 -70 -204-492

-432 -432 -600 -564 -186 -186 -564 -600 -744 -40 -40 -744 -212 -212 -312 -312

-776 -426 -470 -470 -426 -776 -390 -390

-600 -600 -324-132 -132-324

-796-276 -276-796 -24 -730 -730 -24 -472 -472 -440 -440 -720 -720

-492 -492 -632-222 -222-632 -330 -330 -596 -596

-582 -582 -852 -200 -200 -852 -580 -580 -360-192 -624 -600 -600 -624 -192-360 -516 -76 -486 -12 -102 -102 -12 -486 -76 -516 -296 -272 -272 -296 -586 -586 -456-156 -522 -4 -522 -156-456 -832-264 -264-832 -400 -400 -564 -564 -756 -756 -572 -572

-752 -752 -286 -452 -452 -286

-582 -582 -816 -222-560 -560-222 -816 -616-444 -444-616 -300-184 -656 -656 -184-300 -96 -774 -774 -96 -552 -36 -36 -552

-672-256 -390 -390 -256-672 -492 -646 -646 -492 -804 -804

-72 -606 -606 -72 -732-436-216 -216-436-732 -544 -120 -120 -544 -384 -384 -796 -180 -180 -796 -600 -252 -252 -600 -336-432 -432-336 -540-660-792 -792-660-540

Figure 4: The exceptional hyperbolic Apollonian circle packing (0,0,0,2)

-840-960 -960-840 -624-728 -728-624 -440-528 -528-440 -783 -360 -360 -783 -575 -288 -288 -575 -960 -224 -224 -960 -840-399 -399-840 -168-789 -789-168 -624 -624 -899-528-255 -120-581 -581-120 -255-528-899

-765 -765 -675 -405 -405 -675 -960-360 -360-960 -80 -856 -856 -80 -840 -840

-728-483-288 -288-483-728 -143 -775 -775 -143 -909 -909 -261-640 -640-261 -429 -429

-859 -544 -544 -859 -783 -783 -528 -48 -48 -528 -323 -323

-840-440 -873 -873 -440-840 -168 -439 -705 -705 -439 -168 -376 -376 -509 -509 -728 -149 -149 -728 -899-360 -360-899 -304 -304 -624 -624 -513 -513 -120 -63 -776 -776 -63 -120 -195 -544 -544 -195 -645 -381 -381 -645 -288 -784 -784 -288 -399 -399 -528 -496 -496 -528 -675 -189 -189 -675 -840 -24 -24 -840 -379 -379 -633 -633

-576 -576 -353 -353

-651 -551 -551 -651 -393 -576 -184 -184 -576 -393

-199 -488 -488 -199 -783 -783 -624 -528 -528 -624 -483 -483 -360 -69 -69 -360

-840 -840 -255 -408 -408 -255 -423 -423

-528-168 -136 -136 -168-528

-549 -549 -225 -225 -728 -728 -1 -288 -99 -336 -336 -99 -288 -575 -469 -469 -575

-784 -624 -624 -784 -309 -309

-631 -631

-624 -624 -323 -323

-48 -729 -729 -48 -675-120 -379 -379 -120-675 -365 -365 -736 -736 -224-717 -717-224 -456 -456 -360 -400-141 -141-400 -360 -528 -325 -325 -528 -728 -728 -280 -216 -216 -280 -465 -465 -696 -129 -129 -696 -399 -399 -8 -384 -384 -8 -489 -64 -64 -489 -624 -449 -449 -624 -440 -183 -183 -440 -456 -360 -168 -168 -360 -456 -288 -273 -320 -320 -273 -288

-168 -136-363 -363-136 -168 -483 -483 -525 -384 -339 -339 -384 -525

-441-168 -168-441

-288 -288 -264 -264 -528 -336 -336 -528 -80 -640 -504 -504 -640 -80

-344 -128 -128 -344 -195-597 -667-237 -45 -91 -153-231-325-435 -465-351-253-171-105 -55 -440 -21 -375 -321 -321 -375 -21 -440 -55 -105-171-253-351-465 -435-325-231-153 -91 -45 -237-667 -597-195 -15 -480 -480 -15 -360 -472 -264 -312 -312 -264 -472 -360 -527 -527 -575 -377-144 -144-377 -575 -275 -3 -275 -112-299 -299-112 -360 -360 -209 -209 -403 -403 -336 -240-119 -216 -216 -119-240 -336 -493 -40 -40 -493 -465 -297 -297 -465

-232-624 -624-232 -207 -65 -328 -328 -65 -207 -504 -504 -416 -416 -675 -273 -273 -675 -319 -319 -440 -160 -96 -96 -160 -440 -77 -459 -133 -133 -459 -77 -255 -576 -176 -176 -576 -255 -225 -225 -187-504 -280 -280 -504-187 -24 -345 -345 -24 -120 -551 -551 -120 -357 -357 -288 -288 -528 -528

-352 -425 -425 -352 -247 -247

-117 -261 -261 -117 -208 -208 -161 -161 -624 -280 -120 -120 -280 -624 -360 -360 -513 -85 -85 -513 -35 -184 -184 -35 -168 -56 -56 -168 -501 -501 -104-213 -213-104 -399 -175 -175 -399 -33 -129 -129 -33 -496 -352 -96 -160 -160 -96 -352 -496 -165 -48 -48 -165 -95 -95 -391 -135 -135 -391 -189 -189 -483 -48 -16 -16 -48 -483 -224 -224 -528 -528 -475 -120 -120 -475 -105 -105 -221 -39 -39 -221 -520 -520

-624 -63 -72 -72 -63 -624

-288 -115 -115 -288

-285 -285 -80 -5 -80 -360 -360

-357 -357

-99 -88 -88 -99 -440 -51 -51 -440 -437 -437 -120 -24 -72 -72 -24 -120 -528 -528 -525 -525 -57 -57 -143 -104 -104 -143 -168 -7 -168 -195 -195 -69 -69 -224 -32 -32 -224

-75 -75 -255 -255 -288 -9 -288 -323 -323

-360 -40 -40 -360

-399 -399 -440 -11 -440 -483 -483

-528 -48 -48 -528 -13

-15

-17

-19

-21

-23

21 19 17 15 13 11 -440 40 40 -440 -399 -399 -360 -360 -323 9 -323 -288 32 32 -288 -255 -255 -224 -224

-195 57 7 57 -195 -168 24 24 -168 51 51 -143 -143 -120 -120

72 72 -99 39 39 -99 -357 5 -357 -360 -360

-80 16 48 48 16 -80 -285 -285 -288 33 33 -288 -63 56 56 -63 -221 -221

-224 -224 -48 -48 -165 -165

-168 65 65 -168 -360 0 40 40 0 -360 -35 -280 21 21 -280 -35 -117 55 55 -117 -247 64 64 -247 -288 -288 -120 3 -120

-255 -255

91 91 -187 69 69 -187 45 45 -24 -77 8 24 24 8 -77 -24 -232 -160 48 80 80 48 -160 -232 63 63 -195 77 77 -195 15 48 99 99 48 15 -237 -237 -80 -80 24 80 80 24 -168 -209 35 35 -209 -168

-288 -112 48 48 -112 -288 63 63 80 80 99 99

-45 -91 -91 -45 -15 -153 -153 -15 -136 -136

-224 -224 -120 -120 -141 -141 -171 -171 -48 -105 -105 -48 -55 -144 80 80 -144 -55 63 63 -99 -168 48 48 -168 -99 -119 35 35 -119 -168 -168 77 77 -255 -21 -40 -65 24 24 -65 -40 -21 -255 -96 -96 -128 -128 45 80 80 45 -64 -168 15 15 -168 -64 -129 -129 -8 55 55 -8 -85 48 48 -85 -56 65 40 21 21 40 65 -56 -33 -33 64 64 -39 -39 33 8 8 33 -195 -195 -16 -51 39 16 16 39 -51 -16 -120 -136 -24 -32 24 24 -32 -24 -136 -120 -189 -199 -13 -15 15 13 48 69 63 63 69 48 13 15 -15 -13 -199 -189 -69 -48 -11 11 9 9 11 -11 -48 -69 -63 -9 7 24 24 7 -9 -63 -184 -7 -32 -32 -7 -184 -168 24 5 5 24 -168 48 48 -24 -5 -24 -24 -5 -24 39 16 16 39 -149 -48 33 33 -48 -149 -143 -143 -39 3 3 -39 -48 -16 -16 -48

-80 -33 48 48 -33 -80 -56 40 24 24 40 -56 -120 21 21 -120 -168 63 63 -168 -3 55 8 8 55 -3 48 48 45 45

-96 15 15 -96 -65 -65 -40 24 24 -40 -168 -168 -120 35 35 -120 -80 -80 -64 48 48 -64 -149 -21 -21 -149 -136 -136 -48 -69 -69 -48

-143 -55 -55 -143 -24 -105 -105 -24

-63 -63 -120 -8 -8 -120 -91 -91 -45 -45

-112 48 48 -112 -99 35 35 -99 -48 24 24 -48 -120 -120 -15 15 15 -15 -77 -77 -80 -24 8 8 -24 -80 21 21 24 24 -120 -35 0 0 -35 -120 -48 -48 -63 -63 -80 16 16 -80 -99 -99 3 24 24 3 5 5 7 16 16 7 9 21 8 8 21 9 15 15 24 24

-9 -9 -7 -7 -80 -80 -63 -63 -48 -16 -16 -48 -35 -5 -5 -35 -40 -40 -24 -45 -21 -21 -45 -24 -16 -16 -15 24 1 24 -15 15 15 -48 -8 -8 -48 8 8 -63 -24 -3 -3 -24 -63 -48 -48 -21 3 3 -21 8 8 5 15 15 5 -48 -24 -8 0 7 7 0 -8 -24 -48 -15 -15 -24 -24 -35 -35 -7 -7 8 8 -5 -5 3 3 -21 8 8 -21 -24 -15 -8 -3 5 5 -3 -8 -15 -24 -24 0 0 -24 8 8 -24 -8 3 3 -8 -24 -15 -5 -5 -15

-15 -8 0 0 -8 -15 -3 3 3 -3 -8 -8 0 3 3 0 -8 -3 -3 -8 -8 0 0 -8 -3 0 0 -3 -3 0 0 -3 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Figure 5: The exceptional hyperbolic Apollonian circle packing (-1,0,0,1)

21 smallest element n, originally conjectured by C. L. Mallows and S. Northshield, and indepen- − dently proved by Northshield [15]. Below we show that a similar class number interpretation holds generally for the case QD(a) = 4m. We write a binary quadratic form of even discriminant ∆ = 4B2 4AC as − [A, B, C] := AT 2 + 2BTU + CU 2. (4.1)

Here we follow the classical notation of Mathews [13], to maintain consistency with the notation of [8]. (The convention of Buell [2] writes this form as [A, 2B, C], and allows odd middle coefficients.) A form is definite if ∆ < 0, and it is then positive if it only represents positive values (and zero). Positive definite forms are those definite forms with both A and C positive, which follows from 4AC 4(B2 AC) < 0. − ≤ − The standard action on binary forms is an SL(2, Z)-action. A reduced form is one that satisfies 2 B A C. (4.2) | |≤ ≤ Every positive definite form is equivalent (under the SL(2, Z)-action) to at least one reduced form. All reduced forms are SL(2, Z)-inequivalent except for [A, B, A] [A, B, A] and ≡ − [A, A, C] [A, A, C]. ≡ − There is also a GL(2, Z)-action on the space of binary quadratic forms. It defines an action 1 0 of on binary forms, sending [A, B, C]to[A, B, C]. We define the GL(2, Z)-reduced 0 1 −  −  forms to be the subset of SL(2, Z)-reduced forms satisfying

0 2B A C. (4.3) ≤ ≤ ≤ Then every positive definite form is GL(2, Z)-equivalent to a unique GL(2, Z)-reduced form. A form is primitive if gcd(A, 2B, C) = 1 and is imprimitive otherwise. Define h±(∆) to be the number of (primitive or imprimitive) GL(2, Z)-reduced forms of discriminant ∆. Let h(∆) be the number of (primitive or imprimitive) SL(2, Z)-equivalence classes off forms of discriminant ∆. Since each GL(2, Z)-reduced form [A, B, C] is equivalent to the SL(2, Z)- ereduced form [A, B, C], there holds − 1 h±(∆) = (h(∆) + a(∆)), (4.4) 2

in which a(∆) counts the numberf of (primitivee or imprimitive)e ambiguous classes. Here an ambiguous class is an SL(2, Z)-equivalence class containing an ambiguous form, which is a (primitivee or imprimitive) reduced form for which 2B divides A, i.e., reduced forms of shape [A, 0, C] or [2B,B,C], cf. Mathews [13, Art. 159]. The usual class number h(∆) is defined as the number of SL(2, Z)-equivalence classes of primitive forms. Similarly we let a(∆) count the number of primitive ambiguous classes. If [A, B, C] is a primitive form of discriminant ∆, then for ℓ> 1, [ℓA, ℓB, ℓC] is an (imprimitive) form of discriminant ℓ2∆. We have ∆ h(∆) = h 2 , (4.5) 2 ℓ ℓX|∆   e 22 where we use the convention that h(n)=0if n is not a valid discriminant. In the same vein we have ∆ a(∆) = a 2 . (4.6) 2 ℓ ℓX|∆   e For ∆ = 4m< 0 one has a(∆) = 2t+1, where t is the number of distinct prime divisors of m; − see Mathews [13, Art. 156]. The following result gives a class number criterion counting root quadruples for an arbitrary Descartes equation QD = 4m. This result applies even when the associated discriminant ∆ is non-negative, provided the definition of reduced form is given by (4.2) (resp. (4.3)), though this no longer corresponds nicely to SL(2, Z)-equivalence (resp. GL(2, Z)-equivalence).

Theorem 4.1. Let n> 0 be fixed. (1) The ordered root quadruples v = (w,x,y,z) with QD(v) = 4m, for fixed m, hav- ing smallest element w = n are in one-to-one correspondence with reduced integral binary − quadratic forms [A, B, C] = AX2 + 2BXY + CY 2 (primitive or imprimitive) having dis- criminant ∆ = 4n2 + 4m and a non-negative middle coefficient. If v = (w,x,y,z) with − w = n x y z then the correspondence is given by − ≤ ≤ ≤ 1 [A, B, C]= n + x, ( n + x + y z), n + y . (4.7) − 2 − − −   (2) When ∆ = 4n2 + 4m < 0, the number of root quadruples to Q = 4m with least − D element n is given by the GL(2, Z)-class number − 2 Nroot(4m; n)= h±( 4(n m)). (4.8) − − − Proof. Recall from Theorem 3.1 that an orderedf integer quadruple v = (w,x,y,z) with w x y z and L(v) > 0 is a root quadruple if and only if ≤ ≤ ≤ w + x + y z 0, (4.9) ≥ ≥ and Theorem 3.3 shows that root quadruples always satisfy 0 x y z. We now write ≤ ≤ ≤ w = n to suggest that we are mainly concerned with negative integers. However, for neg- − ative m small positive values of w are permitted, which necessarily satisfy w m , by ≤ | | Theorem 3.3(1). p The integer solutions Q (w,x,y,z) = 4m with w = n are in one-to-one correspondence D − with integer representations of n2 m by the ternary quadratic form −

QT (X,Y,Z) := XY + XZ + Y Z,

where 1 1 1 (X,Y,Z) := (w + x + y z), (w + x y + z), (w x + y + z) . 2 − 2 − 2 −  

23 The congruence condition w + x + y + z 0 (mod 2) for integer quadruples implies that ≡ X,Y,Z Z. This map is a bijection: given an integer solution to Q (X,Y,Z) = n2 m, we ∈ T − write

(w,x,y,z):=( n,n + X + Y,n + X + Z,n + Y + Z) − and an algebraic calculation shows that QD(w,x,y,z) = 4m. The root quadruple conditions (4.9) above translate to the inequalities

0 X Y Z. (4.10) ≤ ≤ ≤

Next, for any integer M, the integer solutions QT (X,Y,Z) = M are in bijection with integer representations of 4M by the determinant ternary quadratic form − Q (A, B,˜ C) := B˜2 4AC ∆ − A solution (X,Y,Z) gives a solution Q (A, B,˜ C)= 4M under ∆ − (A, B,˜ C):=(X + Y, 2X, X + Z),

and the inverse map is

(X,Y,Z):=(B/˜ 2, A B,˜ C B˜). − − Note that since 4M = B˜2 4AC is even, then B˜ must also be even, so B = B/˜ 2 must be an − − integer. One sees easily that the inequalities (4.10) are equivalent to the inequalities

0 2B A C. (4.11) ≤ ≤ ≤ Finally, we recognize that the conditions (4.11) give a complete set of equivalence classes of integral binary quadratic forms of fixed discriminant 4M under the action of GL(2, Z). − Therefore, taking M = n2 m, these two steps associate to any (ordered) integer quadruple − ( n,x,y,z) the binary quadratic form − 1 [A, B, C]= n + x, ( n + x + y z), n + y − 2 − − −   of discriminant D := 4(n2 m). In order for the form to be positive definite, we must have − − n2 > m. This imposes no constraint on n if m < 0, while if m 0 we must have n > m . ≥ | | This form is GL(2, Z)-reduced if and only if ( n,x,y,z) is a root quadruple. − p Conversely, given a form of discriminant D, we construct a Descartes quadruple

(w,x,y,z):=( n,n + A, n + C,n + A + C 2B) − − which is a root quadruple if and only if [A, B, C] is GL(2, Z)-reduced. 2

Theorem 4.1 counts the number of root quadruples N (4m; n) with L(v) > 0 having a root − fixed smallest element w = n in terms of a class number, provided n2 > m. This condition −

24 n N S( n) N H ( n) n N S( n) N H ( n) n N S( n) N H ( n) − − − − − − 1 1 + 11 6 12 21 6 24 ∞ 2 2 2 12 6 12 22 12 12 3 2 3 13 8 12 23 16 22 4 3 4 14 6 12 24 5 24 5 4 6 15 5 19 25 19 24 6 2 6 16 9 16 26 16 25 7 5 8 17 12 18 27 8 24 8 6 8 18 10 10 28 10 28 9 3 11 19 10 24 29 14 24 10 8 9 20 11 20 30 14 30

Table 1: N ( 4, n) for small n. root ± −

is always satisfied when m < 0. For the case m = 0 there is one excluded value n = 0 corresponding to multiples of the root quadruple (0, 0, 1, 1), which falls under Theorem 3.3(2). For positive m and for the remaining values m w < 0 allowed by Theorem 3.3, the − | | ≤ combinatorial correspondence with certain binary quadratic forms of discriminant ∆ = 4(n2 p − − m) 0 still applies, but the notion of “reduced form” in (4.2) is not that that normally ≥ used for indefinite binary quadratic forms, and N (4m, n) is not interpretable as a class root − number. For hyperbolic Descartes quadruples (m = 1), there is one allowable value n = 1 − not interpretable as a class number. Indeed there are infinitely many root quadruples when n = 1 by Theorem 3.3(2), since (k,n) = (4m2, m) with m = 1. − − Table 1 presents small values of N S ( n) := N ( 4, n) and N H ( n) := N (4, n). root − root − − root − root − All hyperbolic root quadruples have n 1, according to Theorem 3.3(1), and all spherical − ≤− root quadruples have n 0, as shown in the proof of Theorem 3.3(1). The value n = 0 is not ≤ S shown in the table; we have Nroot(0) = 1, given by the spherical root quadruple (0, 1, 1, 2). The next result uses bounds for class numbers to derive an upper bound for the number of root quadruples.

Theorem 4.2. For all integers m the number Nroot(4m; n) of ordered integer root quadruples − (a,b,c,d) with Q (a) = 4m and a = n satisfies, uniformly for n> m , D − | | 2 Nroot(4m; n)= O n(log n)(log log n) . p − The implied O-constant is independent of m. 

Proof. Since h±(∆) h(∆) we have ≤ 4(n2 m) e e 2 Nroot(4m; n) h( 4(n m)) = h − 2− . − ≤ − − 2 2 ℓ ℓ | −X4(n −m)   e in which h(D) denotes the usual class number for primitive forms under SL(2, Z)-equivalence. Dirichlet’s class number formula gives, for primitive negative discriminants D, that w(D) D h(D)= | |L(1, χ), 2πp 25 where χ denotes the (primitive or imprimitive) character attached to the quadratic field Q(√D), and w(D) denotes the number of roots of unity in this field, which is at most six. This formula is valid for class numbers of non-maximal orders as well, where the L-function now uses an imprimitive character. For primitive characters we have the bound

L(1, χ)= O(log D ); | | see Davenport [4, Chap. 14], and Ramar´e[16] for precise estimates. For imprimitive characters, we must correct by a finite Euler factor (1 χ(p) 1 ) involving some subset S of primes p∈S − p dividing the discriminant. As shown in [8, Theorem 4.4], this is bounded above by (1+ 1 ), Q p∈S p and can lead to an extra factor of size at most O(log log D ). Writing D = D S2 with D a | | 0 Q 0 fundamental discriminant, we have

1 h(D) = O D log D d 1+  | 0| | 0| p  d | S p | d   p X Y e   = O D S2 log D (log log S)2 . (4.12) | 0| | 0| p  This gives

h(D)= O D log D (log log D )2 , | | | | | | p  valid uniformly for all discriminantse D 4. Here we used the estimate d S log log S. ≤− d | S ≤ The result follows on taking D = 4(n2 m). The O-constant can be taken independent of − − P m since n2 m 2n2 under the stated hypotheses. 2 − ≤ Remarks. (1) The upper bound of Theorem 4.2 can be strengthened when m = 0. In that case D = 4n2, and one obtains the stronger upper bound O n(log log n)2 using (4.12) − with D = 4 and S = n2. This improved upper bound also follows from [8, Theorem 4.2]. 0 −  The latter result counts primitive root quadruples only and gets a bound O(n(log log n)). Theorem 4.2 counts primitive and imprimitive root quadruples (with primitivity defined by the auxiliary binary quadratic form (4.7)). Summing over the imprimitive forms produces an extra factor of log log n. n (2) In [8] a lower bound Ω log log n was obtained for the number of primitive Euclidean root quadruples, which implies  n N (0, n) = Ω . root − log log n   We are unable to obtain a lower bound for of equivalent strength for general k = 4m, because it appears to require obtaining good lower bounds for class numbers of general imaginary quadratic fields, which is a difficult problem. Using the Brauer-Siegel theorem (see [11, pg. 328]) one can obtain for fixed m and any ǫ> 0 a lower bound

N (4m, n) n1−ǫ root − ≥

26 valid for all n n (m, ǫ), in which the constant n (m, ǫ) is not effectively computable. ≥ 0 0 We end this section by raising some questions concerning the behavior of the total number of root quadruples with QD(v) = k having minimal element below a given bound. We define the summatory function T S(k, T ) := N (k, n), root − n=⌊√X|k|⌋+1 Theorem 4.2 gives for nonzero k = 4m that T S(4m, T )= h±(4(n2 + m)). (4.13) n=⌊√X|k|⌋+1 e One expects these sums of GL(2, Z)-class numbers over a quadratic sequence to grow roughly like T 3/2. Can the leading term in their asymptotics be determined? The problem can be reduced to considering similar sums of SL(2, Z)-class numbers using (4.4) to obtain

T 1 log T S(4m, T )= h( 4(n2 + m)) + O T 2 log log T , 2 − · n=⌊√X|k|⌋+1   e where we made use of an upper bound for the number of ambiguous forms, as follows. If t denotes the number of distinct prime divisors of ∆ < 0 then (4.6) yields

O( log ∆ ) a˜(∆) d(∆)2t+1 2 log log ∆ . ≤ ≤ One can also ask whether S(4,T ) tends to a limit as T , and if so, compare the limiting S(−4,T ) → ∞ value to that in (2.7). One expects that there are asymptotically fewer spherical root quadruples than hyperbolic root quadruples. However, it is not true that N ( 4,n) N (4,n) always. root − ≤ root For example, N ( 4, 32) = 23 > 20 = N (4, 32). root − root 5. Integers Represented by a Packing: Congruence Conditions

In this section we restrict to the cases k = 4 corresponding to spherical and hyperbolic ± Apollonian packings. We show there are congruence restrictions on the allowed “curvatures” modulo 12 of circles in integral spherical and hyperbolic Apollonian circle packings. Theorem 5.1. In any integral spherical Apollonian circle packing, the “curvatures” of the circles in the packing omit exactly three congruence classes modulo 12. Proof. It suffices to classify the unordered Descartes quadruples in all integral packings. We claim that these fall into one of two eighteen-element orbits mod 12, which are and + 6 O O (mod 12), where = (2, 1, 1, 0), (5, 2, 1, 0), (5, 4, 2, 1), (6, 5, 4, 1), (6, 5, 5, 4), (8, 2, 1, 1), O { (8, 6, 1, 1), (8, 6, 5, 1), (9, 4, 2, 1), (9, 5, 4, 2), (9, 8, 2, 1), (10, 5, 1, 0), (10, 5, 5, 0), (10, 5, 5, 4), (10, 8, 5, 1), (10, 9, 5, 4), (10, 9, 8, 1), (10, 9, 8, 5) , }

27 and the notation + 6 (mod 12) means to add 6 to each coordinate of each element of and O O reduce modulo 12. The theorem follows from the claim, since the curvatures in omit the classes 3, 7 and O 11 (mod 12), while + 6 omits 1, 5 and 9 (mod 12). O To check the claim, it is easy to verify that there are 212 possible solutions (without respect to order) of the spherical Descartes equation (1.4) modulo 12. These lie in 19 orbits under the action of the Apollonian group. However, not all of the solutions modulo 12 come from integer solutions. If a = (w,x,y,z) is the reduction modulo 12 of a solution to the spherical Descartes equation, then there must exist a,b,c,d such that

2((12a + w)2 + (12b + x)2 + (12c + y)2 + (12d + z)2)= (12(a + b + c + d) + (w + x + y + z))2 4 (5.1) − If we reduce this equation modulo 24, we get

2(w2 + x2 + y2 + z2) (w + x + y + z)2 4 (mod 24), ≡ − and we see that a must also be a Descartes quadruple mod 24. This eliminates 108 of the 212 possibilities and 11 of the 18 orbits. Furthermore, if we reduce (5.1) modulo 48, we get the condition that

2(w2 + x2 + y2 + z2) + 24(a + b + c + d)(w + x + y + z) (w + x + y + z)2 4 (mod 48). ≡ − But since w + x + y + z 0 (mod 2), this is ≡ 2(w2 + x2 + y2 + z2) (w + x + y + z)2 4 (mod 48). (5.2) ≡ − Thus (w,x,y,z) must also be a quadruple modulo 48, ruling out 68 of the 104 remaining quadruples. Finally, a short computer search turns up integer spherical quadruples in all 36 classes. 2

Theorem 5.2. In any integral hyperbolic Apollonian circle packing, the “curvatures” of the circles in the packing omit at least three congruence classes modulo 12.

Proof. We classify the (unordered) Descartes quadruples in an integral hyperbolic packing, showing that they fall in one of 81 equivalence classes modulo 12. We claim that the integer quadruples lie in 15 orbits under the action of the Apollonian group, given by , + 3, O3 O3 O3 − 3, , + 3, 3, , + 6, , + 6, , + 3, + 9 and , + 6, − O3 −O3 −O3 − O4 O4 − O4 −O4 O7 O7 O7 O13 O13 where

= (2, 4, 8, 8), (2, 8, 8, 8), (8, 8, 8, 10) O3 { } = (1, 2, 2, 11), (2, 2, 5, 11), (2, 2, 5, 7), (2, 5, 10, 11) O4 { } = (0, 0, 0, 10), (0, 0, 0, 2), (0, 0, 2, 4), (0, 0, 4, 6), (0, 0, 6, 8), (0, 0, 8, 10), (0, 4, 6, 8) O7 { } = (0, 0, 1, 11), (0, 0, 1, 3), (0, 0, 3, 5), (0, 0, 5, 7), (0, 0, 7, 9), (0, 0, 9, 11), (0, 1, 3, 8), O13 { (0, 3, 4, 5), (0, 3, 4, 9), (0, 3, 8, 9), (0, 4, 9, 11), (0, 7, 8, 9), (3, 4, 8, 9) . }

28 It is easy to check that each of these orbits omits at least three residue classes modulo 12; for example omits the eight classes 0, 1, 3, 5, 6, 7, 9, and 11 (mod 12), so the theorem follows O3 from the claim. To prove the claim, we first calculate there are 278 solutions to the hyperbolic Descartes equation mod 12, and then check how many of these lift to global integer solutions of the hyperbolic Descartes equation. Of these solutions, 184 can be eliminated by consideration modulo 24 and 48 as in the spherical case. However, 13 quadruples not on the above list work modulo 48. These 13 quadruples lie in three orbits, namely

+6= (2, 2, 2, 4), (2, 2, 2, 8), (2, 2, 8, 10) , O3 { } +8= (2, 4, 10, 10), (4, 10, 10, 10), (8, 10, 10, 10) , (5.3) O3 { } +6= (0, 2, 6, 10), (0, 2, 6, 6), (0, 6, 6, 10), (2, 4, 6, 6), (4, 6, 6, 6), (6, 6, 6, 8), (6, 6, 8, 10) . O7 { } To eliminate these quadruples, we reduce the hyperbolic Descartes equation modulo 96, which yields

2((12a + w)2 + (12b + x)2 + (12c + y)2 + (12d + z)2) ≡ (12(a + b + c + d) + (w + x + y + z))2 + 4 (mod 96). (5.4)

After substituting (w,x,y,z) = (2, 2, 2, 4), (2, 4, 10, 10), or (0, 2, 6, 10) into (5.4) we get

48α2 + 48α + 48 0 (mod 96) ≡ where α = a + b + c + d. This equation has no solutions as α2 + α + 1 1 (mod 2) for any α. ≡ We have shown that one quadruple from each of the orbits (5.3) is impossible, thus ruling out the entire orbit. Finally, a quick search shows that the other 15 orbits all occur as reductions of integer hyperbolic Apollonian quadruples. 2 In [8], it is conjectured that in any integral Euclidean Apollonian packing, all sufficiently large integers not ruled out by congruence conditions modulo 24 are represented. This was suggested by numerical for a few specific packings. Table 2 presents integers below 100000 missing from the spherical Apollonian packing (0, 1, 1, 2) grouped by residue classes modulo 24; we give data for residue classes 0, 1, 2, 5 (mod 24) as representative. It is not completely clear from this data whether one should believe that only a finite number of integers will be missed in each class. For certain residue classes modulo 24 the exceptions seem to be rapidly thinning out. However for the class 0 (mod 24) (and also 9, 18 and 21 (mod 24)) the data seems equivocal. It seems very likely that there are no congruence restrictions on integers in spherical and hyperbolic circle packings for any modulus prime to 6. In [8, Theorem 6.2], it is shown that in any integral Euclidean Apollonian packing, the “curvatures” of the circles include representatives of every residue class modulo m for any modulus m that is relatively prime to 30. We expect a similar result to hold for spherical and hyperbolic packings as well.

29 n 0 (mod 24) ≡ 24 48 144 168 264 384 504 528 720 792 864 960 984 1008 1104 1344 1392 1632 1728 1824 2208 2232 2352 2448 2592 2904 3144 3192 3384 3744 3984 4032 4104 4248 4464 4584 4944 5352 5424 5664 5784 6048 6384 6624 7272 7344 7464 7776 8064 8160 8664 8712 8808 8904 9264 9312 9984 10032 10224 10248 10368 10752 11064 11184 11304 11424 11592 11952 12648 12864 13272 13368 13584 13704 13824 14064 14160 14304 15144 15552 15624 15984 16704 16872 17712 17784 18192 18264 18768 19224 19704 19872 19944 20304 20424 20664 22104 22632 23304 23568 24744 24816 24984 25248 25944 26544 26904 28008 28224 28392 29376 29784 29976 30072 30744 32544 32904 33552 33744 33888 33936 33984 36024 36672 36984 37104 37464 37632 38424 39024 39096 39624 40104 40152 41784 41904 41952 42816 43272 43584 43848 43896 43944 44856 45144 45912 46752 46824 46872 47184 47784 49704 49992 50160 50448 50928 51312 51504 51552 52584 53424 54816 54864 55464 55728 55824 56736 56856 58344 58824 60528 60744 61872 62424 63120 64224 64344 64824 64944 65544 65664 66144 66744 66984 68304 68472 70344 71712 71856 72744 73944 76560 76584 77592 77664 78384 79584 80664 81264 81984 83784 84384 84624 85536 87744 88152 88344 92712 93024 93672 93864 94584 95184 96144 96216 97848 99264 99792 99864 99984

n 1 (mod 24) ≡ 49 217 529 553 889 1441 1897 2737 3073 3337 4009 4417 4609 6049 7273 8449 9289 9889 10609 10921 11017 11257 11809 11929 12649 14449 15289 18529 18601 20209 23017 24577 27769 37009 39577 43489 45649 46129 47449 51049 52369 54313 54529 55369 56809 66289 66889 73249 80569 83329 91129 91729 92329

n 2 (mod 24) ≡ 434 506 1034 3626 7706 8786 12674 19634 25154 27554 28034 29714 41354 83426 97850

n 5 (mod 24) ≡ 77 749 869 893 1301 2189 2261 2429 2573 3317 3509 5789 6077 9437 16469 17789 19589 22589 22709 44549 56909 72869

Table 2: Missing curvatures below 105 in the spherical (0, 1, 1, 2) packing

30 References

[1] D. Aharonov and K. Stephenson, Geometric sequences of discs in the Apollonian packing, Algebra i Analiz 9 (1997), No. 3, 104–140. [English version: St. Petersburg Math. J. 9 (1998), 509–545.]

[2] D. Buell, Binary quadratic forms. Classical theory and modern computations, Springer- Verlag: New York 1989.

[3] H. S. M. Coxeter, Introduction to Geometry, Second Edition, John Wiley and Sons, New York, 1969.

[4] H. Davenport, Multiplicative Number Theory, Second edition, Revised by H. Montgomery, Springer-Verlag: New York 1980.

[5] R. L. Graham, J. C. Lagarias, C. L. Mallows, A. Wilks and C. Yan, Apollonian Cir- cle Packings: Geometry and Group Theory, I. The Apollonian group, eprint: arXiv math.MG/0010298.

[6] R. L. Graham, J. C. Lagarias, C. L. Mallows, A. Wilks and C. Yan, Apollonian Circle Packings: Geometry and Group Theory, II. Super-Apollonian group, eprint: math.MG/0010302.

[7] R. L. Graham, J. C. Lagarias, C. L. Mallows, A. Wilks and C. Yan, Apollonian Cir- cle Packings: Geometry and Group Theory, III. Higher Dimensions, eprint: arXiv math.MG/0010324.

[8] R. L. Graham, J. C. Lagarias, C. L. Mallows, A. Wilks and C. Yan, Apollonian Cir- cle Packings: Number Theory, J. Number Theory 100 (2003), 1–45. eprint: arXiv math.NT/0009113

[9] G. H. Hardy and E. M. Wright, Introduction to the Theory of Numbers, (4th ed.) Oxford University Press, 1960.

[10] J. C. Lagarias, C. L. Mallows and A. Wilks, Beyond the Descartes Circle Theorem, Amer. Math. Monthly 109 (2002), 338–361. eprint: arXiv math.MG/0101066

[11] S. Lang, Algebraic Number Theory, (2nd ed.), Springer-Verlag: New York, 1994.

[12] B. B. Mandelbrot, The Fractal Geometry of Nature, Freeman: New York, 1982.

[13] G. A. Mathews, Theory of Numbers, Second Edition, Cambridge 1892. (Reprint: Chelsea: New York 1962).

[14] J. G. Mauldon, Sets of equally inclined spheres, Canadian J. Math. 14 (1962) 509–516.

[15] S. Northshield, On Apollonian Circle Packings, preprint, 2002.

[16] O. Ramar´e, Approximate formulae for L(1, χ), Acta Arith. 100 (2001), 245–266.

31 [17] J. G. Ratcliffe and S. T. Tschantz, On the representation of integers by the Lorentzian quadratic form, J. Funct. Anal. 150 (1997), 498–525.

[18] C. L. Siegel, Uber¨ die analytische Theorie der quadratischen Formen, Ann. Math. 36 (1935), 527–606.

[19] B. S¨oderberg, Apollonian tiling, the Lorentz group, and regular trees, Phys. Rev. A 46 (1992), No. 4, 1859–1866.

[20] J. B. Wilker, , in: The Geometric Vein, (C. Davis, B. Gr¨unbaum, F. A. Sherk, Eds.), Springer-Verlag: New York 1981, pp. 379–442.

email: [email protected] [email protected]

32