<<

The Prime Theorem

Matt Tyler

Throughout these notes, we write Γ for SL2(Z). Recall that a quadratic form Q(x, y) = [a, b, c] = ax2 +bxy+cy2 is primitive if gcd(a, b, c) = 1. The discriminant of [a, b, c] is d = b2 −4ac. We will be concerned here with the indefinite quadratic forms, which are those forms with non-square discriminant d > 0. The group Γ acts on the set of quadratic forms via the action

α β  Q (x, y) = Q(αx + βy, γx + δy). (0.1) γ δ

This action preserves both the discriminant and the property of being primitive. We say that two quadratic forms in the same orbit are equivalent. The stabilizer of the quadratic form [a, b, c] in Γ is the group

  x−by   2 −cy 2 2 ∼ Γ[a,b,c] = ± x+by | x − dy = Z × Z/2Z. (0.2) ay 2 2 2 If x0, y0 > 0 are the fundamental solutions to the Pell equation x − dy , then we have

 x0−by0  2 −cy0 Γ[a,b,c] = ±M[a,b,c] where M[a,b,c] = x0+by0 . (0.3) ay0 2

√ x0+ dy0 The two important quantities depending on the discriminant d are d = 2 and h = |{equivalence classes of primitive}|, which are analogous to the fundamental unit and narrow d forms of discriminant√ d class number for Q( d), respectively. Let D be the set of positive discriminants {d > 0 | d ≡ 0, 1 (mod 4), d non-square}, and let D(x) = {d ∈ D | d ≤ x}. The purpose of these notes is to prove the following asymptotic expression due to Sarnak for the average value of hd ordered by d. Theorem 0.1. 1 X 16 li(x2)   h = + O x2/3+ |D(x)| d 35 x d∈D(x) R u dt where li(u) is the logarithmic integral 2 log t , as in the ordinary prime number theorem.

1 Summing by parts, we immediately obtain the following corollary. Corollary 0.2. 1 X 8   h log  = x + O x2/3+ . |D(x)| d d 35 d∈D(x)

By way of comparison, the following asymptotic expression for the average value of hd log d ordered by discriminant was noticed by Gauss and confirmed by Siegel. Theorem 0.3.

1 X π2 √ h log  = x + O(x log x). |{d ∈ D | d ≤ x}| d d 9ζ(3) d∈D d≤x

In Section 1, we will prove Theorem 0.1 (assuming the prime geodesic theorem for Γ and an asymptotic expression for |D(x)|) by exploiting a correspondence between equivalence classes of primitive binary quadratic forms, primitive hyperbolic conjugacy classes in Γ, and closed on Γ\H. The main ingredient in the proof of the prime geodesic theorem is the Selberg trace formula, which we will explain in section 2. We will then prove the prime geodesic theorem in section 3. In appendix A, we prove the asymptotic formula for |D(x)|. The material in section 1 and appendix A comes from Sarnak [3], and the material in sections 2 and 3 comes primarily from the books of Bergeron [1] and Iwaniec [2].

Contents

1 Closed Geodesics on SL2(Z)\H 3

2 The Selberg Trace Formula 4 2.1 The spectral trace ...... 7 2.2 Parabolic classes ...... 8 2.3 The identity class ...... 8 2.4 Hyperbolic classes ...... 8 2.5 Elliptic classes ...... 8 2.6 The full trace formula ...... 9

3 The Prime Geodesic Theorem 9

A Asymptotics for |D(x)| 12

2 1 Closed Geodesics on SL2(Z)\H

Let H be the Poincar´emodel of the hyperbolic plane, which is the upper half-plane {x+iy | y > 0} with the Riemannian metric. The group SL2(R) acts on H via fractional linear a b  az+b transformations c d z = cz+d , which are isometries of H. Our goal in this section is to explain the correspondence between equivalence classes of primitive binary quadratic forms, primitive hyperbolic conjugacy classes in Γ, and closed geodesics on Γ\H. We begin with the correspondence between the latter two col- lections (which actually holds for any discrete subgroup Γ0 of SL2(R)).

