Indian J Pure Appl Math, 48(3): 311-31, September 017 c Indian National Science Academy DOI: 101007/s136-017-09-4 ON THE LENGTH OF THE PERIOD OF A REAL QUADRATIC IRRATIONAL N Saradha School of Mathematics, Tata Institute of Fundamental Research, Homi Bhabha Road, Mumbai 400 005, India e-mail: saradha@mathtifrresin (Received 11 November 016; after final revision 5 January 017; accepted 7 January 017) We review some known and not so well known results on the length of the period of the continued fraction expansion of a quadratic irrational D with D > 0 We also show that this length is o((d log D) 1/ ) for almost all D Key words : Quadratic irrational; continued fraction expansion; period; length 1 INTRODUCTION AND STATEMENTS OF THE RESULTS Let D be a positive non-square integer We shall denote by ω(d) the number of distinct prime divisors of D and h(d) the class number of the quadratic field Q( D) In the seventies, there have been several articles on the classical problem of estimating l(d) the length of the period of the continued fraction expansion of D See Cohn [5], Hickerson [9], Hirst [10], Stanton, Sudler & Williams [15], Williams [17] and Lu [1] From the results in these papers we now know that if D is square free then l(d) < 04D 1/ log D In fact using the theory of genera, one can have l(d) D 1/ log D/ ω(d) Also under GRH, by a result of Littlewood [11], we obtain l(d) D 1/ log log D
31 N SARADHA In [17], l(d) has been calculated for all D < 10 7 and these calculations indicate that unconditionally we must have l(d) = o(d log D) 1/ (1) By taking D = m + 1, one sees that there is an infinite sequence of values of D for which l(d) = 1 For general non-square D > 0, write D = D 0 s () where D 0 is the square free factor of D Improving on the result of [10], it is shown in [15] that l(d) < 376D 1/ log(d 0 ) On the other hand, regarding the lower bound for l(d) the following result was shown in [15] Theorem SSW Suppose the following hypothesis H holds: There exists an infinite sequence S of square free numbers D such that h(d) = o(d ɛ ) for D in S and all ɛ > 0 Then l(d) D 1/ ɛ In fact, a stronger hypothesis is believed to be true viz, h(d) = 1 for infinitely many square free numbers D All the above said papers have no mention of some earlier papers of Vijayaraghavan [16], Chowla [], Chowla & Pillai [3] and Pillai [13] which have appeared from 195 to 1930 These papers have been brought to light in the Collected works of Pillai [6] It has been shown in [3] (see [6, No 1, 010, pp 6-67]) that D l(d) D (3) for infinitely many values of D Unfortunately, there are some errors in the proof of the left hand side inequality For instance, [3, Lemma 1] is wrong and the proof of [3, Lemma ] unclear but the result is well known In Lemma 1 of [3], the authors attributed the following result to Lagrange: If 1 < m < D, m = u v D, gcd(u, v) = 1 then m occurs as a partial quotient in the simple continued fraction for D This result is wrong as seen from several examples, for instance D = 47, m =, 7 47 =, 47 = [6, 1, 5, 1, 1]; D = 59, m = 5, 8 59 = 5, 59 = [7, 1,, 7,, 1, 14];
ON THE LENGTH OF THE PERIOD OF A REAL QUADRATIC IRRATIONAL 313 D = 109, m = 5, 1 (109) = 5, 109 = [10,, 3, 1,, 4, 1, 6, 6, 1, 4,, 1, 3,, 0] They have also claimed that if the class number h(d) = 1, then x Dy = 1 is solvable This is untrue for D = 7 Thus the left hand side inequality in (3) remains unproven and so far, the result of [15] in Theorem SSW remains the best known Here again, Vijayaraghavan [16] had shown that Theorem V We have l(d) D 1/ ɛ for infinitely many values of square free D His proof depends on a result of Schur which we shall state later On the other hand Chowla and Pillai have proved that Theorem CP Let D be square free Then l(d) is, on average, of order D We shall reproduce the proofs of Vijayaraghavan and Chowla & Pillai below All the results on upper bound for l(d) quoted above have been proved in the papers [16] and [3] except for the explicit constants In fact in [13] (see [6, No 1, 010, pp 113-11]), it was shown that l(d) (1 + o(1))d 1/ log D Our aim in this note is to publicize the ideas in these papers and prove the following result in support of the conjecture in (1) on the upper bound for l(d) Theorem 11 Let ɛ > 0 For almost all values of square free D, we have l(d) 65 ɛ D(log D) 1 log Further, for almost all values of D, we have l(d) 16 ɛ D(log D 0 ) 1 log For large values of D, it is possible to improve the constants Note that 1 log 307 Thus (1) is true for almost all D
314 N SARADHA PRELIMINARIES 1 Continued Fraction Let l = l(d) and D = [a0, a 1,, a l 1, a 0 ] be the simple continued fraction expansion of D with a 0 = [ D] Let P = 0, P 1 = 1, Q = 1, Q 1 = 0 and for n 0, P n = a n P n 1 + P n ; Q n = a n Q n 1 + Q n Then P n /Q n is the n th convergent to the continued fraction of D Setting ξ 0 = D, m 0 = 0, b 0 = 1 define (ξ i, m i, b i ) for i 1, recursively as follows a i = [ξ i ], ξ i = m i + D b i, m i+1 = a i b i m i, b i+1 = D m i+1 b i (4) Then one may check (see [14]) that m i and b i are integers, b i 0, with (i) 0 < m i < D, (ii) D mi < b i < D + m i, (iii) b i (D m i ), (iv) a i D for i 1 (v) b i = 1 if and only if l i and b i 1 for any i It can be seen that ξ i for i 1 are reduced quadratic irrationals By (i) and (ii), the number of distinct ξ i s is at most ([ D])([ D] + 1) Since each a i comes from a different ξ i, we have l (35)D In fact, from (i)-(iv), it is also clear that D l d (0) (D x ) (5) x=1
ON THE LENGTH OF THE PERIOD OF A REAL QUADRATIC IRRATIONAL 315 where d (0) (D x ) denotes the number of divisors of D x between D x and D + x Pell s Equations It is well known that (P l 1, Q l 1 ) is the least positive solution of the Pell s equation x Dy = ±1 according as l is even or odd Let us denote by η the quantity η = P l 1 + DQ l 1 (6) Then η is a unit in Q( D) Let ɛ 0 = (u 0 + v 0 D)/ be the fundamental unit of Q( D) Then η = ɛ µ 0 (7) where Note that µ 1 if D 5(mod 8); µ 3 if D 5(mod8) (8) P l 1 (a l 1 + 1)(a l + 1) (a + 1)(a 1 P 0 + P 1 ) ( D + 1) l and Q l 1 (a l 1 + 1)(a l + 1) (a + 1)(a 1 Q 0 + Q 1 ) ( D + 1) l 1 Thus P l 1 + DQ l 1 ( D + 1) l (9) Further it can be seen easily that P l 1 > (( 5 + 1)/) l 1 ; Q l 1 > (( 5 + 1)/) l giving P l 1 + DQ l 1 (( 5 + 1)/) l ; (10) We state and prove two lemmas on purely periodic irrationals which will be used in the proof of Theorem V Lemma 1 Suppose θ > 0 and θ = [a 1,, a n ] Then θ = p n q n 1 + (p n + q n 1 ) 4( 1) n q n
316 N SARADHA PROOF : We have Thus θ = [a 1,, a n, θ] = θp n + p n 1 θq n + q n 1 q n θ + θ(q n 1 p n ) p n 1 = 0 Solving this quadratic equation, we have θ = p n q n 1 ± (p n q n 1 ) + 4p n 1 q n q n = p n q n 1 ± (p n + q n 1 ) 4(p n q n 1 p n 1 q n ) q n which gives the result since p n q n 1 p n 1 q n = ( 1) n and θ > 0 Lemma Suppose P + D Q = [a 1,, a n ] Then there exists a solution (X, Y ) of x Dy = 1 with and if p n + q n 1 is odd, then PROOF : By Lemma 1, X = p n + q n 1 if p n + q n 1 is even ( ) pn + q n 1 1 3 ( ) pn + q n 1 1 X = 4 + 6 1 P + D Q = p n q n 1 + (p n + q n 1 ) 4 q n Hence there exists an integer S such that (p n + q n 1 ) DS = 4 (11) Suppose p n + q n 1 is even Then (11) implies that S is even Thus in this case we may take X = p n + q n 1 Suppose p n + q n 1 is odd, say m + 1 Then we use the identity ((p n + q n 1 ) 4)(m + m) = (4m 3 + 6m 1) 1 to obtain the result
ON THE LENGTH OF THE PERIOD OF A REAL QUADRATIC IRRATIONAL 317 3 Class Number Formula Let D > 1 be square free and let be the discriminant of the quadratic field Q( D) Then D if D 1(mod 4) = 4D otherwise (1) Then the well known class number formula for Q( D) is log ɛ 0 = L(1, χ D )/h (13) where h is the class number of Q( D) and L(1, χ D ) is the Dirichlet L series n=1 χ D (n) n with χ D (n) denoting the quadratic real character given by the Kronecker symbol ( n D ) It is a well known fact that We combine (9) and (10) with (7) and (13) to get ω(d) h (14) l(d) µ log ɛ 0 log log( D + 1) = µ L(1, χd ) h log h log( D + 1) (15) and l(d) µ log ɛ 0 log α µ L(1, χd ) h log( 5+1 ) (16) 3 MORE LEMMAS From the calculations in [17] we get Lemma 31 Let D be a squre free integer with < D < 10 7 Then l(d) (151 + ɛ) D log log D Under GRH, for any square free integer D, we have l(d) (e γ / log α + ɛ) D log log D (371 + ɛ) D log log D where γ is Euler s constant and α = 1+ 5 For the next lemma, see Ayoub [1, p 338]
318 N SARADHA Lemma 3 We have, 0 < L(1, χ D ) < 3 log D In fact, where ϕ is the Euler s Totient function 0 < L(1, χ) < log D + ϕ(d) D The following lemma on the normal order of ω(q) for any integer Q > 1 is well known See [8, p 356] Lemma 33 Let Q > 1 be any integer The normal order of ω(q) is log log Q As a consequence, we find that for any given ɛ > 0, for almost all Q in the sense of density as given in [8, p 8] log log Q ɛ ω(q) log log Q + ɛ (17) 4 PROOFS OF THE THEOREMS PROOF OF THEOREM V : Let (P, Q) = (m i, b i ) for some i chosen as in (4) Then P + D Q is purely periodic Let n be the smallest even period of P + D Q Then l(d) n and by Lemma and (9), the least positive solution of x Dy = 1 satisfies Thus x (p n + q n 1 ) 3 8( D + 1) 3n n log x log 8 3 log( D + 1) (18) Vijayaraghavan uses a result of Schur, that there exist infinitely many values of D for which Hence by taking D large, we get log x D 1/ ɛ/, ɛ > 0 l(d) n D 1/ ɛ for infinitely many values of D PROOF OF THEOREM SSW : By (15) l(d) µ log ɛ 0 log log( D + 1) = µh log ɛ 0 h log h log( D + 1) (19)
ON THE LENGTH OF THE PERIOD OF A REAL QUADRATIC IRRATIONAL 319 By Siegel s theorem on the size of L(1, χ), (see [7, p 130]) there exists D 0 (ɛ) such that for D > D 0 (ɛ), we have h log ɛ 0 > D 1/ ɛ/ Thus if the hypothesis H holds, then (19) implies that for infinitely many values of D l(d) D 1/ ɛ Remark : As seen above Theorem V depends on a deep result of Schur, which I am not able to access Theorem SSW depends on the unproven hypothesis H It will be interesting to access Schur s result and see if it can be avoided in the proof of Theorem V PROOF OF THEOREM CP : By (5) we have D x l(d) D x x y x D=y +1 where θ(m) is the number of values of D such that y D d (0) (D y ) d (0) (D y ) y+ x y x m=1 θ(m) (0) D y 0(mod m) (1) with D y < m < D + y The preceding condition implies that m + y my < D < m + y + my Hence D takes 4my consecutive values of which (1) will be satisfied for [(4my 1)/m] = 4y 1 values Hence θ(m) = 4y 1 Hence from (0), we get l(d) (y + x)(4y 1) D x y x x( (x) + 1)(10 x + )/3 65x 3/ This proves the assertion of the theorem
30 N SARADHA PROOF OF THEOREM 11 : Let D be a square free integer By Lemma 31, if D < 10 7, then l(d) 45 D Hence we may assume that D 10 7 By (16), (14) and Lemma 3 we have l(d) 64 D(log D + 1)/ ω(d) Using Lemma 33 here, we find that for almost all D, as desired l(d) (65) ɛ D(log D) 1 log Now we prove the result for any D = D 0 s Suppose (a s, b s ) be the least positive solution of x Dy = x D 0 s y = ±1 Then it is well known that η s = a s + b s D = as + sb s D0 = η e(s) 1 with η 1 = a 1 +b 1 D and e(s) s See [15] Now by (7), with ɛ0 = ɛ 1 where ɛ 1 is the fundamental unit of Q( D 0 ), we get Thus l(d) log η s log α < µe(s) log ɛ 1 log α < µs log ɛ 1 log α This gives Arguing as before, we find that l(d) µs D 0 L(1, χ D0 ) h log α l(d) 16 D log D 0 ω(d 0) l(d) 16 ɛ D(log D 0 ) 1 log for almost all D 0 and hence for almost all D ACKNOWLEDGEMENT I would like to thank the referee for reading through the manuscript carefully and pointing some corrections and making useful suggestions
ON THE LENGTH OF THE PERIOD OF A REAL QUADRATIC IRRATIONAL 31 REFERENCES 1 R Ayoub, An introduction to the theory of numbers, AMS 1963, Providence, Rhode Island S Chowla, On the order of N(R), the number of terms in the period of the continued fraction for R, The J of Indian Math Soc, 18 (199), 14-144 3 S Chowla and S S Pillai, Periodic simple continued fractions, Proc London Math Soc, 6 (1930), 85-89 4 H Cohn, A second course in number theory, New York, John Wiley, 196 5 J H E Cohn, The length of the period of the simple continued fraction of d, Pacific J Math, 71(1) (1977), 1-3 6 Collected Works of S S Pillai, Volumes I & II, vol eds, R Balasubramanian and R Thangadurai, Ramanujan Mathematical Society, 010 7 H Davenport, Multiplicative number theory, Chicago, Markham, 1967 8 G H Hardy and E M Wright, An introduction to the theory of numbers, Fifth Edition, Oxford Univ Press 1981 9 D Hickerson, Length of period of simple continued fraction expansion of d, Pacific J Math, 46 (1973), 49-43 10 K Hirst, The length of periodic continued fractions, Monatsh Math, 76 (197), 48-435 11 J E Littlewood, On the class-number of the corpus P ( k), Proc London Math Soc, 7() (198), 358-37 1 H W Lu, The length of the simple continued fraction of a real quadratic irrational number, Acta Math Sinica, 9(4) (1986), 433-443 13 S S Pillai, Periodic simple continued fractions, Annamalai Univ J, iv()(1935), 16-5 14 H E Rose, A course in number theory, Clarendon Press-Oxford,1994 15 R G Stanton, C Sudler and H C Williams, An upper bound for the period of the simple continued fraction for D, Pacific J Math, 67 (1976), 55-536 16 T Vijayaraghavan, Periodic simple continued fraction, Proc London Math Soc, 6() (197), 403-414 17 H C Williams, A numerical investigation into the length of the period of the continued fraction expansion of D, Math Computation, 36 (154) (1984), 593-601