ACTA ARITHMETICA LXIII.1 (1993 edekind sums and continued fractions by R. R. Hall (York and M. N. Huxley (Cardiff Let ϱ(t denote the row-of-teeth function ϱ(t = [t] t + 1/2. Let a b c... r be ositive integers. The homogeneous edekind sum is 1 ( ( at bt (a b; = ϱ ϱ and the inhomogeneous edekind sum is ( 1 ( ( t t = ϱ ϱ = (1 ;. The homogeneous sum can be exressed in terms of inhomogeneous sums using the relation 1 ( (1 ϱ t + u = ϱ(t u=0 to obtain the following rules: (2 (ac bc; c = c(a b; + (c 1/4 for any c (3 (ac bc; = (a b; for (c = 1 (4 (a bc; c = (a b; for (a c = 1. Putting a = 1 in (4 we find that the inhomogeneous sum is a well-defined function of a ositive rational argument. Since (a b; deends only on a and b modulo we can reduce the homogeneous sum (a b; to the inhomogeneous sum in two different ways either by choosing c so that ac 1 (mod or so that bc 1 (mod. We thus find that (5 (/ = (r/ when r 1 (mod.
80 R. R. Hall and M. N. Huxley A final trivial relation (6 (/ = ((b / for any large integer b follows from the oddness of the function ϱ(t. In this note we base the theory of the inhomogeneous edekind sum on the continued fraction algorithm. Our main tool is a three-term recurrence relation for (/ which gives a direct roof of the recirocity formula ( (7 + ( = 2 + 2 + 1 12 1 4 and Barkan and Hickerson s evaluation of (/ [1 5] (which is also imlicit in Knuth [6]. The recurrence relation extends to give an interolation formula for inhomogeneous edekind sums our Theorem 2 below which aears to be a new result. The recirocity formula (7 is a secial case of the functional euation valid for r ositive and airwise corime (8 ( ; r + ( r; + (r ; = 2 + 2 + r 2 1 12r 4. It aears that (8 cannot be deduced directly from the secial case (7. A simle roof of (8 using integration will be given elsewhere. Other roofs of the functional euation (8 use contour integration or trigonometric identities among roots of unity or counting the lattice oints in a certain tetrahedron. The association of (/ with continued fractions is natural since the edekind sums first arose in connection with the multilier system for edekind s eta function over the modular grou of two by two integer matrices of determinant one [4]. The continued fraction algorithm can be interreted as the ( exression ( of a matrix of the modular grou as a word 1 1 1 0 in the generators and. 0 1 1 1 The continued fraction for / is calculated using Euclid s algorithm. Let r 0 = and let If r 1 0 then let = a 0 r 0 + r 1 0 r 1 1 a 0 0. r 0 = a 1 r 1 + r 2 0 r 2 r 1 1 a 1 1 and so on. Eventually r n+1 = 0 for some n 0. The convergents are i / i = a 0 + 1/(a 1 + 1/(a 2 +... + 1/a i... satisfying the three-term recurrences i+1 = a i+1 i + i 1 i+1 = a i+1 i + i 1
with (9 edekind sums and continued fractions 81 i+1 i+1 i i = ( 1i i i+1. The last convergent n / n is the lowest terms reduction of the ratio /. Theorem 1 (Barkan s evaluation [1]. Let n be the length of the continued fraction for /. Then ( 1 n ( n 1 a 0 + a 1... a n for n even 12 (10 = ( n 1 n + n 1 a 0 + a 1... + a n 1 for n odd. 12 4 Since n n 1 / n = 1/(a n + 1/(a n 1 +... (a 2 + 1/a 1... the exressions in the theorem are symmetric in n and n 1 in accordance with (5 and (9. Our evaluation of the edekind sum rests on the three-term recurrence that follows. (11 Lemma 1. Let a be ositive integers with Then ( (12 = = a + = a + = ± 1. (1 ( ( + ( a ± 12 the ± sign in (12 agreeing with that in (11. (1 + 1 4 (1 P r o o f. If the sign in (11 is negative then we relace by b b b for some large integer b; the sign becomes ositive and the edekind sums have changed sign by (6. Hence we may assume a ositive sign in (11. We observe that for 0 t < we have ( ( t t (13 ϱ = ϱ + t ( t = ϱ t and similarly for 1 t < t not a multile of we have ( ( t t (14 ϱ = ϱ t ( t = ϱ + t ;
82 R. R. Hall and M. N. Huxley if t is a multile of in (14 then we must subtract one from the right hand side. By (1 we have ( 1 ( 1 = 2 t ( t ϱ = 1 1 ( t (15 tϱ = 1 1 ( t tϱ + 1 1 2 t 2 = 1 a + 1 ( t tϱ ( 1(2 1 + 6. In the first term in (15 we write t = u + v with 0 u a 1 1 v. The first term becomes (16 1 a 1 ( (u v + vϱ 1 1 ( (a v + vϱ. u=0 v=1 The terms with v = in (16 give u=0 v=1 1 a 1 (u + a(a + 1 ϱ(0 = 4 = (a + 1( 4 The other terms in the first sum of (16 give (17 1 a 1 1 ( (u + v ϱ 2 + a 1 ( ( 2 v v ϱ u=0 v=1 v=1 ( ( = 0 + a = (1. For the second term in (16 we use (14 instead of (13 to obtain 1 1 ( (a v + vϱ 1 1 (a + vv v=1 v=1 ( = a( 1 ( 1(2 1 2 6 as in (17. lemma. Collecting terms together we obtain (12 the result of the The three-term recurrence is in second difference form so we obtain the theorem after two inductions. The result of the first induction is a form of the recirocity formula (7 noted by Rademacher [8]. Conseuently Lemma 2 gives an indeendent roof of the recirocity formula..
edekind sums and continued fractions 83 Lemma 2. If / and / are consecutive convergents of a continued fraction with (18 then ( ( (19 the ± sign agreeing with (18. = ± 1 ( 2 + 2 + 1 = ± 12 1 4 Corollary (recirocity formula. ( ( + = 2 + 2 + 1 12 1 4. P r o o f o f L e m m a 2. To begin the induction we note that ( 0 / 0 = (a 0 = 0 ( 1 / 1 = (a 0 + 1/a 1 = (1/a 1 = 1 1 ( 1 2 t 1 = 2 1 + 2 12 1 1 4 in the notation introduced above for continued fractions. This verifies (19 when / is 1 / 1 / is 0 / 0. We treat the induction ste in the case when the sign in (18 is +. In the notation of Lemma 1 we take as the induction hyothesis that ( (20 By Lemma 1 we have ( ( = ( ( ( ( = 2 + 2 + 1 12 + 1 4. + a 12 = 2 + 2 + 1 12 1 4 + a ( + 12 and the result follows since a ( + = ( ( + 12 12. (1 + 1 4 (1 When the sign in (18 is reversed then the signs in Lemma 1 and in (20 are both reversed.
84 R. R. Hall and M. N. Huxley P r o o f o f t h e C o r o l l a r y. Again there are two cases. When the sign in (18 is + then 1 (mod so that by (5 (21 (/ = ( /. However 1 (mod so that ( ( (a0 + 1 ( (22 = = by (5 and (6. When the sign in (18 is then the signs in (19 (21 and (22 are all reversed. P r o o f o f T h e o r e m 1. Since 0 = 1 1 = a 1 we interret 1 as 0 in the relation We then have 1 = a 1 0 + 1. 0 + 1 a 0 = 0 = 0 ( 0 For the induction ste we ut i / i = / and use the notation = a + of Lemma 1 with a = a i etc. As usual there are two cases. If i is odd then we take the + sign in (19 to get (23 ( 12 12 ( = 0. + 3 + = + + a 3. If i is even then we take the sign in (19 to get ( ( (24 12 12 = + a + 3. The theorem now follows by induction using (23 and (24 for alternate values of i u to i = n. Many roerties of edekind sums may be deduced at once from the theorem. The following results are due to Rademacher [8]. If 12(/ is an integer then by (6. However from (9 so that by (5 and (6 n 1 ( 1 n n (mod n ( n 1 / n = ( 1 n ( n / n n n 1 ( 1 n 1 (mod n ( n 1 / n = ( 1 n 1 ( n / n.
edekind sums and continued fractions 85 We deduce that (/ must be zero. In articular (/ never takes the values 1 2 3... The first use of edekind sums [4] was ( to comute the multilier system a b for the edekind eta function. Let M = be a matrix with ositive c d integer entries and determinant one. We note that a/c and b/d must be consecutive convergents for some continued fraction (if we allow the last artial uotient to be one and similarly for the other ratios. There are eight associated edekind sums in four airs: We have ( a c ( a b ( d c ( d b (a/c = (d/c (c/a = (b/a ( b d ( c d ( b a ( c a = c2 + d 2 + 1 12cd = b2 + d 2 + 1 12bd = a2 + c 2 + 1 12ac = a2 + b 2 + 1 12ab (a/b = (d/b (c/d = (b/d. 1 4 = a + d 12c 1 4 = a + d 12b 1 4 = a + d 12c 1 4 = a + d 12b b c 12d 1 4 c b 12d 1 4 b c 12a 1 4 c b 12a 1 4. We deduce that the various edekind sums are related by ( a + a + d c 12c 1 ( d 4 = a + d b 12b + 1 4 ( c = c b ( c d 12d = c b a 12a = 1 12 ψ(m where ψ(m is an integer that determines the twenty-fourth root of unity in the formula for η(mτ. For two such matrices M and N there should be a relation between ψ(m ψ(n and ψ(mn. There is a continued fraction with a/c and b/d as a consecutive convergents: a c = a 0 + 1 a 1 +... 1 a t and if c d > 0 then b d = a 0 + 1 a 1 +... 1 a t 1 ( a = 1 ( t + t 1 a 0 + a 1... + a t 1 c 12 4 t
86 R. R. Hall and M. N. Huxley but if d > c > 0 then b d = a 0 + 1 a 1 +... 1 a t+1 where a t+1 is the largest integer strictly less than d/c and ( a = 1 ( t + t 1 a 0 + a 1... + a t 1 c 12 4 = 1 12 t ( t + t+1 t a 0 + a 1... + a t a t+1 1 4. Here we may have a t = 1 or a t+1 = 1. If we define a t+1 in both cases to be the greatest integer strictly less than d/c which is zero when c d then in both cases ( a = 1 ( a + d a 0 + a 1... + a t a t+1 1 c 12 c 4. ( f e Similarly if N = is another integer matrix with s r f s = f 0 + 1 f 1 +... 1 f u and f u+1 is the greatest integer strictly less than r/s then ( f = 1 ( f + r f 0 + f 1... + f u f u+1 1 s 12 s 4. We have and ( af + bs ae + br MN = cf + ds ce + dr r ce + dr s cf + ds = c s(cf + ds < 1 s. Since any integer strictly less than r/s is at most (r 1/s we see that f u+1 is also the greatest integer strictly less than (ce + dr/(cf + ds. Now we form the continued fraction for (ce + dr/(cf + ds. We note the zero dro-out rule that b 0 + 1 b 1 +... 1 b v + 1 0+ 1 b v+2 +... 1 = b 0 + 1 b v+w b 1 +... 1 b v + b v+2 +... 1 b v+w the alternating sum of the b i remaining unchanged. There are two cases: if c d > 0 then we write af + bs cf + ds = tf/s + t 1 = a 0 + 1 t f/s + t 1 a 1 +... 1 1 a t + f 0 +... 1 f u
edekind sums and continued fractions 87 by the rules for continued fractions. If d > c > 0 then af + bs cf + ds = t + t+1 s/f t + t+1 s/f = a 0 + 1 a 1 +... 1 a t+1 + = a 0 + 1 a 1 +... 1 a t+1 + f 0 +... 1 f u. 1 0+ 1 f 0 +... 1 f u Whether or not we have to invoke the zero dro-out rule again we have (25 ψ(mn = a 0 a 1 +... a t +a t+1 +f 0... f u +f u+1 = ψ(m+ψ(n. When we ut ψ ( 1 b = b ψ 0 1 ( 1 0 = c c 1 then ψ is defined on the semigrou of integer matrices with non-negative entries and gives a homomorhism into Z the additive grou of integers. The semigrou is generated by ( ( 1 0 1 1 R = S =. 1 1 0 1 Rademacher [8] gives a rule for defining ψ(m for all matrices of the grou SL(2 Z. The identity (25 must ( be relaced by a congruence since the 0 1 grou contains a matrix T = with 1 0 T 2 = I (ST 3 = I R = T 1 S 1 T. The identity (25 can be written as ( ( ( a f af + bs (26 + = c2 + s 2 + (cf + ds 2 1 c s cf + ds 12cs(cf + ds 4 analogous to the functional euation (8. We note that if + + r + s = 0 then ( ( ( s s r s (27 = ( + ( + r( + ri. r r The matrices on the left have determinants greater than one. The matrix identity (27 suggests that (8 and (26 may be secial cases of some more comlicated identity. When we translate (26 into the notation of continued fractions then we find a new identity for edekind sums. Theorem 2 (interolation formula. For x rational we write E(x = (x x/6.
88 R. R. Hall and M. N. Huxley Suose that / / and / are rational numbers in their lowest terms with = u + v u + v = 1 where u and v are ositive integers with (u v = 1. Then E ( ( = λ E ( ( ( v E + (1 λ E u where λ = u /(u + v is defined by = λ + (1 λ. ( ( u + E v P r o o f. We use the notation of (26 writing a/c b/d and f/s for / / and u/v so that λ = cf cf + ds 1 λ = ds cf + ds. We write (26 as ( ( ( af + bs a f = + cf + ds c s c2 + s 2 + (cf + ds 2 12cs(cf + ds + 1 4. By Lemma 2 alied to a/c and b/d we have ( ( a a = λ + (1 λ c c ( b d s2 (c 2 + d 2 + 1 12cs(cf + ds 1 λ 4 so that ( ( af + bs a = λ + (1 λ cf + ds c ( b d + + c2 s 2 c 2 f 2 c 2 2cdfs 12cs(cf + ds. ( f s + λ 4 By the Corollary to Lemma 2 for f/s we have λ 4 = c2 (f 2 + s 2 + 1 12cs(cf + ds λ ( f s λ ( s f
edekind sums and continued fractions 89 and ( ( ( af + bs a b = λ + (1 λ cf + ds c d 2cs 2df + 12(cf + ds ( ( ( a s = λ + s c f 6f ( ( ( b f + (1 λ + d s λ ( s f f 6s + (1 λ which gives the result when we substitute for (x in terms of E(x. ( f s Rademacher [8] left many oen uestions about the value distribution of edekind sums. Hickerson [5] settled the conjecture that the values of the inhomogeneous sum (/ are dense on the real line by showing that the oints (/ (/ are dense in R 2. The construction again uses continued fractions. Given α and β real and ε > 0 we can secify a 0... a r so that all continued fractions beginning a 0 + 1 a 1 +... 1 a r + lie in the interval (α ε α+ε and b 1... b s so that all continued fractions beginning b 1 + 1 b 2 +... 1 b s + lie in an interval (γ ε γ + ε where (α + γ/12 β = e an integer. Here a 0 is an integer a 1... a r b 1... b s are ositive integers. We choose an odd integer n r + s + 2. We ut a n = b 1 a n 1 = b 2... a n s+1 = b 1 and choose a r+1... a n s so that a 0 a 1 +... a n = e 3. Then = n = a 0 + 1 n a 1 +... 1 a n lies in the interval (α ε α + ε with n 1 / n in the interval (γ ε γ + ε and (/ in the interval (β ε/6 β + ε/6 as reuired. The oints (/ (/ in two dimensions are concentrated close to the x-axis. The uniform distribution results of Vardi [9] and Myerson [7] use Weyl s criterion and bounds for generalized Kloosterman sums. The classical Kloosterman sum bound corresonds to the discreancy of the seuence in the unit suare for which x n runs through the rational numbers
90 R. R. Hall and M. N. Huxley / (ordered lexicograhically in their lowest terms form and y n through the numbers 12(/ reduced modulo one. The discreancy of the first N terms of this seuence is easily seen to be O(N 3/4 log 3 N; this estimate could be imroved using Kuznetsov s work on sums of Kloosterman sums. Bruggeman [2 3] has investigated the oints (/ (// in R 2 using the reresentation theory of the grou SL(2 Z. It would be of interest to investigate the distribution of edekind sums using the metrical theory of continued fractions. References [1] P. B a r k a n Sur les sommes de edekind et les fractions continues finies C. R. Acad. Sci. Paris Sér. A 284 (1977 923 926. [2] R. W. Bruggeman On the distribution of edekind sums in: Automorhic Functions and their Alications U.S.S.R. Acad. Sci. Khabarovsk 1990 82 89. [3] Eisenstein series and the distribution of edekind sums to aear. [4] R. edekind Erläuterung zu den Fragmenten xxviii in: Bernhard Riemanns gesammelte mathematische Werke over New York 1953. [5]. Hickerson Continued fractions and density results for edekind sums J. Reine Angew. Math. 290 (1977 113 116. [6]. E. Knuth Notes on generalized edekind sums Acta Arith. 33 (1977 297 325. [7] G. M y e r s o n edekind sums and uniform distribution J. Number Theory 28 (1988 233 239. [8] H. Rademacher edekind Sums (E. Grosswald ed. Carus Math. Monograhs 1972. [9] I. Vardi A relation between edekind sums and Kloosterman sums uke Math. J. 55 (1987 189 197. EPARTMENT OF MATHEMATICS UNIVERSITY OF YORK YORK YO1 5 ENGLAN SCHOOL OF MATHEMATICS UNIVERSITY OF WALES COLLEGE OF CARIFF CARIFF CF2 4AG WALES Received on 20.3.1992 and in revised form on 13.7.1992 (2244