We say that g ∈ SL2(R) is hyperbolic if its fixed points as a linear fractional transformation are in Rˆ = R ∪ {∞} and distinct. If i g is hyperbolic, then it is conjugate (in SL2(R)) to a homothety  1/2  p 0 for some p > 1 (with p determined by the formula 0 p−1/2 tr g = p1/2 + p−1/2), and we say the norm Ng of g is p. 1 1 − 2 2 We say that a hyperbolic element γ ∈ Γ is primitive if it is not a non-trivial power in Γ, so that every hyperbolic element of Γ Γ\H is a power of a unique primitive hyperbolic in Γ. Note that con- jugates of hyperbolic elements are hyperbolic, and similarly for primitive hyperbolics, so we may speak of primitive hyperbolic conjugacy classes in Γ.

The geodesics on H are the semicircles perpendicular to the real line and the vertical lines, so there is a unique geodesic connecting any two points in Rˆ. Each hyperbolic element g ∈ SL2(R) maps the geodesic ag (of length log Ng) connecting the two fixed points of g back to itself. For γ ∈ Γ hyperbolic, aγ is a closed geodesic on Γ\H, and any Γ-conjugate of γ gives rise to the same geodesic. This gives a map n o n o primitive hyperbolic −→∼ closed geodesics on , (1.1) conjugacy classes [γ] Γ\H of length log Nγ and it is easy to see that this map is bijective.

Returning to binary quadratic forms, recall the matrix M[a,b,c] for a quadratic form [a, b, c] −1 (defined in (0.3)), which is a primitive hyperbolic with trace x0 = d + d and hence norm 2 d. The map [a, b, c] 7→ M[a,b,c] is Γ-invariant and in fact gives a bijection

nequivalence classes of primitiveo ∼ nprimitive hyperbolico binary quadratic forms −→ conjugacy classes (1.2)

2 which sends a form of discriminant d to conjugacy class of norm d.

3 Combining the correspondences (1.1) and (1.2), we arrive at the following proposition.

Proposition 1.1. The lengths of the closed geodesics on Γ\H are the numbers 2 log d with multiplicity hd. In light of this reformulation, Theorem 0.3 follows from the asymptotic expression 35   |D(x)| = x + O x2/3+ (1.3) 16 proved in the appendix, as well as the following result. Theorem 1.2 (Prime geodesic theorem). ! x3/4 π(x) = li(x) + O log x where π(x) is the number of closed geodesics on Γ\H of length at most log x.

Proof of Theorem 0.1. By the prime geodesic theorem and the proposition above, ! X x3/4 h = π(x2) = li(x2) + O . (1.4) d log x d∈D(x)

Dividing by (1.3), we find

1 X 16 li(x2)   h = + O x2/3+ , (1.5) |D(x)| d 35 x d∈D(x) as claimed.

2 The Selberg Trace Formula

Given a function k : H → H → C, consider the integral operator L with kernel k defined by Z (Lf)(z) = k(z, w)f(w)dµw. (2.1) H This operator is SL2(R)-invariant (i.e. it commutes with precomposition with g for all g ∈ SL2(R)) if and only if

k(gz, gw) = k(z, w) for all g ∈ SL2(R), (2.2)

4 in which case k depends only on the hyperbolic distance ρ(z, w) between z and w. This hyperbolic distance satisfies |z − w|2 cosh ρ(z, w) = 1 + 2u(z, w) where u(z, w) = , (2.3) 4 Im z Im w so we may write k(z, w) as k(u(z, w)) where k(u) is a function in one variable u ≥ 0. These invariant integral operators have the following important property. Whenever f : 2  ∂2 ∂2  H → C is an eigenfunction of the Laplacian ∆ = y ∂x2 + ∂y2 , f is also an eigenfunction of L. In particular, if (∆ + λ)f = 0, then Z k(z, w)f(w)dµw = h(t)f(z) (2.4) H 1 2 where λ = 4 + t and h(t) is the Selberg/Harish-Chandra transformation of k defined by Z ∞ k(u) q(v) = √ du, v u − v g(r) = 2q((sinh r/2)2), (2.5) Z ∞ h(t) = eirtg(r)dr. −∞

