International Journal of Algebra, Vol. 1, 2007, no. 6, 293-302 Diohantine Equations and Congruences R. A. Mollin Deartment of Mathematics and Statistics University of Calgary, Calgary, Alberta, Canada, T2N 1N4 htt://www.math.ucalgary.ca/ ramollin/ ramollin@math.ucalgary.ca Abstract We resent conditions for quadratic Diohantine equations of the form ax 2 by 2 = ±1, (where 1 <a<bare integers) for which there are no solutions (x, y), yet for which there are solutions modulo n for all n 1. This generalizes work in the literature which follow as very secial cases. Mathematics Subject Classification: Primary: 11D09, 11R11, 11A55; Secondary: 11R29 Keywords: quadratic Diohantine equations, continued fractions, central norms, fundamental units, modular solvability 1 Introduction Texts on the fundamentals of number theory, such as [3,. 208] and [9,. 207], discuss the Diohantine equation 2x 2 219y 2 = 1 which has no integer solutions x, y, yet for which 2x 2 219y 2 1 (mod n) has integer solutions for all moduli n N. In [9], Nagell is credited with having roved the modular solvability as a deduction from a deeer theorem resented in [8]. However, in none of [3], [8] or [9] is there any connection with the real reason underlying this henomenon, namely the underlying continued fraction exansions of certain quadratic surds and related central norms which we will exlain in the next section. More recently such results for x 2 by 2 = 1 were generalized in [1] when = 2, and for a general rime in [5], but only in the latter are the underlying continued fraction reasons rovided. It is the intention herein to generalize to the case where a>1 is any natural number.
294 R. A. Mollin 2 Notation and Preliminaries We will consider the simle continued fraction exansion of D, where D>0 is not a erfect square, and whose eriod length we denote by l = l( D) and whose artial quotients we denote by q j for j 0, where q 0 = D (the floor of D), and q 1 q 2,...,q l 1 is a alindrome. The jth convergent of α for j 0 are given by, A j B j = q 0 ; q 1,q 2,...,q j, where A j = q j A j 1 + A j 2, B j = q j B j 1 + B j 2, with A 2 =0,A 1 =1,B 2 =1,B 1 = 0. The comlete quotients are given by, (P j + D)/Q j, where P 0 =0,Q 0 = 1, and for j 1, P j+1 = q j Q j P j, (2.1) P j + D q j =, Q j and D = Pj+1 2 + Q j Q j+1. We will also need the following facts (which can be found in most introductory texts in number theory, such as [3]. Also, see [2] for a more advanced exosition). A 2 j 1 Bj 1D 2 =( 1) j Q j. (2.2) In articular, A 2 l 1 B2 l 1 D =( 1)l, (2.3) and it follows that (x 0,y 0 )=(A l 1,B l 1 ) is the fundamental solution of the Pell Equation x 2 Dy 2 =( 1) l. When l is even, P l/2 = P l/2+1, so by Equation (2.1), Q l/2 2P l/2, where Q l/2 is called the central norm, (via Equation (2.2)), where Q l/2 2D. (2.4) In the following (which we need in the next section), and all subsequent results, the notation for the A j, B j, Q j and so forth aly to the abovedeveloed notation for the continued fraction exansion of D.
Diohantine equations and congruences 295 Proof of the following elementary number-theoretic results may be found in most introductory texts on the subject such as [3], for instance. Theorem 2.1 Let c Z be odd and let α N. Then each of the following holds. 1. There exists an z Z with c z 2 (mod 2 α ) if and only if c 1 (mod gcd(2 α, 8)). 2. If is an odd rime not dividing c and α N, then there exists an z Z such that c z 2 (mod α ) if and only if the following Legendre symbol equality holds ( ) c =1. 3. If u, v, w Z and is an odd rime dividing neither u nor v 2 4uw, then the following Legendre symbol equaity holds 1 ( ) ( ) ux 2 + vx + w u =. x=0 Theorem 2.2 Suose that D = ab is a ositive integer that is not a erfect square, where 1 <a<band l = l( D) is even. Then whenever has a solution we have 1. A l 1 ( 1) l/2 (mod 2b), and 2. Q l/2 = a. ax 2 by 2 = ±1 in the simle continued fraction exansion of D. Proof. This is a consequence of a more far-reaching result in [4] where detailed criteria for l to be even, in terms of solvability of Diohantine equations such as the above, are rovided.
296 R. A. Mollin 3 Congruences & Quadratic solvability In what follows the notation from the revious section is in force. Theorem 3.1 Suose that 1 < a < b are integers such that each of the following conditions hold. 1. a 7 (mod 8). 2. b is a quadratic residue modulo a. 3. a is a quadratic residue modulo b. 4. A l 1 ( 1) l/2 (mod 2b), where l = l( ab) is the eriod length of the simle continued fraction exansion of ab with ab not a erfect square. Then ax 2 by 2 = 1 (3.5) has no solutions x, y Z, whereas has solutions x, y Z for all n N. ax 2 by 2 1 (mod n) (3.6) Proof. Since a 3 (mod 4), then by Equation (2.3), with D = ab, l must be even. Therefore, since A l 1 ( 1) l/2 (mod 2b), we may invoke Theorem 2.2 to conclude that Equation (3.18) is not solvable for any x, y Z. Now we show that Equation (3.19) is solvable for all n N. Clearly if n = 1, it is solvable for any x, y Z. By the Chinese remainder Theorem, it suffices to rove the result for n>1 when n is a rime ower. If n =2 α, for α N then, given that a 1 (mod 8), then by art 1 of Theorem 2.1, there exists z Z such that a z 2 (mod 2 α ). Let z 1 be an integer which is a multilicative inverse of z modulo 2 α, and set x = z 1, and y = 0. Then ax 2 by 2 az 2 1 (mod 2 α ). Suose that n = α where is an odd rime dividing a and α N. Part 2 of the hyothesis allows us to invoke art 2 of Theorem 2.1, so there exists z Z such that b z 2 (mod α ). If we set x = 0 and y = z 1 where z 1 is a multilicative inverse of z modulo α, then ax 2 by 2 bz 2 1 (mod α ). Now let n = α for c N( where ) is an odd rime not dividing a. If the Legendre symbol equality = 1 holds, then by art 2 of Theorem 2.1, a
Diohantine equations and congruences 297 there exists z Z such that a z 2 (mod α ). Let x = a 1 z and y = 0 where a 1 is a multilicative inverse of a modulo α. Then ax 2 by 2 a a 2 z 2 1 (mod α ). ( ) a Lastly, there is the case where the Legendre symbol equality = 1 holds. Since art 3 of the hyothesis holds, we may invoke art 3 of Theorem 2.1, so there exists t Z such that ( ) 1 bt 2 = 1. Therefore, ( ) abt 2 a =1. Thus, by art 2 of Theorem 2.1, there is an integer z such that abt 2 a z 2 (mod α ). Let y = t and x = a 1 z where a 1 is an integer that is a multilicative inverse of a modulo α. Hence, ax 2 by 2 a 1 z 2 bt 2 a 1 (abt 2 a) bt 2 1 (mod α ). This comletes all cases and secures the roof. The following illustrates both theorem 3.1 and the techniques in the roof for construction of solutions modulo n. Examle 3.1 We maintain the notation of Theorem 3.1 and its roof in this examle. Let a = 119 17 and b = 128 = 2 7. In this case, if l = l( ab) = l(8 238) = 16 and A l 1 = A 15 = 272051137 193 ±1 (mod 2b). Hence, the Diohantine equation 119x 2 128y 2 = 1 has no solutions. However, since a 3 3 (mod b) and b 3 2 (mod a), then 119x 2 128y 2 1 (mod n) (3.7) has solutions for all n N. Now we show how solutions may be constructed for Equation (3.8). Select a value of n at random, say, n =2 3 7 2 5 4 11 2. We construct solutions via the Chinese Remainder Theorem as in the roof of Theorem 3.1. Since a 119 1 2 = z 2 (mod 2 3 ), then ax 2 by 2 = 119 1 2 128 0 2 az 2 1 (mod 2 3 ). (3.8)
298 R. A. Mollin Since 7 a, b 128 18 2 = z 2 (mod 7 2 ), and z 1 =30i s a multilicative inverse of z modulo 7 2, then we have ax 2 by 2 = 119 0 2 128 30 2 1 (mod 7 2 ). (3.9) Since 5 does not divide a and a 141 2 = z 2 (mod 5 4 ), while a 1 = 604 is a multilicative inverse of a modulo 5 4, then 119 (604 141) 2 128 0 2 = a(a 1 z) 2 b 0 2 1. (3.10) Lastly, since 11 does not divide a and a = 119 is a quadratic nonresidue modulo 1, then we select t =2since the following Legendre symbol equality holds ( ) ( ) 1 bt 2 1 128 2 2 1 = =. 11 11 Moreover, since a 1 =60is a multilicative inverse of a modulo 11 2, and abt 2 a 208 2 = z 2 (mod 11 2 ), then 119 (60 208) 2 128 2 2 = a(a 1 z) 2 b t 2 1 (mod 11 2 ). (3.11) Now we ut together the equations (3.8) (3.11) via the Chinese Remainder Theorem to secure the values of x and y that are solutions to equation (3.7). x 1 7 2 5 4 11 2 (7 2 5 4 11 2 (mod 2 3 ))+7 2 2 3 5 4 11 2 (2 3 5 4 11 2 (mod 7 2 ))+ 164 2 3 7 2 11 2 (2 3 7 2 11 2 (mod 5 4 ))+17 2 3 7 2 5 4 (2 3 7 2 5 4 (mod 11 2 )) 7 2 5 4 11 2 1 1 1+7 2 2 3 5 4 11 2 43 4 32 + 164 2 3 7 2 11 2 547 574 31+ 17 2 3 7 2 5 4 106 42 115 24978289 (mod n), and y 2 3 7 2 5 4 11 2 (7 2 5 4 11 2 (mod 2 3 ))+30 2 3 5 4 11 2 (2 3 5 4 11 2 (mod 7 2 ))+ 5 4 2 3 7 2 11 2 (2 3 7 2 11 2 (mod 5 4 ))+2 2 3 7 2 5 4 (2 3 7 2 5 4 (mod 11 2 )) 2 3 7 2 5 4 11 2 1 1 1+30 2 3 5 4 11 2 43 4 32 + 5 4 2 3 7 2 11 2 547 574 31+ 2 2 3 7 2 5 4 106 42 115 8160000 (mod n), where n = 29645000. Thus, we have ax 2 by 2 = 119 24978289 2 128 8160000 2 1 (mod 29645000) as we set out to accomlish.
Diohantine equations and congruences 299 Immediate from Theorem 3.1 is the following result, which, in turn, was a generalization of [5, Theorem 4,. 357]. Corollary 3.1 ([7, Theorem 2,. 1627]) Let be a rime and c a ositive integer with l = l( c), such that 7 (mod 8), c 1 (mod ), c is not divisible by any rimes q such that the Legendre symbol equality ( )= 1 holds, and in the simle continued fraction q exansion of c, A l 1 ±1 (mod 2c). Then the Diohantine equation, has no solutions (x, y), but has a solution (x, y) for all n 1. x 2 cy 2 = 1 (3.12) x 2 cy 2 1 (mod n) (3.13) The following analogue of Theorem 3.1 is resented without roof since the arguments are the same. Theorem 3.2 Suose that a and b are integers with 1 <a<band l( ab) is even where l is the eriod length of the simle continued fraction exansion of ab with ab not a erfect square. Furthermore assume that each of the following holds. Then 1. a 1 (mod 8). 2. b is a quadratic residue modulo a. 3. a is a quadratic residue modulo b. 4. A l 1 ( 1) l/2 (mod 2b). has no solutions x, y Z, whereas has solutions x, y Z for all n N. An illustration of Theorem 3.2 is the following. ax 2 by 2 = 1 (3.14) ax 2 by 2 1 (mod n) (3.15)
300 R. A. Mollin Examle 3.2 If a = 25 and b = 44, then clearly a 1 (mod 8), a is a quadratic residue modulo b, and b = 44 9 2 (mod a). Moreover, A l 1 = A 1 = 199 ±1 (mod 2b). Hence, 25x 2 44y 2 =1has no solutions. However, it has solutions modulo all n N. For instance, 25 229 2 44 390 2 1 (mod 3 7 2 13). Immediate from Theorem 3.2 is the following result which, in turn, generalized [5, Theorem 4,. 357]. Corollary 3.2 ([7, Theorem 3,. 1630]) Let be a rime and c a ositive integer with l = l( c), such that either 1 (mod 8), c 1 (mod ), l( c) even, and c is not divisible by any rimes q such that the Legendre symbol equality ( q )= 1 holds. Also, A l 1 ±1 (mod 2c) in the simle continued fraction exansion of c. Then the Diohantine equation, x 2 cy 2 = 1 (3.16) has no solutions (x, y), but has a solution (x, y) for all n 1. x 2 cy 2 1 (mod n) (3.17) Remark 3.1 A key feature of the discussion in the aer on global versus local solutions of quadratic Diohantine equations has a feature which we have not yet exlicitly mentioned, namely the central norm (see dislay (2.4))). In other words, we have not exloited art 2 of Theorem 2.2 yet. The following consequences of Theorems 3.1 3.2 do make use of that fact. Corollary 3.3 ([7, Corollary 1,. 1630]). Suose that and q are odd rimes where 7 (mod 8), 2q 1 (mod ) and c = 2 q 2 +2q = (q 2 +2q), with c not divisible by any rime r for which is a quadratic nonresidue. Then Equation (3.12) has no solutions but Equation (3.13) has a solution for all n 1. Proof. By [2, Theorem 3.2.1,. 78], l = l( c) = 2 and Q l/2 =2q. Thus, by art 2 of Theorem 2.2, Equation (3.12) has no solutions. Hence, by Theorem 3.1, Equation (3.13) has a solution for all n 1. Similarly the following follows from Theorem 3.2.
Diohantine equations and congruences 301 Corollary 3.4 ([7, Corollary 2,. 1631]). Suose that and q are odd rimes where 1 (mod 8), 2q 1 (mod ) and c = 2 q 2 2q = (q 2 2q), with c not divisible by any rime r for which is a quadratic nonresidue. Then Equation (3.16) has no solutions but Equation (3.17) has a solution for all n 1. We conclude with a result for even a, the roof of which is omitted since it is entirely analogous to the above. Theorem 3.3 Suose that 1 < a < b are integers such that each of the following conditions hold. 1. a =2 β c, where β,c N and c 1 (mod 8). 2. b 2 β + 1 (mod 8) and b is a quadratic residue modulo c. 3. a is a quadratic residue modulo b. 4. A l 1 ( 1) l/2 (mod 2b), where l = l( ab) is the eriod length of the simle continued fraction exansion of ab with ab not a erfect square. Then ax 2 by 2 = 1 (3.18) has no solutions x, y Z, whereas has solutions x, y Z for all n N. ax 2 by 2 1 (mod n) (3.19) Immediate from this is the following result by Kimura and Williams. Corollary 3.5 ([1, Theorem,. 911]) Leta > 1 divisible only by rimes congruent to 1 or 3 modulo 8. Then has no integer solutions, whereas has integer solutions for all n N. 2x 2 (2a 4 + a 2 )y 2 = 1 2x 2 (2a 4 + a 2 )y 2 1 (mod n) Acknowledgements: The author s research is suorted by NSERC Canada grant # A8484.
302 R. A. Mollin References [1] N. Kimura and K.S. Williams, Infinitely many insolvable Diohantine equations f(x 1,x 2 )=0such that f(x 1,x 2 ) 0 (mod m) is solvable for every m, Amer. Math. Monthly 111 (2004), 909 913. [2] R.A. Mollin, Quadratics, CRC Press, Boca Raton, New York, London, Tokyo (1996). [3] R.A. Mollin, Fundamental Number Theory with Alications, CRC Press, Boca Raton, New York, London, Tokyo (1998). [4] R.A. Mollin, A continued fraction aroach to the Diohantine equation ax 2 by 2 = ±1, JP Journal Algebra, Number Theory, and Al. 4 (2004), 159 207. [5] R.A. Mollin, Infinitely many quadratic diohantine equations solvable everywhere locally, but not solvable globally, JP Journal Algebra, Number Theory and Al. 4, 353 362 [6] R.A. Mollin, Norm Form Equations and Continued Fractions, Acta Math. Univ. Comenianae, LXXIV (2005), 273 278. [7] R.A. Mollin, Global Versus Local Solvability of Quadratic Diohantine Equations, International Math. Forum 1 (2006), 1625 1633. [8] T. Nagell, On a secial class of Diohantine equations of the second degree, Ark. Mat. 3 (1954), 51 65. [9] W. Sieriński, Elementary Theory of Numbers, North-Holland (PWN), Amsterdam, New York, Oxford (1988). Received: December 8, 2006