Mathematica Moravica Vol. 5-2 (20), 9 27 Continued Fractions Expansion of D and Pell Equation x 2 Dy 2 = Ahmet Tekcan Abstract. Let D be a positive non-square integer. In the first section, we give some preliminaries from Pell equations and simple continued fraction expansion. In the second section, we give a formula for the continued fraction expansion of D for some specific values of D and then we consider the integer solutions of Pell equations x 2 Dy 2 = for these values of D including recurrence relations on the integer solutions of it.. Introduction Suppose that D be any positive non-square integer and N be any fixed integer. Then the equation () x 2 Dy 2 = ±N is known as Pell equation (x 2 Dy 2 = N is the Pell equation and x 2 Dy 2 = N is the negative Pell equation) and is named after John Pell (6-685), a mathematician who searched for integer solutions to equations of this type in the seventeenth century. Ironically, Pell was not the first to work on this problem, nor did he contribute to our knowledge for solving it. Euler (707-783), who brought us the ψ-function, accidentally named the equation after Pell, and the name stuck. The Pell equation in () has infinitely many integer solutions (, y n ) for n. The first non-trivial solution (x, y ) of this equation, from which all others are easily computed, can be found using, e.g., the cyclic method [], known in India in the 2th century, or using the slightly less efficient but more regular English method [] (7th century). There are other methods to compute this so-called fundamental solution, some of which are based on a continued fraction expansion of the square root of D (For further details on Pell equation see [, 2, 3, 4, 5, 6, 7, 8, 9]). Received by the editors 8.0.200. 2000 Mathematics Subject Classification. Primary: D04, D09; Secondary: D75. Key words and phrases. Pell equation, solutions of the Pell equation, continued fractions. 9 c 20 Mathematica Moravica
20 Continued Fractions Expansion of D and Pell Equation x 2 Dy 2 = For N =, the Pell equation (2) x 2 Dy 2 = ± is known the classical Pell equation. The Pell equation x 2 Dy 2 = was first studied by Brahmagupta (598-670) and Bhaskara (4-85). Its complete theory was worked out by Lagrange (736-83), not Pell. It is often said that Euler (707-783) mistakenly attributed Brouncker s (620-684) work on this equation to Pell. However the equation appears in a book by Rahn (622-676) which was certainly written with Pell s help: some say entirely written by Pell. Perhaps Euler knew what he was doing in naming the equation. Recall that a simple continued fraction of order n is an expression of the form (3) a 0 + a + a 2 + a 3 + + a n which can be abbreviated as [a 0 ; a, a 2,, a n ]. Note that in a simple continued fraction a 0 may be a positive or negative integer or zero. The a n s of a simple continued fraction (3) are called the terms of the continued fraction. If the number of the terms of a simple continued fraction is finite, as indicated in (3), then the continued fraction is a finite simple continued fraction. If the number of terms of a simple continued fraction is infinite, such as [a 0 ; a, ], then the continued fraction is an infinite continued fraction. The n th approximant of the continued fraction [a 0 ; a, ] is denoted by Pn Q n, and P n Q n P n Q n = ( ) n, P n+ = a n+ P n + P n, Q n+ = a n+ Q n + Q n for n. 2. Continued Fraction Expansion of D and the Pell Equation x 2 Dy 2 = In [0-5], we considered some specific Pell equations and their integer solutions. Further, we derived some recurrence relations on the integer solutions of these Pell equations. In this paper, we will consider the continued fraction expansion of D for some specific values of D namely D = k 2 +, k 2, k 2 + 2, k 2 2, k 2 + k and k 2 k, where k is any positive integer and also consider the integer solutions of x 2 Dy 2 = for these values of D via simple finite continued fraction expansion of D including recurrence relations on the integer solutions of x 2 Dy 2 =.
Ahmet Tekcan 2 Theorem 2.. Let k be any integer, and let D = k 2 +.. The continued fraction expansion of D is D = [; 2] if k = (4) [k; 2k] if k >. 2. (x, y ) = (2k 2 +, 2k) is the fundamental solution. Set {(, y n )}, where = k; 2k,, 2k 2n times for n 2. Then (, y n ) is a solution of x 2 (k 2 + )y 2 =. 3. The consecutive solutions (, y n ) and (+, y n+ ) satisfy + = (2k 2 + ) + (2k 3 + 2k)y n y n+ = 2k + (2k 2 + )y n for n. 4. The solutions (, y n ) satisfy the following recurrence relations = (4k 2 + ) ( + 2 ) 3 y n = (4k 2 + ) (y n + y n 2 ) y n 3 Proof.. Let D = k 2 +. If k =, then it is easily seen that 2 = [; 2]. Let k >. Then we easily get k 2 + = k + ( k 2 + k) = k + = k + k 2 ++k ( k 2 + k)( k 2 ++k) k 2 + k = k + k 2 + + k = k + ( k ). 2 + k So D = [k; 2k]. 2. Let D = [a 0 ; a, a 2,, a l ] denote the continued fraction expansion of period length l. Set A 2 = 0, A =, A k = a k A k + A k 2 and B 2 =, B = 0, B k = a k B k + B k 2 for nonnegative integer k. Then it is given in [7] that C k = A k B k is the k-th convergent of D, and the fundamental solution of x 2 Dy 2 = is (x, y ) = (A l, B l ) if l is even or (A 2l, B 2l ) if l is odd. Moreover, if l is odd, then the the fundamental solution of x 2 Dy 2 = is (x, y ) = (A l, B l ). We see as above that D = [k; 2k]. So we get A 0 = k, A = 2k 2 +, B 0 = and B = 2k. Therefore (x, y ) = (A, B ) = (2k 2 +, 2k) is the fundamental solution. Indeed (2k 2 + ) 2 (k 2 + )(2k) 2 =.
22 Continued Fractions Expansion of D and Pell Equation x 2 Dy 2 = Now we assume that (, y n ) is a solution of x 2 (k 2 + )y 2 =. Then x 2 n (k 2 + )y 2 n =. Applying (4), we get + = k + y n+ = k + = k + k + k + k+ xn yn + 2k + 2k (5) = (2k2 + ) + (2k 3 + 2k)y n 2k + (2k 2 + )y n. Applying (5), we find that x 2 n+ (k 2 + )y 2 n+ = [ (2k 2 + ) + (2k 3 + 2k)y n ] 2 (k 2 + ) [ 2k + (2k 2 + )y n ] 2 = (2k 2 + ) 2 x 2 n + 2(2k 2 + )(2k 3 + 2k) y n + (2k 3 + 2k) 2 y 2 n (k 2 + )(4k 2 x 2 n + 4k(2k 2 + ) y n + (2k 2 + ) 2 y 2 n = x 2 n((2k 2 + ) 2 4k 2 (k 2 + )) + y n (2(2k 2 + )(2k 3 + 2k) 4k(k 2 + )(2k 2 + )) + y 2 n((2k 3 + 2k) 2 (k 2 + )(2k 2 + ) 2 ) = x 2 n (k 2 + )y 2 n =. Therefore (+, y n+ ) is also a solution of x 2 (k 2 + )y 2 =. 3. This assertion is clear by (5) since + = (2k 2 +) +(2k 3 +2k)y n and y n+ = 2k + (2k 2 + )y n.
Ahmet Tekcan 23 4. We prove this recurrence relation only for (6) = (4k 2 + ) ( + 2 ) 3 by induction on n. Applying (4), we get x = 2k 2 +, x 2 = 8k 4 + 8k 2 +, x 3 = 32k 6 + 48k 4 + 8k 2 + and x 4 = 28k 8 + 256k 6 + 60k 4 + 32k 2 +. The recurrence relation in (6) is true for n = 4 since x 4 = (4k 2 + )(x 3 + x 2 ) x = (4k 2 + )(32k 6 + 48k 4 + 8k 2 + + 8k 4 + 8k 2 + ) (2k 2 + ) = (4k 2 + )(32k 6 + 56k 4 + 26k 2 + 2) (2k 2 + ) = 28k 8 + 224k 6 + 04k 4 + 8k 2 + 32k 6 + 56k 4 + 26k 2 + 2 2k 2 = 28k 8 + 256k 6 + 60k 4 + 32k 2 +. Let assume that the equality = (4k 2 + ) ( + 2 ) 3 is satisfied for n, that is, (7) = (4k 2 + ) ( 2 + 3 ) 4. (8) We see as above that + = (2k 2 + ) + (2k 3 + 2k)y n. Hence = (2k 2 + ) 2 + (2k 3 + 2k)y n 2 2 = (2k 2 + ) 3 + (2k 3 + 2k)y n 3 3 = (2k 2 + ) 4 + (2k 3 + 2k)y n 4. (7) and (8) yield that = (4k 2 + ) ( + 2 ) 3 for n 4. Example 2.. Let k = 4. Then 7 = [4, 8]. Further, the fundamental solution of x 2 7y 2 = is (x, y ) = (33, 8) and since 277/528 = [4; 8, 8, 8] 43649/34840 = [4; 8, 8, 8, 8, 8] 9478657/229892 = [4; 8, 8, 8, 8, 8, 8, 8] 62544773/5693352 = [4; 8, 8, 8, 8, 8, 8, 8, 8, 8] 427007040/0009462320 = [4; 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8] the other solutions are and etc. (x 2, y 2 ) = (277, 528), (x 3, y 3 ) = (43649, 34840) (x 4, y 4 ) = (9478657, 229892), (x 5, y 5 ) = (62544773, 5693352) (x 6, y 6 ) = (427007040, 0009462320), Now we consider the other cases of D without giving their proof since they can be proved as in the same way that Theorem 2. was proved.
24 Continued Fractions Expansion of D and Pell Equation x 2 Dy 2 = Theorem 2.2. Let k 2 be any integer, and let D = k 2.. The continued fraction expansion of D is D = [k ;, 2k 2]. 2. (x, y ) = (k, ) is the fundamental solution. Set {(, y n )}, where = k ;, 2k 2,,, 2k 2,, 2k n 2 times for n 2. Then (, y n ) is a solution of x 2 (k 2 )y 2 =. 3. The consecutive solutions (, y n ) and (+, y n+ ) satisfy + = k + (k 2 )y n y n+ = + ky n for n. 4. The solutions (, y n ) satisfy the following recurrence relations = (2k ) ( + 2 ) 3 y n = (2k ) (y n + y n 2 ) y n 3 Theorem 2.3. Let k be any integer, and let D = k 2 + 2.. The continued fraction expansion of D is D = [k; k, 2k]. 2. (x, y ) = (k 2 +, k) is the fundamental solution. Set {(, y n )}, where = k; k, 2k,, k, 2k, k n times for n 2. Then (, y n ) is a solution of x 2 (k 2 + 2)y 2 =. 3. The consecutive solutions (, y n ) and (+, y n+ ) satisfy + = (k 2 + ) + (k 3 + 2k)y n y n+ = k + (k 2 + )y n for n. 4. The solutions (, y n ) satisfy the following recurrence relations = (2k 2 + ) ( + 2 ) 3 y n = (2k 2 + ) (y n + y n 2 ) y n 3 Theorem 2.4. Let k 2 be any integer, and let D = k 2 2.. The continued fraction expansion of D is D = [, 2] if k = 2 [k ;, k 2,, 2k 2] if k > 2.
Ahmet Tekcan 25 2. (x, y ) = (k 2, k) is the fundamental solution. Set {(, y n )}, where = k ;, k 2,, 2k 2,,, k 2,, 2k 2,, k n times for n 2. Then (, y n ) is a solution of x 2 (k 2 2)y 2 =. 3. The consecutive solutions (, y n ) and (+, y n+ ) satisfy + = (k 2 ) + (k 3 2k)y n y n+ = k + (k 2 )y n for n. 4. The solutions (, y n ) satisfy the following recurrence relations = (2k 2 3) ( + 2 ) 3 y n = (2k 2 3) (y n + y n 2 ) y n 3 Theorem 2.5. Let k be any integer, and let D = k 2 + k.. The continued fraction expansion of D is D = [, 2] if k = [k; 2, 2k] if k >. 2. (x, y ) = (, 2) is the fundamental solution. Set {(, y n )}, where = k; k, 2k,, k, 2k, 2 n times for n 2. Then (, y n ) is a solution of x 2 (k 2 + k)y 2 =. 3. The consecutive solutions (, y n ) and (+, y n+ ) satisfy + = ( ) + (2k 2 + 2k)y n y n+ = 2 + ( )y n for n. 4. The solutions (, y n ) satisfy the following recurrence relations = (4k + ) ( + 2 ) 3 y n = (4k + ) (y n + y n 2 ) y n 3 Theorem 2.6. Let k 2 be any integer, and let D = k 2 k.. The continued fraction expansion of D is D = [, 2] if k = 2 [k ; 2, 2k 2] if k > 2.
26 Continued Fractions Expansion of D and Pell Equation x 2 Dy 2 = 2. (x, y ) = (2k, 2) is the fundamental solution. Set {(, y n )}, where = k ; 2, 2k 2,, 2, 2k 2, 2 n times for n 2. Then (, y n ) is a solution of x 2 (k 2 k)y 2 =. 3. The consecutive solutions (, y n ) and (+, y n+ ) satisfy + = (2k ) + (2k 2 2k)y n y n+ = 2 + (2k )y n for n. 4. The solutions (, y n ) satisfy the following recurrence relations = (4k 3) ( + 2 ) 3 y n = (4k 3) (y n + y n 2 ) y n 3 References [] H.M. Edward, Fermat s Last Theorem: A Genetic Introduction to Algebraic Number Theory, Graduate Texts in Mathematics, vol. 50, Springer-Verlag, 977. [2] P. Kaplan and K.S. Williams, Pell s Equations x 2 my 2 =, 4 and Continued Fractions, Journal of Number Theory 23 (986) 69 82. [3] H.W. Lenstra, Solving The Pell Equation, Notices of the AMS, No:2, 49 (2002) 82 92. [4] K. Matthews, The Diophantine Equation x 2 Dy 2 = N, D > 0, Expositiones Math. 8(2000) 323 33. [5] R.A. Mollin, A.J. Poorten and H.C. Williams, Halfway to a Solution of x 2 Dy 2 = 3, Journal de Theorie des Nombres Bordeaux 6(994) 42 457. [6] R.A. Mollin. Simple Continued Fraction Solutions for Diophantine Equations, Expositiones Mathematicae 9 ()(200), 55 73. [7] R.A. Mollin. Fundamental Number Theory with Applications, Second Edition (Discrete Mathematics and Its Applications) Chapman & Hall/ CRC, Boca Raton, London, New York, 2008. [8] F. Smarandache, Method to Solve the Diophantine Equation x x 2 y y 2 + c = 0, In Collected Papers, Vol.. Lupton, AZ: Erhus University Press, 996. [9] P. Stevenhagen, A Density Conjecture for the Negative Pell Equation, Computational Algebra and Number Theory, Math. Appl. 325(992) 87 200. [0] A. Tekcan, Pell Equation x 2 Dy 2 = 2, II, Bulletin of the Irish Math. Soc. 54(2004) 73 89. [] A. Tekcan, The Pell Equation x 2 Dy 2 = ±4, App. Math. Sci. (8)(2007), 363 369. [2] A. Tekcan and O. Bizim, The Pell Equation x 2 + xy ky 2 = ±, Global Journal of Pure and Applied Mathematics 4(2)(2008), 05 2.
Ahmet Tekcan 27 [3] A. Tekcan, The Pell Equation x 2 (k 2 k)y 2 = 2 t, Int. J. of Maths. Sci. 2()(2008), 5 9. [4] A. Tekcan and A.Özkoç, The Diophantine Equation x 2 (t 2 + t)y 2 (4t + 2)x + (4t 2 + 4t)y = 0, Revista Matemática Complutense 23()(200), 25 260. [5] A. Tekcan, The Number of Solutions of Pell Equations x 2 ky 2 = N and x 2 + xy ky 2 = N over F p, Ars Combinatoria 02(20), 225 236. Ahmet Tekcan Uludag University Faculty of Science Department of Mathematics Görükle, 6059 Bursa-TURKIYE E-mail address: tekcan@uludag.edu.tr URL: http://matematik.uludag.edu.tr/ahmettekcan.htm