If we restrict the domain of L to automorphic functions (i.e. functions invariant under Γ), then we may write Z (Lf)(z) = K(z, w)f(w)dµw (2.6) Γ\H P where K(z, w) = γ∈Γ k(z, γw). The Selberg trace formula comes from evaluating the trace Tr K = R K(z, z)dµz of K in two different ways, one using the spectrum of the Γ\H Laplacian and one using the geometry of the Riemann Γ\H. It will be more convenient to write the formula in terms of the function h and its Fourier transform hˆ(r) = 1 R ∞ irt 2π −∞ e h(t)dt. In order for all of our sums and integrals to converge, we impose the following conditions on h: h(t) is even, 1 h(t) is holomorphic in the strip | Im t| ≤ + , (2.7) 2 h(t)  (|t| + 1)−(2+) in this strip. To begin, we may write Tr K = P R k(z, γz)dµz. Let us partiton Γ into its conjugacy γ∈Γ Γ\H classes and evaluate the sum over each conjugacy class [γ] = {τ −1γτ | τ ∈ Γ} in turn. We have X Z X Z Z dµz = k(z, τ −1γτz)dµz = k(z, γz)dµz, (2.8) γ0∈[γ] Γ\H τ∈Z(γ)\Γ Γ\H Z(γ)\H

5 where Z(γ) is the centralizer of γ in Γ, so we have

X Z Tr K = k(z, γz)dµz. (2.9) [γ] Z(γ)\H

Aside from ±I, the conjugacy classes in SL2(R) (and hence also Γ) break up into three types depending on their fixed points: ˆ 1 v • Parabolic: One fixed point in R, conjugate over SL2(R) to a translation ( 0 1 ) with fixed point ∞. ˆ • Hyperbolic: Two distinct fixed points in R, conjugate over SL2(R) to a homothety  1/2  p 0 with fixed points 0 and ∞ (discussed in section 1). 0 p−1/2

• Elliptic: One fixed point in H (and the conjugate fixed point in H), conjugate to a cos θ − sin θ  rotation sin θ cos θ with fixed point i (and −i). We may therefore break up (2.9) as

X X X X Tr K = + + + (2.10) γ=±I [γ] parabolic [γ] hyperbolic [γ] elliptic

We will evaluate each of the five pieces of this formula in terms of h in turn. The diagrams below give the regions over which we must integrate for the three final terms above (after conjugating suitably in SL2(R)). The calculations in each case are quite long, so we will skip them and record only the final results.

Parabolic Hyperbolic Elliptic

pi

2θ i i i

1 1 1 1 1 1 − 2 2 − 2 2 − 2 2  1/2  Z (( 1 1 )) \ Z p 0 \ Z cos θ − sin θ  \ 0 1 H 0 p−1/2 H sin θ cos θ H

6 There is a small technical point that we will need to take care of, Y i which is that both sides of (2.10) are actually infinite. Therefore, instead of integrating over all of Γ\H, we will instead integrate S over Γ\H(Y ) and let Y → ∞, where H(Y ) = γ∈Γ F(Y ) and 1 F(Y ) = {z = x + iy | |x| < 2 , 0 < y < Y } is the portion of 1 the fundamental domain F = {z = x + iy | |x| < 2 , 0 < y} avoiding the cusp at ∞. See the diagram to the right. The i trouble comes from the left-hand side of (2.10) and the parabolic component of the right-hand side, which grow like A1 log Y + B1 + o(1) and A2 log Y + B2 + o(1) for constants A1,B1,A2,B2. The equality A1 = A2 will be trivial, so we may subtract those − 1 1 terms to find B1 = B2 + B3 with B3 the remaining right-hand 2 2 side contribution, and it is this equation that we call the trace Γ\H(Y ) formula.

2.1 The spectral trace First, let us consider the spectral trace, which is another way of writing the left-hand side of (2.9). The function K has the spectral expansion

X 1 Z ∞ 1 1 K(z, w) = h(t )u (z)u (w) + h(t)E(z, + it)E(w, + it)dt (2.11) j j j 4π 2 2 j −∞

1 2 where λj = 4 +tj are the discrete eigenvalues of the Laplacian, uj(z) are the corresponding eigenfunctions, and E(z, s) is the Eisenstein series 1 P (Im γz)s. Letting z = w and 2 Γ∞\Γ integrating (2.11) over Γ\H(Y ), we find Z Tr K = K(z, z)dµz Γ\H(Y ) Γ\H(Y ) X 1 = h(t ) + hˆ(0) log Y − hˆ(0) log π + h(0) j 4 (2.12) j ∞ 1 Z ∞ Γ0 1 X Λ(n) + h(t) ( + it)dt − 2 hˆ(2 log n) + o(1). 2π Γ 2 n −∞ n=1

7 2.2 Parabolic classes

1 1 Every parabolic conjugacy class in SL2(Z) is a power of [γ0] where γ0 = ( 0 1 ). Therefore, we have

∞ X Z X Z k(z, γz)dµz = k(z, z + m)dµz [γ] parabolic Z(γ)\H(Y ) m=1 Z(γ0)\H(Y ) 1 = hˆ(0) log Y − hˆ(0) log 2 + h(0) (2.13) 4 1 Z ∞ Γ0 − h(t) (1 + it)dt + o(1). 2π −∞ Γ

At this point, note that the leading terms hˆ(0) log Y in (2.12) and (2.13) are the same. Subtracting hˆ(0) log Y and letting Y → ∞, we obtain constants in both cases, and we no longer need concern ourselves with Y and integrating over Γ\H(Y ).

2.3 The identity class In this case, we simply find

Z 1 Z ∞ k(z, z)dµz = |Γ\H| k(0) = th(t) tanh(πt)dt. (2.14) Γ\H 12 −∞

2.4 Hyperbolic classes We have Z ∞ Z X X X m k(z, γz)dµz = k(z, γ0 z)dµz [γ] hyperbolic Z(γ)\H P =[γ ] m=1 Z(γ0)\H 0 (2.15) ∞ X X hˆ(m log NP ) = log NP , NP m/2 − NP −m/2 P m=1 where the latter two outer sums are either over primitive hyperbolic conjugacy classes P in Γ or (in light of the correspondence (1.1)) closed geodesics in Γ\H. Recall that for a primitive hyperbolic conjugacy class P , tr P = NP 1/2 + NP −1/2, and the length of the corresponding geodesic is log NP .

2.5 Elliptic classes 0 −1  The elliptic conjugacy elements of Γ are all conjugate to some power of either 1 0 , 0 −1  which has order 2 as a function on H, or 1 1 , which has order 3 as a function on H.

8 The elliptic contribution to the trace amounts to √ X Z 1 Z ∞ h(t)dt 2 3 Z ∞ cosh(πt/3) k(z, γz)dµz = + h(t) dt. (2.16) 4 cosh(πt) 9 cosh(πt) [γ] elliptic Z(γ)\H −∞ −∞

2.6 The full trace formula Putting together (2.12), (2.13), (2.14), (2.15), (2.16), we obtain the full Selberg trace formula. Theorem 2.1. For any function h satisfying the conditions (2.7),

∞ X π X Λ(n) h(t )= hˆ(0) log + 2 hˆ(2 log n) j n j 2 n=1 ! 1 Z ∞ Γ0 1 Γ0 − h(t) ( + it)+ (1 + it) dt 2π −∞ Γ 2 Γ √ 1 Z ∞ 1 Z ∞ h(t)dt 2 3 Z ∞ cosh(πt/3) + th(t) tanh(πt)dt + + h(t) dt 12 −∞ 4 −∞ cosh(πt) 9 −∞ cosh(πt) ∞ X X hˆ(m log NP ) + log NP , NP m/2 − NP −m/2 P m=1

1 2 where the first sum is over the discrete eigenvalues λj = 4 + tj of ∆, and the last sum is over the closed geodesics P on Γ\H.

3 The Prime Geodesic Theorem

In this section, we will apply the Selberg trace formula to a carefully chosen family of functions hx, in order to prove the prime geodesic theorem. Let ϕ be an even non-negative smooth bump function supported in [−1, 1] and such that R ∞ −1 −∞ ϕ(r)dr = 1. Given  > 0, let ϕ(r) =  ϕ(r/), which is supported in [−, ] and also R ∞ satisfies −∞ ϕ(r)dr = 1.

Given a real number x > 0, define hx to be the function with Fourier transform ˆ hx(r) = 2 cosh(r/2)χ[− log x,log x](r) (3.1) where χA is the characteristic function of A ⊆ R. We would like to apply the Selberg trace formula to hx, but hx does not satisfy (2.7), so we will instead use the functions hx,, which

9 are defined to have Fourier transform hˆx, = hˆx ∗ ϕ. Note that Z log x s −s 1−s −(1−s) sr (1−s)r x − x x − x 1 hx(t) = (e + e )dr = + where s = + it, − log x s 1 − s 2 (3.2)

hx,(t) = h(t)ϕ ˆ(t) = h(t)ϕ ˆ(t).

1 2 The Laplacian is a symmetric and non-negative operator, so its eigenvalues λ = 4 + t = 1 1 s(1 − s) are real and non-negative. Hence, we have either 2 < s ≤ 1 or Re s = 2 . Let us estimate hx(t) and hx,(t) in each of these regions. We haveϕ ˆ(t) = 1 + O(t), so for 1 2 < s ≤ 1, xs   xs   h (t) = + O x1/2 and h (t) = + O x1/2 + x . (3.3) x s x. s 1 1 Similarly, |ϕˆ(t)|  (1+|t|)2 since ϕ is smooth, so for Re s = 2 (i.e. t ∈ R),

x1/2 x1/2 |h (t)|  and |h (t)|  . (3.4) x 1 + |t| x, (1 + |t|)(1 + |t|)2 Note that this last estimate implies Z ∞ −1 1/2 t|hx,(t)|dt   x . (3.5) 0

We will need the following two results due to Selberg regarding the discrete eigenvalues 1 2 λj = 4 + tj = sj(1 − sj) of the Laplacian: 3 λj ≥ if λj 6= 0, 16 (3.6) 2 N(t)  t where N(t) = |{j | tj ∈ [−t, t]}|. The first of these follows from the Weil bound for Kloosterman sums, and the second follows 2 1 from the Bessel inequality for L (Γ\H). (In fact, it is possible to show that λj ≥ 4 and 1 2 N(t) = 12 t + O(t log t), but we will not make use of these facts here.) As a consequence, using (3.3) and (3.5), we obtain the following asymptotic expression for the part of the Selberg trace formula coming from the discrete spectrum. X X Z ∞ hx,(tj) = h(tj) + hx,(t)dN(t) j 1 0 2

10 Aside from the hyperbolic contribution, all the other terms in the Selberg trace formula are O −1x1/2 by (3.4) and (3.5) and therefore contribute only to the error term. Hence, the Selberg trace formula implies

 −1 1/2 H(x) = x + O x +  x ∞ ˆ (3.8) X X hx,(m log NP ) where H (x) = log NP .  NP m/2 − NP −m/2 P m=1 We will see that this asymptotic expression implies the prime geodesic theorem. Let

∞ ˆ −m X X hx(m log NP ) X 1 + NP H(x) = log NP = log NP . (3.9) NP m/2 − NP −m/2 1 − NP −m P m=1 NP m≤x

We would like to show H(x) = x + O x3/4. To that end, note that

ˆ ˆ /2ˆ hxe−,(r) ≤ hx(r + ) ≤ e hx(r) whenever r ≥ 0, (3.10) −/2 hˆxe,(r) ≥ hˆx(r − ) ≥ e hˆx(r) whenever r ≥ .

Therefore, for  sufficiently small,

−/2 − /2  e H(xe ) ≤ H(x) ≤ e H(xe ), (3.11) so letting  = x−1/4 and applying (3.8), we obtain H(x) = x + O x3/4, as claimed. In analogy to the usual prime number theorem, we now define X X ψ(x) = log NP and ϑ(x) = log NP. (3.12) NP m≤x NP ≤x

Note that   X X log NP H(x) = log NP + O = ψ(x) + o(ψ(x)) (3.13)  NP m  NP m≤x NP m≤x since only finitely many of the values NP m are less than a fixed constant and H(x) → ∞. Therefore, ψ(x) ∼ x, which means

X log NP Z x 1 = dψ(y) = O(log x) (3.14) NP m y NP m≤x 0 and hence ψ(x) = x + O x3/4.

11 Now, ψ(x) = ϑ(x) + ϑ(x1/2) + ··· + ϑ(x1/k) (3.15) log x where the number k of terms in this sum is at most δ = O(log x), with δ the length of 3/4 the shortest closed geodesic on Γ\H, so ϑ(x) = x + O(x ) as well. Considering X Z x 1 π(x) = 1 = dϑ(y), (3.16) δ/2 log y NP ≤x e the prime geodesic theorem ! x3/4 π(x) = li(x) + O (3.17) log x follows.

A Asymptotics for |D(x)|

We prove here the following result due to Sarnak [3] needed in section 1. Recall that D = {d > 0 | d ≡ 0, 1 (mod 4), d non-square} and D(x) = {d ∈ D | d ≤ x}. Proposition A.1. 35   |D(x)| = x + O x2/3+ . 16 We begin by reducing the problem to counting the number of solutions to a diophantine inequality. Let

2 2 S(x) = {(m, n, d) | m − dn = 4, d > 0, d ≡ 0, 1 (mod 4), 0 < m, n ≤ x} . (A.1)

Lemma A.2.   |D(x)| = S(x) + O x1/2 .

√ k xd,k+ dyd,k 2 Proof. Given d ∈ D and k ≥ 1, let d = 2 , so that xd,k, yd,k ∈ Z satisfy xd,k − 2 dyd,k = 4. The map (d, k) 7→ (xd,k, yd,k, d) induces a bijection

{(d, k) | d ∈ D, k ≥ 1} −→∼ (m, n, d) | m2 − dn2 = 4, d ∈ D, m, n > 0 , (A.2) so we find  2 2 S(x) = (m, n, d) | m − dn = 4, d ∈ D, m, n > 0, m ≤ x (A.3) = |{(d, k) | xd,k ≤ x}| .

12 We will see over the course of the proof of Proposition A.1 that S(x) = O(x), so since

q 2 xd,k + xd,k − 4   k = = x + O x−1 , (A.4) d 2 d,k d,k we find k S(x) = ψ(x) + O(1) where ψ(x) = {(d, k) | d ≤ x} . (A.5)

Now, let ϑ(x) = |D(x)|, so that

ψ(x) = ϑ(x) + ϑ(x1/2) + ··· + ϑ(x1/k) (A.6)

log x where the number k of terms in this sum is at most log 2 . Again, since ψ(x) = O(x), we find ϑ(x) = ψ(x) + O x1/2, and we are done.

We now break up S(x) according to the value of n as X X X S(x) = Sn(x) = Sn(x) + Sn(x) 0 0, d ≡ 0, 1 (mod 4), 0 < m ≤ x} . As the following lemma shows, the second of these sums contributes only to the error term, so we may concentrate on the first. Lemma A.3. X  2/3+ Sn(x) = O x . x1/2

Proof. Let ∗ 2 2 Sn(x) = {(m, k) | m − kn = 4, k > 0, 0 < m ≤ x} , (A.8) ∗ and note that Sn(x) ≤ Sn(x). 1/2 ∗ 2 2 For n > x , Sn(x) is bounded from above by the number of solutions to m ≡ 4 (mod n ) 2  in Z/n Z, which is O(n ) for any  > 0. Therefore,

X X ∗ X ∗ Sn(x) ≤ Sn(x) + Sn(x) x1/2

This latter term is the number of solutions to

kn2 = (m − 2)(m + 2) with k > 0, 0 < m ≤ x, x2/3 < n ≤ x, (A.10)

13 so we may write n in the form n = 2ηuv with η ∈ {0, 1}, u2 | (m − 2), v2 | (m + 2). (A.11)

1 1/2 1 1/3 Either u or v is at least 2 n > 2 x , so the choices of m solving (A.10) are among those satisfying 1 m ≡ ±2 (mod w2) for some x1/3 < w ≤ x1/2 (A.12) 2 2 Given such an m, there are at most d2(m − 4) pairs (n, k) solving (A.10), where dn(`) is  the number of square divisors of `, which satisfies d2(`)  λ . Therefore, the number of solutions to (A.10) is

 X  2  x 0 < m ≤ x | m ≡ ±2 (mod w ) 1 1/3 1/2 2 x

P What remains is to estimate 0 0, 0 < m ≤ x} , 00 2 2 (A.14) Sn(x) = {(m, k) | m − (4k + 1)n = 4, k > 0, 0 < m ≤ x} , 0 00 so that Sn(x) = Sn(x) + Sn(x). Let 0  2 2 Tn = m ∈ Z/4n Z | m ≡ 4 , (A.15) 00  2 2 2 Tn = m ∈ Z/4n Z | m ≡ n + 4 , and note that x x S0 (x) = T 0 + O T 0  = T 0 + O (n) , n 4n2 n n 4n2 n x x (A.16) S00(x) = T 00 + O T 00 = T 00 + O (n) . n 4n2 n n 4n2 n Therefore, X X  x  S (x) = (T 0 + T 00) + O (n) n 4n2 n n 0

0 00 P∞ Tn P∞ Tn In order to prove Proposition A.1, it remains only to evaluate n=1 n2 and n=1 n2 , which is the content of the following two lemmas.

14 Lemma A.4. ∞ X T 0 11 n = . n2 2 n=1

Proof. Note that 0  2 2 Tn = 2 m ∈ Z/n Z | m ≡ 1 , (A.18) 0 so Tn = 2U(n) where U(n) is the multiplicative function defined by ( 2 if j = 1, U(2j) = 4 if j ≥ 2, (A.19) U(pj) = 2 for p ≥ 3 prime, j ≥ 1.

Therefore, we have

∞ ∞ X T 0 X U(n) n = 2 n2 n2 n=1 n=1 Y  U(p) U(p2)  = 2 1 + + + ... p2 p4 p  2 4  Y  2 2  = 2 1 + + + ... 1 + + + ... 22 24 p2 p4 p≥3  1 2−2  Y  2p−2  = 2 1 + + 1 + (A.20) 2 1 − 2−2 1 − p−2 p≥3 11 1 − 2−2  Y 1 + p−2 = 3 1 + 2−2 1 − p−2 p 11 ζ(2)2 = 5 ζ(4) 11 = . 2

Lemma A.5. ∞ X T 00 13 n = . n2 4 n=1

15 β e1 e` Proof. Let n = 2 p1 ··· p` with pi ≥ 3 and ei > 0 be the prime factorization of n, and note that by the Chinese remainder theorem,

n o ` n o 00 2β+2 2 2 Y 2ei 2 2 Tn = m ∈ Z/2 Z | m ≡ n + 4 m ∈ Z/pi Z | m ≡ n + 4 i=1 (A.21) n o ` n o 2β+2 2 2β Y 2ei 2 = m ∈ Z/2 Z | m ≡ 2 + 4 m ∈ Z/pi Z | m ≡ 4 . i=1

00 Hence, Tn = 2V (n) where V (n) is the multiplicative function defined by ( 0 if β = 1, 2, V (2β) = 4 if β ≥ 3, (A.22) V (pj) = 2 for p ≥ 3 prime, j ≥ 1.

Therefore, we have

∞ ∞ X T 00 X V (n) n = 2 n2 n2 n=1 n=1 Y  V (p) V (p2)  = 2 1 + + + ... p2 p4 p  4 4  Y  2 2  = 2 1 + + + ... 1 + + + ... 26 28 p2 p4 p≥3  2−4  Y  2p−2  = 2 1 + 1 + (A.23) 1 − 2−2 1 − p−2 p≥3 13 1 − 2−2  Y 1 + p−2 = 6 1 + 2−2 1 − p−2 p 13 ζ(2)2 = 10 ζ(4) 13 = . 4

16 Altogether, we have now shown   |D(x)| = S(x) + O x1/2

X  2/3+ = Sn(x) + O x 0

17 References

[1] Nicolas Bergeron. The spectrum of hyperbolic surfaces. Springer International Publish- ing, 2016. [2] Henryk Iwaniec. Spectral methods of automorphic forms. American Mathematical Society, 2003. [3] Peter Sarnak. Class numbers of indefinite binary quadratic forms. Journal of , 15(2):229 – 247, 1982.

18