Pell s equation. Michel Waldschmidt

Size: px
Start display at page:

Download "Pell s equation. Michel Waldschmidt"

Transcription

1 Faculté des Sciences et Techniques (FAST), Bamako, Mali École de recherche CIMPA Théorie des Nombres et Algorithmique Updated: December 7, 200 Pell s equation Michel Waldschmidt This text is available on the internet at the address miw/articles/pdf/bamakopell200.pdf Contents On the so called Pell Fermat equation 2. Examples of simple continued fractions Existence of integer solutions All integer solutions On the group of units of Z[ D] Connection with rational approximation Continued fractions 3 2. Generalized continued fractions Simple continued fractions Finite simple continued fraction of a rational number Infinite simple continued fraction of an irrational number 22 3 Continued fractions and Pell s Equation The main lemma Simple Continued fraction of D Connection between the two formulae for the n-th positive solution to Pell s equation Records Periodic continued fractions Diophantine approximation and simple continued fractions A criterion for the existence of a solution to the negative Pell equation Arithmetic varieties More on Diophantine Approximation Irrationality Criterion Liouville s inequality

2 On the so called Pell Fermat equation Let D be a positive integer which is not the square of an integer. It follows that D is an irrational number. The Diophantine equation x 2 Dy 2 ±, () where the unknowns x and y are in Z, is called Pell s equation. An introduction to the subject has been given in first lecture: miw/articles/pdf/pellfermat200.pdf and miw/articles/pdf/pellfermat200vi.pdf Here we supply complete proofs of the results introduced in that lecture.. Examples of simple continued fractions The three first examples below are special cases of results initiated by O. Perron [23] and related with real quadratic fields of Richaud-Degert type. Example. Take D a 2 b 2 + 2b where a and b are positive integers. A solution to x 2 (a 2 b 2 + 2b)y 2 is (x, y) (a 2 b +, a). As we shall see, this is related with the continued fraction expansion of D which is a 2 b 2 + 2b [ab, a, 2ab] since t a 2 b 2 + 2b t ab + a + t + ab This includes the examples D a (take b ) and D b 2 + 2b (take a ). For a and b c, this includes the example D c 2. Example 2. Take D a 2 b 2 + b where a and b are positive integers. A solution to x 2 (a 2 b 2 + b)y 2 Les notes sont en anglais, mais les cours seront donnés en français. 2

3 is (x, y) (2a 2 b +, 2a). The continued fraction expansion of D is a 2 b 2 + b [ab, 2a, 2ab] since t a 2 b 2 + b t ab + 2a + t + ab This includes the example D b 2 + b (take a ). The case b, D a 2 + is special: there is an integer solution to x 2 (a 2 + )y 2, namely (x, y) (a, ). The continued fraction expansion of D is a 2 + [a, 2a] since t a 2 + t a + t + a Example 3. Let a and b be two positive integers such that b 2 + divides 2ab +. For instance b 2 and a (mod 5). Write 2ab + k(b 2 + ) and take D a 2 + k. The continued fraction expansion of D is since t D satisfies [a, b, b, 2a] t a + b + b + a + t [a, b, b, a + t]. A solution to x 2 Dy 2 is x ab 2 + a + b, y b 2 +. In the case a and b 2 (so k ), the continued fraction has period length only: 5 [, 2]. Example 4. Integers which are Polygonal numbers in two ways are given by the solutions to quadratic equations. Triangular numbers are numbers of the form n 3 n(n + ) 2 for n ;

4 their sequence starts with, 3, 6, 0, 5, 2, 28, 36, 45, 55, 66, 78, 9, 05, 20, 36, 53, 7,... njas/sequences/a Square numbers are numbers of the form their sequence starts with (2n + ) n 2 for n ;, 4, 9, 6, 25, 36, 49, 64, 8, 00, 2, 44, 69, 96, 225, 256, 289,... njas/sequences/a Pentagonal numbers are numbers of the form (3n + ) their sequence starts with n(3n ) 2 for n ;, 5, 2, 22, 35, 5, 70, 92, 7, 45, 76, 20, 247, 287, 330, 376, 425,... njas/sequences/a Hexagonal numbers are numbers of the form (4n + ) n(2n ) for n ; their sequence starts with, 6, 5, 28, 45, 66, 9, 20, 53, 90, 23, 276, 325, 378, 435, 496, 56,... njas/sequences/a For instance, numbers which are at the same time triangular and squares are the numbers y 2 where (x, y) is a solution to Pell s equation with D 8. Their list starts with 0,, 36, 225, 466, 4372, , , ,... See njas/sequences/a000. Example 5. Integer rectangle triangles having sides of the right angle as consecutive integers a and a + have an hypothenuse c which satisfies a 2 + (a + ) 2 c 2. The admissible values for the hypothenuse is the set of positive integer solutions y to Pell s equation x 2 2y 2. The list of these hypothenuses starts with, 5, 29, 69, 985, 574, 3346, 95025, 36689, , , See njas/sequences/a

5 .2 Existence of integer solutions Let D be a positive integer which is not a square. We show that Pell s equation () has a non trivial solution (x, y) Z Z, that is a solution (±, 0). Proposition 2. Given a positive integer D which is not a square, there exists (x, y) Z 2 with x > 0 and y > 0 such that x 2 Dy 2. Proof. The first step of the proof is to show that there exists a non zero integer k such that the Diophantine equation x 2 Dy 2 k has infinitely many solutions (x, y) Z Z. The main idea behind the proof, which will be made explicit in Lemmas 4, 5 and Corollary 6 below, is to relate the integer solutions of such a Diophantine equation with rational approximations x/y of D. Using the implication (i) (v) of the irrationality criterion 6 and the fact that D is irrational, we deduce that there are infinitely many (x, y) Z Z with y > 0 (and hence x > 0) satisfying x D y < y 2 For such a (x, y), we have 0 < x < y D + < y( D + ), hence 0 < x 2 Dy 2 x y D x + y D < 2 D +. Since there are only finitely integers k 0 in the range (2 D + ) < k < 2 D +, one at least of them is of the form x 2 Dy 2 for infinitely many (x, y). The second step is to notice that, since the subset of (x, y) (mod k) in (Z/kZ) 2 is finite, there is an infinite subset E Z Z of these solutions to x 2 Dy 2 k having the same (x (mod k), y (mod k)). Let (u, v ) and (u 2, v 2 ) be two distinct elements in E. Define (x, y) Q 2 by x + y D u + v D u 2 + v 2 D From u 2 2 Dv2 2 k, one deduces x + y D k (u + v D)(u2 v 2 D), 5

6 hence x u u 2 Dv v 2, y u v 2 + u 2 v k k From u u 2 (mod k), v v 2 (mod k) and we deduce and u 2 Dv 2 k, u 2 2 Dv 2 2 k, u u 2 Dv v 2 u 2 Dv 2 0 (mod k) u v 2 + u 2 v u v + u v 0 hence x and y are in Z. Further, x 2 Dy 2 (x + y D)(x y D) (mod k), (u + v D)(u v D) (u 2 + v 2 D)(u2 v 2 D) u2 Dv2 u 2 2 Dv2 2. It remains to check that y 0. If y 0 then x ±, u v 2 u 2 v, u u 2 Dv v 2 ±, and ku ±u (u u 2 Dv v 2 ) ±u 2 (u 2 Dv 2 ) ±ku 2, which implies (u, u 2 ) (v, v 2 ), a contradiction. Finally, if x < 0 (resp. y < 0) we replace x by x (resp. y by y). Once we have a non trivial integer solution (x, y) to Pell s equation, we have infinitely many of them, obtained by considering the powers of x+y D..3 All integer solutions There is a natural order for the positive integer solutions to Pell s equation which can be defined in several ways: we can order them by increasing values of x, or increasing values of y, or increasing values of x + y D - it is easily checked that the order is the same. It follows that there is a minimal positive integer solution 2 (x, y ), which is called the fundamental solution to Pell s equation x 2 Dy 2 ±. In the same way, there is a fundamental solution to Pell s equations x 2 Dy 2. 2 We use the letter x, which should not be confused with the first complete quotient in the section on continued fractions 6

7 Proposition 3. Denote by (x, y ) the fundamental solution to Pell s equation x 2 Dy 2 ±. Then the set of all positive integer solutions to this equation is the sequence (x n, y n ) n, where x n and y n are given by x n + y n D (x + y D) n, (n Z, n ). In other terms, x n and y n are defined by the recurrence formulae x n+ x n x + Dy n y and y n+ x y n + x n y, (n ). More explicitly: If x 2 Dy2, then (x, y ) is the fundamental solution to Pell s equation x 2 Dy 2, and there is no integer solution to Pell s equation x 2 Dy 2. If x 2 Dy2, then (x, y ) is the fundamental solution to Pell s equation x 2 Dy 2, and the fundamental solution to Pell s equation x 2 Dy 2 is (x 2, y 2 ). The set of positive integer solutions to Pell s equation x 2 Dy 2 is {(x n, y n ) ; n 2 even}, while the set of positive integer solutions to Pell s equation x 2 Dy 2 is {(x n, y n ) ; n odd}. The set of all solutions (x, y) Z Z to Pell s equation x 2 Dy 2 ± is the set (±x n, y n ) n Z, where x n and y n are given by the same formula x n + y n D (x + y D) n, (n Z). The trivial solution (, 0) is (x 0, y 0 ), the solution (, 0) is a torsion element of order 2 in the group of units of the ring Z[ D]. Proof. Let (x, y) be a positive integer solution to Pell s equation x 2 Dy 2 ±. Denote by n 0 the largest integer such that (x + y D) n x + y D. Hence x + y D < (x + y D) n+. Define (u, v) Z Z by From u + v D (x + y D)(x y D) n. u 2 Dv 2 ± and u + v D < x + y D, we deduce u and v 0, hence x x n, y y n. 7

8 .4 On the group of units of Z[ D] Let D be a positive integer which is not a square. The ring Z[ D] is the subring of R generated by D. The map σ : z x + y D x y D is the Galois automorphism of this ring. The norm N : Z[ D] Z is defined by N(z) zσ(z). Hence N(x + y D) x 2 Dy 2. The restriction of N to the group of unit Z[ D] of the ring Z[ D] is a homomorphism from the multiplicative group Z[ D] to the group of units Z of Z. Since Z {±}, it follows that Z[ D] {z Z[ D] ; N(z) ±}, hence Z[ D] is nothing else than the set of x + y D when (x, y) runs over the set of integer solutions to Pell s equation x 2 Dy 2 ±. Proposition 2 means that Z[ D] is not reduced to the torsion subgroup ±, while Proposition 3 gives the more precise information that this group Z[ D] is a (multiplicative) abelian group of rank : there exists a so called fundamental unit u Z[ D] such that Z[ D] {±u n ; n Z}. The fundamental unit u > is x +y D, where (x, y ) is the fundamental solution to Pell s equation x 2 Dy 2 ±. Pell s equation x 2 Dy 2 ± has integer solutions if and only if the fundamental unit has norm. That the rank of Z[ D] is at most also follows from the fact that the image of the map Z[ D] R 2 z ( log z, log z ) is discrete in R 2 and contained in the line t + t 2 0 of R 2. This proof is not really different from the proof we gave of Proposition 3: the proof that the discrete subgroups of R have rank relies on Euclid s division. Remark. Let d be a non zero rational integer which is not the square of an integer. Then d is not the square of a rational number, and the field k Q( d) is a quadratic extension of Q (which means a Q vector space of dimension 2). An element α k is an algebraic integer if and only if it satisfies the following equivalent conditions: (i) α is root of a monic polynomial with coefficients in Z. 8

9 (ii) The irreductible (monic) polynomial of α over Q has coefficients in Z. (iii) The irreducible polynomial of α over Z is monic. (iv) The ring Z[α] is a finitely generated Z module. (v) The ring Z[α] is contained in a subring of k which is a finitely generated Z module. The set Z k of algebraic integers of k is the following ring: Z + Z d if d 2 or 3 (mod 4) Z k Z + Z + d if d (mod 4). 2 Hence Z k Z + Zα, where α is any of the two roots of X 2 d if d 2 or 3 (mod 4), and any of the two roots of the polynomial X 2 X (d )/4 4 (2X )2 d if d (mod 4). The discriminant D k of k is the discriminant of the ring of integers of k: 2 0 det 4d if d 2 or 3 (mod 4) 0 2d D k 2 det d if d (mod 4). ( + d)/2 Hence the discriminant is always congruent to 0 or modulo 4 and the quadratic field is k Q( D k ). The group of units 3 of k is by definition the group of units Z K of the ring Z k. For d < 0, it is easy to check that the group of units in k is the following finite group of roots of unity in k: {, i,, i} if k has discriminant 4, which means k Q(i) {, ϱ, ϱ 2,, ϱ, ϱ 2 } if k has discriminant 3, where ϱ is a root of X 2 +X +. The quadratic field with discriminant 3 is k Q( ϱ) Q( 3) and ϱ is a primitive cube root of unity. 3 This is an abuse of language of course, since the units of a field are the non zero elements of the field; the same applies for ideals of a number field, which means ideals of the ring of integers of the number field. 9

10 {±} otherwise. Assume d > 0. Then the roots of unity in k are only ± and the group Z k of units of Z k is a Z-module of rank. Hence it is isomorphic to {±} Z. For d 2 and for d 3 (mod 4), the units Z k of k are the elements x + y D k k such that (x, y) Z Z is a solution of Pell s equation x 2 D k y 2 ±. For d (mod 4), the group of units Z k of k is the set of elements x + y D k k such that (x, y) Z Z is a solution of Pell s equation x 2 D k y 2 ±4..5 Connection with rational approximation Lemma 4. Let D be a positive integer which is not a square. Let x and y be positive rational integers. The following conditions are equivalent: (i) x 2 Dy 2. (ii) 0 < x y D < 2y 2 D (iii) 0 < x y D < y 2 D + Proof. We have 2y 2 D < y 2, hence (ii) implies (iii). D + (i) implies x 2 > Dy 2, hence x > y D, and consequently (iii) implies and hence 0 < x y D y(x + y D) < 2y 2 D x < y D + y D < y D + 2 y, y(x + y D) < 2y 2 D + 2, ( x 0 < x 2 Dy 2 y y ) D (x + y D) < 2. Since x 2 Dy 2 is an integer, it is equal to. The next variant will also be useful. 0

11 Lemma 5. Let D be a positive integer which is not a square. Let x and y be positive rational integers. The following conditions are equivalent: (i) x 2 Dy 2. (ii) 0 < D x y < 2y 2 D (iii) 0 < D x y < y 2 D Proof. We have 2y 2 D < y 2, hence (ii) implies (iii). D The condition (i) implies y D > x. We use the trivial estimate and write 2 D > + /y 2 x 2 Dy 2 > Dy 2 2 D + /y 2 (y D /y) 2, hence xy > y 2 D. From (i) one deduces (iii) implies x < y D and hence Dy 2 x 2 (y D x)(y D + x) ( ) D x > (y 2 D + xy) y ( ) D x > (2y 2 D ). y 0 < Dy 2 x 2 y Since Dy 2 x 2 is an integer, it is. y(y D + x) < 2y 2 D, From these two lemmas one deduces: ( ) D x (y D + x) < 2. y Corollary 6. Let D be a positive integer which is not a square. Let x and y be positive rational integers. The following conditions are equivalent: (i) x 2 Dy 2 ±. (ii) x D y < 2y 2 D (iii) x D y < y 2 D +

12 Proof. If y > or D > 3 we have 2y 2 D > y 2 D +, which means that (ii) implies trivially (iii), and we may apply Lemmas 4 and 5. If D 2 and y, then each of the conditions (i), (ii) and (iii) is satisfied if and only if x. This follows from 2 2 > 2 2 > > If D 3 and y, then each of the conditions (i), (ii) and (iii) is satisfied if and only if x 2. This follows from 3 3 > 3 > 2 3 > > It is instructive to compare with Liouville s inequality. Lemma 7. Let D be a positive integer which is not a square. Let x and y be positive rational integers. Then x D y > 2y 2 D + Proof. If x/y < D, then x y D and from one deduces Dy 2 x 2 (y D + x)(y D x) 2y D(y D x), We claim that if x/y > D, then D x y > 2y 2 D x y D > 2y 2 D + Indeed, this estimate is true if x y D /y, so we may assume x y D < /y. Our claim then follows from x 2 Dy 2 (x + y D)(x y D) (2y D + /y)(x y D). This shows that a rational approximation x/y to D, which is only slightly weaker than the limit given by Liouville s inequality, will produce a solution to Pell s equation x 2 Dy 2 ±. The distance D x/y cannot be smaller than /(2y 2 D + ), but it can be as small as /(2y 2 D ), and for that it suffices that it is less than /(y 2 D + ) 2

13 2 Continued fractions We first consider generalized continued fractions of the form a 0 + a + b b 2 a 2 + b 3..., which we denote by 4 a 0 + b a + b 2 a 2 + b 3... Next we restrict to the special case where b b 2, which yields the simple continued fractions a 0 + a + a 2 + [a 0, a, a 2,... ]. 2. Generalized continued fractions To start with, a 0,..., a n,... and b,..., b n,... will be independent variables. Later, we shall specialize to positive integers (apart from a 0 which may be negative). Consider the three rational fractions a 0, a 0 + b a and a 0 + b a + b 2 a 2 We write them as with A 0 B 0, A B and A 2 B 2 A 0 a 0, A a 0 a + b, A 2 a 0 a a 2 + a 0 b 2 + a 2 b, B 0, B a, B 2 a a 2 + b 2. 4 Another notation for a 0 + b a + b 2 a bn a n introduced by Th. Muir and used by Perron in [23] Chap. is ( ) b,..., b n K a 0, a,..., a n 3

14 Observe that Write these relations as A 2 a 2 A + b 2 A 0, B 2 a 2 B + b 2 B 0. ( A2 B 2 ) ( ) ( ) A A 0 a2. B B 0 b 2 In order to iterate the process, it is convenient to work with 2 2 matrices and to write ( ) ( ) ( ) A2 A A A 0 a2. B 2 B B B 0 b 2 0 Define inductively two sequences of polynomials with positive rational coefficients A n and B n for n 3 by ( ) ( ) ( ) An A n An A n 2 an. (8) b n 0 This means B n B n B n B n 2 A n a n A n + b n A n 2, B n a n B n + b n B n 2. This recurrence relation holds for n 2. It will also hold for n if we set A and B 0: ( ) ( ) ( ) A A 0 a0 a B B 0 0 b 0 and it will hold also for n 0 if we set b 0, A 2 0 and B 2 : ( ) ( ) ( ) A0 A 0 a0. 0 b 0 0 B n B n B 0 B Obviously, an equivalent definition is ( ) ( ) ( ) ( ) ( ) An A n a0 a an an. (9) b 0 0 b 0 b n 0 b n 0 These relations (9) hold for n, with the empty product (for n ) being the identity matrix, as always. Hence A n Z[a 0,..., a n, b,..., b n ] is a polynomial in 2n + variables, while B n Z[a..., a n, b 2,..., b n ] is a polynomial in 2n variables. 4

15 Exercise. Check, for n, B n (a,..., a n, b 2,..., b n ) A n (a,..., a n, b 2,..., b n ). Lemma 0. For n 0, a 0 + b a + + b n a n A n B n Proof. By induction. We have checked the result for n 0, n and n 2. Assume the formula holds with n where n 3. We write with a 0 + b + + b n + b n a 0 + b + + b n a a n a n a x x a n + b n a n We have, by induction hypothesis and by the definition (8), a 0 + b a + + b n a n A n B n a n A n 2 + b n A n 3 a n B n 2 + b n B n 3 Since A n 2, A n 3, B n 2 and B n 3 do not depend on the variable a n, we deduce a 0 + b + + b n xa n 2 + b n A n 3 a x xb n 2 + b n B n 3 The product of the numerator by a n is (a n a n + b n )A n 2 + a n b n A n 3 a n (a n A n 2 + b n A n 3 ) + b n A n 2 a n A n + b n A n 2 A n and similarly, the product of the denominator by a n is (a n a n + b n )B n 2 + a n b n B n 3 a n (a n B n 2 + b n B n 3 ) + b n B n 2 a n B n + b n B n 2 B n. From (9), taking the determinant, we deduce, for n, A n B n A n B n ( ) n+ b 0 b n. () 5

16 which can be written, for n, A n B n A n B n ( )n+ b 0 b n B n B n (2) Adding the telescoping sum, we get, for n 0, A n B n A 0 + n k ( ) k+ b 0 b k B k B k (3) We now substitute for a 0, a,... and b, b 2,... rational integers, all of which are, apart from a 0 which may be 0. We denote by p n (resp. q n ) the value of A n (resp. B n ) for these special values. Hence p n and q n are rational integers, with q n > 0 for n 0. A consequence of Lemma 0 is We deduce from (8), p n a 0 + b + + b n for n 0. q n a a n p n a n p n + b n p n 2, q n a n q n + b n q n 2 for n 0, and from (), p n q n p n q n ( ) n+ b 0 b n for n, which can be written, for n, p n q n p n q n ( )n+ b 0 b n q n q n (4) Adding the telescoping sum (or using (3)), we get the alternating sum p n q n a 0 + n k ( ) k+ b 0 b k q k q k (5) Recall that for real numbers a, b, c, d, with b and d positive, we have a b < c d a b < a + c b + d < d c (6) Since a n and b n are positive for n 0, we deduce that for n 2, the rational number p n a np n + b n p n 2 q n a n q n + b n q n 2 6

17 lies between p n /q n and p n 2 /q n 2. Therefore we have p 2 q 2 < p 4 q 4 < < p 2n q 2n < < p 2m+ q 2m+ < < p 3 q 3 < p q (7) From (4), we deduce, for n 3, q n > q n 2, hence q n > (a n + b n )q n 2. The previous discussion was valid without any restriction, now we assume a n b n for all sufficiently large n, say n n 0. Then for n > n 0, using q n > 2b n q n 2, we get p n p n q n b 0 b n b n b 0 b n0 b 0 < q n q n 2 n n 0 bn b n b n0 +q n0 q n0 2 n n 0 qn0 q n0 q n and the right hand side tends to 0 as n tends to infinity. Hence the sequence (p n /q n ) n 0 has a limit, which we denote by x a 0 + b a + + b n a n + b n a n + From (5), it follows that x is also given by an alternating series x a 0 + k ( ) k+ b 0 b k q k q k We now prove that x is irrational. Define, for n 0, so that x x 0 and, for all n 0, x n a n + b n+ a n+ + x n a n + b n+ x n+, x n+ b n+ x n a n and a n < x n < a n +. Hence for n 0, x n is rational if and only if x n+ is rational, and therefore, if x is rational, then all x n for n 0 are also rational. Assume x is rational. Consider the rational numbers x n with n n 0 and select a value of n for which the denominator v of x n is minimal, say x n u/v. From x n+ b n+ x n a n b n+v u a n v with 0 < u a n v < v, it follows that x n+ has a denominator strictly less than v, which is a contradiction. Hence x is irrational. 7

18 Conversely, given an irrational number x and a sequence b, b 2,... of positive integers, there is a unique integer a 0 and a unique sequence a,..., a n,... of positive integers satisfying a n b n for all n, such that x a 0 + b a + + b n a n + b n a n + Indeed, the unique solution is given inductively as follows: a 0 x, x b /{x}, and once a 0,..., a n and x,..., x n are known, then a n and x n+ are given by a n x n, x n+ b n+ /{x n }, so that for n we have 0 < x n a n < and Here is what we have proved. x a 0 + b a + + b n a n + b n x n Proposition 8. Given a rational integer a 0 and two sequences a 0, a,... and b, b 2,... of positive rational integers with a n b n for all sufficiently large n, the infinite continued fraction a 0 + b a + + b n a n + b n a n + exists and is an irrational number. Conversely, given an irrational number x and a sequence b, b 2,... of positive integers, there is a unique a 0 Z and a unique sequence a,..., a n,... of positive integers satisfying a n b n for all n such that x a 0 + b a + + b n a n + b n a n + These results are useful for proving the irrationality of π and e r when r is a non zero rational number, following the proof by Lambert. See for instance Chapter 7 (Lambert s Irrationality Proofs) of David Angell s course on Irrationality and Transcendence( 5 ) at the University of New South Wales: angell/5535/ The following example is related with Lambert s proof [6]: tanh z z + z2 3 + z z2 2n I found this reference from the website of John Cosgrave numbers.htm. 8

19 Here, z is a complex number and the right hand side is a complex valued function. Here are other examples (see Sloane s Encyclopaedia of Integer Sequences( 6 )) e + 2 e (A30) (A073333) Remark. A variant of the algorithm of simple continued fractions is the following. Given two sequences (a n ) n 0 and (b n ) n 0 of elements in a field K and an element x in K, one defines a sequence (possibly finite) (x n ) n of elements in K as follows. If x a 0, the sequence is empty. Otherwise x is defined by x a 0 + (b /x ). Inductively, once x,..., x n are defined, there are two cases: If x n a n, the algorithm stops. Otherwise, x n+ is defined by x n+ b n+ x n a n, so that x n a n + b n+ x n+ If the algorithm does not stop, then for any n, one has x a 0 + b a + + b n a n + b n x n In the special case where a 0 a b b 2, the set of x such that the algorithm stops after finitely many steps is the set (F n+ /F n ) n of quotients of consecutive Fibonacci numbers. In this special case, the limit of a 0 + b a + + b n a n + b n a n is the Golden ratio, which is independent of x, of course! 2.2 Simple continued fractions We restrict now the discussion of 2. to the case where b b 2 b n. We keep the notations A n and B n which are now polynomials in Z[a 0, a,..., a n ] and Z[a,..., a n ] respectively, and when we specialize to 6 njas/sequences/ 9

20 integers a 0, a,..., a n... with a n for n we use the notations p n and q n for the values of A n and B n. The recurrence relations (8) are now, for n 0, ( ) ( ) ( ) An A n An A n 2 an, (9) 0 B n B n B n B n B n B n 2 while (9) becomes, for n, ( ) ( ) ( ) ( ) ( ) An A n a0 a an an. (20) From Lemma 0 one deduces, for n 0, [a 0,..., a n ] A n B n Taking the determinant in (20), we deduce the following special case of () A n B n A n B n ( ) n+. The specialization of these relations to integral values of a 0, a, a 2... yields ( ) ( ) ( ) pn p n pn p n 2 an for n 0, (2) q n q n q n q n 2 0 ( ) ( ) ( ) ( ) ( ) pn p n a0 a an an for n, q n q n (22) [a 0,..., a n ] p n for n 0 q n and p n q n p n q n ( ) n+ for n. (23) From (23), it follows that for n 0, the fraction p n /q n is in lowest terms: gcd(p n, q n ). Transposing (22) yields, for n, ( pn q n p n q n ) ( an 0 from which we deduce, for n, ) ( ) an 0 ( a 0 [a n,..., a 0 ] p n p n and [a n,..., a ] q n q n ) ( ) a0 0 20

21 Lemma 24. For n 0, p n q n 2 p n 2 q n ( ) n a n. Proof. We multiply both sides of (2) on the left by the inverse of the matrix ( ) ( ) pn p n 2 which is ( ) n qn 2 p n 2. q n p n q n q n 2 We get ( ) ( ) n pn q n 2 p n 2 q n p n q n 2 p n 2 q n p n q n + p n q n 0 ( ) an Finite simple continued fraction of a rational number Let u 0 and u be two integers with u positive. The first step in Euclid s algorithm to find the gcd of u 0 and u consists in dividing u 0 by u : u 0 a 0 u + u 2 with a 0 Z and 0 u 2 < u. This means u 0 u a 0 + u 2 u, which amonts to dividing the rational number x 0 u 0 /u by with quotient a 0 and remainder u 2 /u <. This algorithms continues with u m a m u m+ + u m+2, where a m is the integral part of x m u m /u m+ and 0 u m+2 < u m+, until some u l+2 is 0, in which case the algorithms stops with u l a l u l+. Since the gcd of u m and u m+ is the same as the gcd of u m+ and u m+2, it follows that the gcd of u 0 and u is u l+. This is how one gets the regular continued fraction expansion x 0 [a 0, a,..., a l ], where l 0 in case x 0 is a rational integer, while a l 2 if x 0 is a rational number which is not an integer. 2

22 Exercise 2. Compare with the geometrical construction of the continued fraction given in the beamer presentation. Give a variant of this geometrical construction where rectangles are replaced by segments. Proposition 25. Any finite regular continued fraction [a 0, a,..., a n ], where a 0, a,..., a n are rational numbers with a i 2 for i n and n 0, represents a rational number. Conversely, any rational number x has two representations as a continued fraction, the first one, given by Euclid s algorithm, is x [a 0, a,..., a n ] and the second one is x [a 0, a,..., a n, a n, ]. If x Z, then n 0 and the two simple continued fractions representations of x are [x] and [x, ], while if x is not an integer, then n and a n 2. For instance the two continued fractions of are [] and [0, ], they both end with. The two continued fractions of 0 are [0] and [, ], the first of which is the unique continued fraction which ends with 0. We shall use later (in the proof of Lemma 30 in 3.2) the fact that any rational number has one simple continued fraction expansion with an odd number of terms and one with an even number of terms Infinite simple continued fraction of an irrational number Given a rational integer a 0 and an infinite sequence of positive integers a, a 2,..., the continued fraction [a 0, a,..., a n,... ] represents an irrational number. Conversely, given an irrational number x, there is a unique representation of x as an infinite simple continued fraction x [a 0, a,..., a n,... ] Definitions The numbers a n are the partial quotients, the rational numbers p n q n [a 0, a,..., a n ] 22

23 are the convergents (in French réduites), and the numbers are the complete quotients. x n [a n, a n+,...] From these definitions we deduce, for n 0, Lemma 27. For n 0, x [a 0, a,..., a n, x n+ ] x n+p n + p n x n+ q n + q n. (26) q n x p n Proof. From (26) one deduces ( ) n x n+ q n + q n x p n q n x n+p n + p n x n+ q n + q n p n q n ( ) n (x n+ q n + q n )q n Corollary 28. For n 0, < q n x p n < q n+ + q n q n+ Proof. Since a n+ is the integral part of x n+, we have a n+ < x n+ < a n+ +. Using the recurrence relation q n+ a n+ q n + q n, we deduce q n+ < x n+ q n + q n < a n+ q n + q n + q n q n+ + q n. In particular, since x n+ > a n+ and q n > 0, one deduces from Lemma 27 (a n+ + 2)qn 2 < x p n q n < a n+ qn 2 (29) Therefore any convergent p/q of x satisfies x p/q < /q 2 (compare with (i) (v) in Proposition 6). Moreover, if a n+ is large, then the approximation p n /q n is sharp. Hence, large partial quotients yield good rational approximations by truncating the continued fraction expansion just before the given partial quotient. 23

24 3 Continued fractions and Pell s Equation 3. The main lemma The theory which follows is well known (a classical reference is the book [23] by O. Perron), but the point of view which we develop here is slightly different from most classical texts on the subject. We follow [3, 4, 32]. An important role in our presentation of the subject is the following result (Lemma 4. in [26]). Lemma 30. Let ɛ ± and let a, b, c, d be rational integers satisfying ad bc ɛ and d. Then there is a unique finite sequence of rational integers a 0,..., a s with s and a,..., a s positive, such that ( ) ( ) ( ) ( ) a b a0 a as (3) c d These integers are also characterized by b d [a 0, a,..., a s ], c d [a s,..., a ], ( ) s+ ɛ. (32) For instance, when d, for b and c rational integers, ( ) ( ) ( ) bc + b b c c 0 0 and ( ) bc b c ( b 0 ) ( ) ( ) c. 0 0 Proof. We start with unicity. If a 0,..., a s satisfy the conclusion of Lemma 30, then by using (3), we find b/d [a 0, a,..., a s ]. Taking the transpose, we also find c/d [a s,..., a ]. Next, taking the determinant, we obtain ( ) s+ ɛ. The last equality fixes the parity of s, and each of the rational numbers b/d, c/d has a unique continued fraction expansion whose length has a given parity (cf. Proposition 25). This proves the unicity of the factorisation when it exists. For the existence, we consider the simple continued fraction expansion of c/d with length of parity given by the last condition in (32), say c/d 24

25 [a s,..., a ]. Let a 0 be a rational integer such that the distance between b/d and [a 0, a,..., a s ] is /2. Define a, b, c, d by We have and ( a b ) c d ( a0 0 d > 0, a d b c ɛ, b d [a 0, a,..., a s ], ) ( ) a 0 ( ) as. 0 c d [a s,..., a ] c d b d b d 2 From gcd(c, d) gcd(c, d ), c/d c /d and d > 0, d > 0 we deduce c c, d d. From the equality between the determinants we deduce a a + kc, b b + kd for some k Z, and from b d b d k we conclude k 0, (a, b, c, d ) (a, b, c, d). Hence (3) follows. Corollary 33. Assume the hypotheses of Lemma 30 are satisfied. a) If c > d, then a s and b) If b > d, then a 0 and a c [a 0, a,..., a s ]. a b [a s,..., a, a 0 ]. The following examples show that the hypotheses of the corollary are not superfluous: ( ) ( ) ( ) b b 0, ( ) ( ) ( ) ( ) b b b and ( ) c c ( 0 0 ) ( ) ( ) c

26 Proof of Corollary 33. Any rational number u/v > has two continued fractions. One of them starts with 0 only if u/v and the continued fraction is [0, ]. Hence the assumption c > d implies a s > 0. This proves part a), and part b) follows by transposition (or repeating the proof). Another consequence of Lemma 30 is the following classical result (Satz 3 p. 47 of [23]). Corollary 34. Let a, b, c, d be rational integers with ad bc ± and c > d > 0. Let x and y be two irrational numbers satisfying y > and x ay + b cy + d Let x [a 0, a,...] be the simple continued fraction expansion of x. Then there exists s such that a p s, b p s, c q s, r q s, y x s+. Proof. Using lemma 30, we write ( ) ( ) ( ) ( ) a b a 0 a a s c d with a,..., a s positive and b d [a 0, a,..., a s ], c d [a s,..., a ]. From c > d and corollary 33, we deduce a s > 0 and a c [a 0, a,..., a s] p s q s, x p sy + p s q sy + q s [a 0, a,..., a s, y]. Since y >, it follows that a i a i, p i q i for 0 i s and y x s+. Remark. In [2], 4, there is a variant of the matrix formula (2) for the simple continued fraction of a real number. 26

27 Given integers a 0, a,... with a i > 0 for i and writing, for n 0, as usual, p n /q n [a 0, a,..., a n ], one checks, by induction on n, the two formulae ( ) ( ) ( ) ( ) a0 0 an pn p n ( 0 a0 0 a ). ) ( 0 a ( 0 0 a n ) ( q n q n ) pn p n q n q n if n is even if n is odd Define two matrices U (up) and L (low) in GL 2 (R) of determinant + by U ( ) 0 and L ( ) 0. (35) For p and q in Z, we have ( ) U p p 0 and L q ( ) 0, q so that these formulae (35) are ( ) U a 0 pn p L a U an n q n q n if n is even and ( ) U a 0 pn p L a L an n q n q n if n is odd. The connexion with Euclid s algorithm is ( ) ( ) ( ) ( ) U p a b a pc b pd and L q a b a b. c d c d c d c qa d qb The corresponding variant of Lemma 30 is also given in [2], 4: If a, b, c, d are rational integers satisfying b > a > 0, d > c 0 and ad bc, then there exist rational integers a 0,..., a n with n even and a,..., a n positive, such that ( ) a b c d ( a0 0 ) ( 0 a ) ( ) an 0 These integers are uniquely determined by b/d [a 0,..., a n ] with n even. 27

28 3.2 Simple Continued fraction of D An infinite sequence (a n ) n is periodic if there exists a positive integer s such that a n+s a n for all n. (36) In this case, the finite sequence (a,..., a s ) is called a period of the original sequence. For the sake of notation, we write (a, a 2,... ) (a,..., a s ). If s 0 is the smallest positive integer satisfying (36), then the set of s satisfying (36) is the set of positive multiples of s 0. In this case (a,..., a s0 ) is called the fundamental period of the original sequence. Theorem 37. Let D be a positive integer which is not a square. Write the simple continued fraction of D as [a 0, a,...] with a 0 D. a) The sequence (a, a 2,...) is periodic. b) Let (x, y) be a positive integer solution to Pell s equation x 2 Dy 2 ±. Then there exists s such that x/y [a 0,..., a s ] and (a, a 2,..., a s, 2a 0 ) is a period of the sequence (a, a 2,...). Further, a s i a i for i s 7 ). c) Let (a, a 2,..., a s, 2a 0 ) be a period of the sequence (a, a 2,...). Set x/y [a 0,..., a s ]. Then x 2 Dy 2 ( ) s. d) Let s 0 be the length of the fundamental period. Then for i 0 not multiple of s 0, we have a i a 0. If (a, a 2,..., a s, 2a 0 ) is a period of the sequence (a, a 2,...), then D [a0, a,..., a s, 2a 0 ] [a 0, a,..., a s, a 0 + D]. Consider the fundamental period (a, a 2,..., a s0, a s0 ) of the sequence (a, a 2,...). By part b) of Theorem 37 we have a s0 2a 0, and by part d), it follows that s 0 is the smallest index i such that a i > a 0. From b) and c) in Theorem 37, it follows that the fundamental solution (x, y ) to Pell s equation x 2 Dy 2 ± is given by x /y [a 0,..., a s0 ], 7 One says that the word a,..., a s is a palindrome. This result is proved in the first paper published by Evariste Galois at the age of 7: Démonstration d un théorème sur les fractions continues périodiques. Annales de Mathématiques Pures et Appliquées, 9 ( ), p pdf. 28

29 and that x 2 Dy2 ( )s 0. Therefore, if s 0 is even, then there is no solution to the Pell s equation x 2 Dy 2. If s 0 is odd, then (x, y ) is the fundamental solution to Pell s equation x 2 Dy 2, while the fundamental solution (x 2, y 2 ) to Pell s equation x 2 Dy 2 is given by x 2 /y 2 [a 0,..., a 2s ]. It follows also from Theorem 37 that the (ns 0 )-th convergent satisfies x n /y n [a 0,..., a ns0 ] x n + y n D (x + y D) n. (38) We shall check this relation directly (Lemma 42). Proof. Start with a positive solution (x, y) to Pell s equation x 2 Dy 2 ±, which exists according to Proposition 2. Since Dy x and x > y, we may use lemma 30 and corollary 33 with a Dy, b c x, d y and write ( ) Dy x x y ( a 0 0 ) ( ) a 0 ( ) a s 0 (39) with positive integers a 0,..., a s and with a 0 D. Then the continued fraction expansion of Dy/x is [a 0,..., a s] and the continued fraction expansion of x/y is [a 0,..., a s ]. Since the matrix on the left hand side of (39) is symmetric, the word a 0,..., a s is a palindrome. In particular a s a 0. Consider the periodic continued fraction This number δ satisfies δ [a 0, a,..., a s, 2a 0 ]. δ [a 0, a,..., a s, a 0 + δ]. Using the inverse of the matrix ( ) a 0 0 which is ( 0 a 0 ), we write ( ) a 0 + δ 0 ( a ) ( ) 0 δ

30 Hence the product of matrices associated with the continued fraction of δ ( ) ( ) ( ) ( ) a 0 a a s a 0 + δ is ( ) ( ) Dy x 0 x y δ It follows that δ ( Dy + δx x x + δy y Dy + δx x + δy, hence δ 2 D. As a consequence, a i a i for 0 i s while a s a 0, a s 2a 0. This proves that if (x, y) is a non trivial solution to Pell s equation x 2 Dy 2 ±, then the continued fraction expansion of D is of the form D [a0, a,..., a s, 2a 0 ] (40) ). with a,..., a s a palindrome, and x/y is given by the convergent x/y [a 0, a,..., a s ]. (4) Consider a convergent p n /q n [a 0, a,..., a n ]. If a n+ 2a 0, then (29) with x D implies the upper bound p n D q n 2a 0 qn 2, and it follows from Corollary 6 that (p n, q n ) is a solution to Pell s equation p 2 n Dqn 2 ±. This already shows that a i < 2a 0 when i + is not the length of a period. We refine this estimate to a i a 0. Assume a n+ a 0 +. Since the sequence (a m ) m is periodic of period length s 0, for any m congruent to n modulo s 0, we have a m+ > a 0. For these m we have p m D q m (a 0 + )qm 2 For sufficiently large m congruent to n modulo s we have (a 0 + )q 2 m > q 2 m D +. Corollary 6 implies that (p m, q m ) is a solution to Pell s equation p 2 m Dq 2 m ±. Finally, Theorem 37 implies that m + is a multiple of s 0, hence n + also. 30

31 3.3 Connection between the two formulae for the n-th positive solution to Pell s equation Lemma 42. Let D be a positive integer which is not a square. Consider the simple continued fraction expansion D [a 0, a,..., a s0, 2a 0 ] where s 0 is the length of the fundamental period. Then the fundamental solution (x, y ) to Pell s equation x 2 Dy 2 ± is given by the continued fraction expansion x /y [a 0, a,..., a s0 ]. Let n be a positive integer. Define (x n, y n ) by x n /y n [a 0, a,..., a ns0 ]. Then x n + y n D (x + y D) n. This result is a consequence of the two formulae we gave for the n-th solution (x n, y n ) to Pell s equation x 2 Dy 2 ±. We check this result directly. Proof. From Lemma 30 and relation (39), one deduces ( ) ( ) ( ) ( ) ( ) Dyn x n a0 a ans0 a x n y n Since ( ) ( ) ( ) Dyn x n 0 xn Dy n a 0 x n, a 0 y n x n a 0 y n x n y n we obtain ( ) ( ) ( ) a0 a ans ( xn Dy n a 0 x n y n x n a 0 y n ). (43) Notice that the determinant is ( ) ns 0 x 2 n Dyn. 2 Formula (43) for n + and the periodicity of the sequence (a,..., a n,... ) with a s0 2a 0 give : ( ) ( ) ( ) ( ) ( ) xn+ Dy n+ a 0 x n+ xn Dy n a 0 x n 2a0 a as0. y n+ x n+ a 0 y n+ y n x n a 0 y n Take first n in (43) and multiply on the left by ( ) ( ) 2a0 0 0 a 0 ( ) a0. 0 Since ( a0 0 ) ( ) ( x Dy a 0 x x + a 0 y (D a 2 0 )y y x a 0 y y x a 0 y ). 3

32 we deduce ( ) ( ) ( ) 2a0 a as ( x + a 0 y (D a 2 0 )y y x a 0 y Therefore ( ) ( ) ( xn+ Dy n+ a 0 x n+ xn Dy n a 0 x n x + a 0 y (D a 2 0 )y ). y n+ x n+ a 0 y n+ y n x n a 0 y n y x a 0 y The first column gives x n+ x n x + Dy n y and y n+ x y n + x n y, which was to be proved. ). 3.4 Records For large D, Pell s equation may obviously have small integer solutions. Examples are for D m 2 with m 2, the numbers x m, y satisfy x 2 Dy 2, for D m 2 + with m, the numbers x m, y satisfy x 2 Dy 2, for D m 2 ± m with m 2, the numbers x 2m ±, y 2 satisfy x 2 Dy 2, for D t 2 m 2 + 2m with m and t, the numbers x t 2 m +, y t satisfy x 2 Dy 2. On the other hand, relatively small values of D may lead to large fundamental solutions. Tables are available on the internet 8. For D a positive integer which is not a square, denote by S(D) the base 0 logarithm of x, when (x, y ) is the fundamental solution to x 2 Dy 2. The number of decimal digits of the fundamental solution x is the integral part of S(D) plus. For instance, when D 6, the fundamental solution (x, y ) is x , y and S(6) log 0 x For instance: Tomás Oliveira e Silva: Record-Holder Solutions of Pell s Equation tos/pell.html. 32

33 An integer D is a record holder for S if S(D ) < S(D) for all D < D. Here are the record holders up to 02: D S(D) D S(D) Some further records with number of digits successive powers of 0: D S(D) Periodic continued fractions An infinite sequence (a n ) n 0 is said to be ultimately periodic if there exists n 0 0 and s such that a n+s a n for all n n 0. (44) The set of s satisfying this property (3.5) is the set of positive multiples of an integer s 0, and (a n0, a n0 +,..., a n0 +s 0 ) is called the fundamental period. A continued fraction with a sequence of partial quotients satisfying (44) will be written [a 0, a,..., a n0, a n0,..., a n0 +s ]. Example. For D a positive integer which is not a square, setting a 0 D, we have by Theorem 37 a 0 + D [2a 0, a,..., a s ] and D a0 [a,..., a s, 2a 0 ]. Lemma 45 (Euler 737). If an infinite continued fraction x [a 0, a,..., a n,...] is ultimately periodic, then x is a quadratic irrational number. Proof. Since the continued fraction of x is infinite, x is irrational. Assume first that the continued fraction is periodic, namely that (44) holds with n 0 0: x [a 0,..., a s ]. 33

34 This can be written Hence It follows that x [a 0,..., a s, x]. x p s x + p s 2 q s x + q s 2 q s X 2 + (q s 2 p s )X p s 2 is a non zero quadratic polynomial with integer coefficients having x as a root. Since x is irrational, this polynomial is irreducible and x is quadratic. In the general case where (44) holds with n 0 > 0, we write x [a 0, a,..., a n0, a n0,..., a n0 +s ] [a 0, a,..., a n0, y], where y [a n0,..., a n0 +s ] is a periodic continued fraction, hence is quadratic. But x p n 0 y + p n0 2, q n0 y + q n0 2 hence x Q(y) is also quadratic irrational. Lemma 46 (Lagrange, 770). If x is a quadratic irrational number, then its continued fraction x [a 0, a,..., a n,...] is ultimately periodic. Proof. For n 0, define d n q n x p n. According to Corollary 28, we have d n < /q n+. Let AX 2 + BX + C with A > 0 be an irreducible quadratic polynomial having x as a root. For each n 2, we deduce from (26) that the convergent x n is a root of a quadratic polynomial A n X 2 + B n X + C n, with A n Ap 2 n + Bp n q n + Cq 2 n, B n 2Ap n p n 2 + B(p n q n 2 + p n 2 q n ) + 2Cq n q n 2, C n A n. Using Ax 2 + Bx + C 0, we deduce A n (2Ax + B)d n q n + Ad 2 n, B n (2Ax + B)(d n q n 2 + d n 2 q n ) + 2Ad n d n 2. 34

35 There are similar formulae expressing A, B, C as homogeneous linear combinations of A n, B n, C n, and since (A, B, C) (0, 0, 0), it follows that (A n, B n, C n ) (0, 0, 0). Since x n is irrational, one deduces A n 0. From the inequalities q n d n 2 <, q n 2 d n <, q n < q n, d n d n 2 <, one deduces max{ A n, B n /2, C n } < A + 2Ax + B. This shows that A n, B n and C n are bounded independently of n. Therefore there exists n 0 0 and s > 0 such that x n0 x n0 +s. From this we deduce that the continued fraction of x n0 is purely periodic, hence the continued fraction of x is ultimately periodic. A reduced quadratic irrational number is an irrational number x > which is a root of a degree 2 polynomial ax 2 + bx + c with rational integer coefficients, such that the other root x of this polynomial, which is the Galois conjugate of x, satisfies < x < 0. If x is reduced, then so is /x. Lemma 47. A continued fraction x [a 0, a,..., a n...] is purely periodic if and only if x is a reduced quadratic irrational number. In this case, if x [a 0, a,..., a s ] and if x is the Galois conjugate of x, then /x [a s,..., a, a 0 ] Proof. Assume first that the continued fraction of x is purely periodic: x [a 0, a,..., a s ]. From a s a 0 we deduce a 0 > 0, hence x >. From x [a 0, a,..., a s, x] and the unicity of the continued fraction expansion, we deduce x p s x + p s 2 q s x + q s 2 and x x s. Therefore x is a root of the quadratic polynomial P s (X) q s X 2 + (q s 2 p s )X p s 2. 35

36 This polynomial P s has a positive root, namely x >, and a negative root x, with the product xx p s 2 /q s. We transpose the relation ( ) ( ) ( ) ( ) ps p s 2 a0 a as q s and obtain (ps Define so that y >, p s 2 q s 2 q s q s 2 ) ( ) as 0 ( a 0 y [a s,..., a, a 0 ], ) ( ) a0. 0 y [a s,..., a, a 0, y] p s y + q s p s 2 y + q s 2 and y is the positive root of the polynomial Q s (X) p s 2 X 2 + (q s 2 p s )X q s. The polynomials P s and Q s are related by Q s (X) X 2 P s ( /X). Hence y /x. For the converse, assume x > and < x < 0. Let (x n ) n be the sequence of complete quotients of x. For n, define x n as the Galois conjugate of x n. One deduces by induction that x n a n + /x n+, that < x n < 0 (hence x n is reduced), and that a n is the integral part of /x n+. If the continued fraction expansion of x were not purely periodic, we would have x [a 0,..., a h, a h,..., a h+s ] with a h a h+s. By periodicity we have x h [a h,..., a h+s, x h ], hence x h x h+s, x h x h+s. From x h x h+s, taking integral parts, we deduce a h a h+s, a contradiction. Corollary 48. If r > is a rational number which is not a square, then the continued fraction expansion of r is of the form r [a0, a,..., a s, 2a 0 ] with a,..., a s a palindrome and a 0 r. Conversely, if the continued fraction expansion of an irrational number t > is of the form t [a 0, a,..., a s, 2a 0 ] with a,..., a s a palindrome, then t 2 is a rational number. 36

37 Proof. If t 2 r is rational >, then for and a 0 t the number x t+a 0 is reduced. Since t + t 0, we have x x 2a 0 Hence x [2a 0, a,..., a s ], x [a s,..., a, 2a 0 ] and a,..., a s a palindrome. Conversely, if t [a 0, a,..., a s, 2a 0 ] with a,..., a s a palindrome, then x t + a 0 is periodic, hence reduced, and its Galois conjugate x satisfies x [a,..., a s, 2a 0 ], x 2a 0 which means t + t 0, hence t 2 Q. Lemma 49 (Serret, 878). Let x and y be two irrational numbers with continued fractions x [a 0, a,..., a n...] and y [b 0, b,..., b m...] respectively. Then the two( following ) properties are equivalent. a b (i) There exists a matrix with rational integer coefficients and determinant ± such that c d y ax + b cx + d (ii) There exists n 0 0 and m 0 0 such that a n0 +k b m0 +k for all k 0. Condition (i) means that x and y are equivalent modulo the action of GL 2 (Z) by homographies. Condition (ii) means that there exists integers n 0, m 0 and a real number t > such that x [a 0, a,..., a n0, t] and y [b 0, b,..., b m0, t]. Example. If x [a 0, a, x 2 ], then x { [ a 0,, a, x 2 ] if a 2, [ a 0, + x 2 ] if a. (50) 37

38 Proof. We already know by (26) that if x n is a complete quotient of x, then x and x n are equivalent modulo GL 2 (Z). Condition (ii) means that there is a partial quotient of x and a partial quotient of y which are equal. By transitivity of the GL 2 (Z) equivalence, (ii) implies (i). Conversely, assume (i): y ax + b cx + d Let n be a sufficiently large number. From ( ) ( ) ( ) a b pn p n un u n c d with we deduce q n q n v n v n u n ap n + bq n, u n ap n + bq n, v n cp n + dq n, v n cp n + dq n, y u nx n+ + u n v n x n+ + v n We have v n (cx + d)q n + cδ n with δ n p n q n x. We have q n, q n q n + and δ n 0 as n. Hence, for sufficiently large n, we have v n > v n > 0. From part of Corollary 33, we deduce ( ) un u n v n v n ( a0 0 ) ( ) a 0 with a 0,..., a s in Z and a,..., a s positive. Hence y [a 0, a,..., a s, x n+ ]. ( as 0 ) A computational proof of (i) (ii). Another proof is given by Bombieri [3] (Theorem A. p. 209). He uses the fact that GL 2 (Z) is generated by the two matrices ( ) 0 and ( ) 0. 0 The associated fractional linear transformations are K and J defined by We have J 2 and K(x) x + and J(x) /x. K([a 0, t]) [a 0 +, t], K ([a 0, t]) [a 0, t]. 38

39 Also J([a 0, t]) [0, a 0, t]) if a 0 > 0 and J([0, t]) t ). According to (50), the continued fractions of x and x differ only by the first terms. This completes the proof Diophantine approximation and simple continued fractions Lemma 5 (Lagrange, 770). The sequence ( q n x p n ) n 0 is strictly decreasing: for n we have q n x p n < q n x p n. Proof. We use Lemma 27 twice: on the one hand q n x p n because x n+ >, on the other hand q n x p n because x n < a n +. x n q n + q n 2 > x n+ q n + q n < q n + q n (a n + )q n + q n 2 q n + q n Corollary 52. The sequence ( x p n /q n ) n 0 is strictly decreasing: for n we have x p n < x p n. q n q n Proof. For n, since q n < q n, we have x p n q n x p n < q n x p n q n q n q n x p n < x p n. q n q n q n q n Here is the law of best approximation of the simple continued fraction. 9 Bombieri in [3] gives formulae for J([a 0, t]) when a 0. He distinguishes eight cases, namely four cases when a 0 (a > 2, a 2, a and a 3 >, a a 3 ), two cases when a 0 2 (a >, a ) and two cases when a 0 3 (a >, a ). Here, (50) enables us to simplify his proof by reducing to the case a

40 Lemma 53. Let n 0 and (p, q) Z Z with q > 0 satisfy Then q q n+. qx p < q n x p n. Proof. The system of two linear equations in two unknowns u, v { pn u + p n+ v p q n u + q n+ v q (54) has determinant ±, hence there is a solution (u, v) Z Z. Since p/q p n /q n, we have v 0. If u 0, then v q/q n+ > 0, hence v and q n q n+. We now assume uv 0. Since q, q n and q n+ are > 0, it is not possible for u and v to be both negative. In case u and v are positive, the desired result follows from the second relation of (54). Hence one may suppose u and v of opposite signs. Since q n x p n and q n+ x p n+ also have opposite signs, the numbers u(q n x p n ) and v(q n+ x p n+ ) have same sign, and therefore q n x p n u(q n x p n ) + v(q n+ x p n+ ) qx p < q n x p n, which is a contradiction. A consequence of Lemma 53 is that the sequence of p n /q n produces the best rational approximations to x in the following sense: any rational number p/q with denominator q < q n has qx p > q n x p n. This is sometimes referred to as best rational approximations of type 0. Corollary 55. The sequence (q n ) n 0 of denominators of the convergents of a real irrational number x is the increasing sequence of positive integers for which q n x < qx for q < q n. As a consequence, q n x min qx. q q n The theory of continued fractions is developed starting from Corollary 55 as a definition of the sequence (q n ) n 0 in Cassels s book [7]. 40

18-29 mai 2015: Oujda (Maroc) École de recherche CIMPA-Oujda Théorie des Nombres et ses Applications. Continued fractions. Michel Waldschmidt

18-29 mai 2015: Oujda (Maroc) École de recherche CIMPA-Oujda Théorie des Nombres et ses Applications. Continued fractions. Michel Waldschmidt 18-29 mai 2015: Oujda (Maroc) École de recherche CIMPA-Oujda Théorie des Nombres et ses Applications. Continued fractions Michel Waldschmidt We first consider generalized continued fractions of the form

More information

Notes on Continued Fractions for Math 4400

Notes on Continued Fractions for Math 4400 . Continued fractions. Notes on Continued Fractions for Math 4400 The continued fraction expansion converts a positive real number α into a sequence of natural numbers. Conversely, a sequence of natural

More information

CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS

CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS JEREMY BOOHER Continued fractions usually get short-changed at PROMYS, but they are interesting in their own right and useful in other areas

More information

Prime Numbers and Irrational Numbers

Prime Numbers and Irrational Numbers Chapter 4 Prime Numbers and Irrational Numbers Abstract The question of the existence of prime numbers in intervals is treated using the approximation of cardinal of the primes π(x) given by Lagrange.

More information

Factorization in Integral Domains II

Factorization in Integral Domains II Factorization in Integral Domains II 1 Statement of the main theorem Throughout these notes, unless otherwise specified, R is a UFD with field of quotients F. The main examples will be R = Z, F = Q, and

More information

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. 2 Arithmetic This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. (See [Houston, Chapters 27 & 28]) 2.1 Greatest common divisors Definition 2.16. If a, b are integers, we say

More information

NOTES ON FINITE FIELDS

NOTES ON FINITE FIELDS NOTES ON FINITE FIELDS AARON LANDESMAN CONTENTS 1. Introduction to finite fields 2 2. Definition and constructions of fields 3 2.1. The definition of a field 3 2.2. Constructing field extensions by adjoining

More information

Introduction to Number Theory

Introduction to Number Theory INTRODUCTION Definition: Natural Numbers, Integers Natural numbers: N={0,1,, }. Integers: Z={0,±1,±, }. Definition: Divisor If a Z can be writeen as a=bc where b, c Z, then we say a is divisible by b or,

More information

Math 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby

Math 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby Math 8: Advanced Number Theory Samit Dasgupta and Gary Kirby April, 05 Contents Basics of Number Theory. The Fundamental Theorem of Arithmetic......................... The Euclidean Algorithm and Unique

More information

Explicit Methods in Algebraic Number Theory

Explicit Methods in Algebraic Number Theory Explicit Methods in Algebraic Number Theory Amalia Pizarro Madariaga Instituto de Matemáticas Universidad de Valparaíso, Chile amaliapizarro@uvcl 1 Lecture 1 11 Number fields and ring of integers Algebraic

More information

NORM OR EXCEPTION? KANNAPPAN SAMPATH & B.SURY

NORM OR EXCEPTION? KANNAPPAN SAMPATH & B.SURY NORM OR EXCEPTION? KANNAPPAN SAMPATH & B.SURY Introduction In a first course on algebraic number theory, a typical homework problem may possibly ask the student to determine the class group of a quadratic

More information

Course 2316 Sample Paper 1

Course 2316 Sample Paper 1 Course 2316 Sample Paper 1 Timothy Murphy April 19, 2015 Attempt 5 questions. All carry the same mark. 1. State and prove the Fundamental Theorem of Arithmetic (for N). Prove that there are an infinity

More information

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime. PUTNAM TRAINING NUMBER THEORY (Last updated: December 11, 2017) Remark. This is a list of exercises on Number Theory. Miguel A. Lerma Exercises 1. Show that the sum of two consecutive primes is never twice

More information

Solving x 2 Dy 2 = N in integers, where D > 0 is not a perfect square. Keith Matthews

Solving x 2 Dy 2 = N in integers, where D > 0 is not a perfect square. Keith Matthews Solving x 2 Dy 2 = N in integers, where D > 0 is not a perfect square. Keith Matthews Abstract We describe a neglected algorithm, based on simple continued fractions, due to Lagrange, for deciding the

More information

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2000 2013 Contents 9 Introduction to Number Theory 63 9.1 Subgroups

More information

1. Factorization Divisibility in Z.

1. Factorization Divisibility in Z. 8 J. E. CREMONA 1.1. Divisibility in Z. 1. Factorization Definition 1.1.1. Let a, b Z. Then we say that a divides b and write a b if b = ac for some c Z: a b c Z : b = ac. Alternatively, we may say that

More information

Moreover this binary operation satisfies the following properties

Moreover this binary operation satisfies the following properties Contents 1 Algebraic structures 1 1.1 Group........................................... 1 1.1.1 Definitions and examples............................. 1 1.1.2 Subgroup.....................................

More information

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results Euclid s Division Lemma : Given two positive integers a and b, there exist unique integers q and r satisfying a = bq + r, 0 r < b. Euclid s Division

More information

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES 2018 57 5. p-adic Numbers 5.1. Motivating examples. We all know that 2 is irrational, so that 2 is not a square in the rational field Q, but that we can

More information

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z: NUMBER SYSTEMS Number theory is the study of the integers. We denote the set of integers by Z: Z = {..., 3, 2, 1, 0, 1, 2, 3,... }. The integers have two operations defined on them, addition and multiplication,

More information

Factorization in Polynomial Rings

Factorization in Polynomial Rings Factorization in Polynomial Rings Throughout these notes, F denotes a field. 1 Long division with remainder We begin with some basic definitions. Definition 1.1. Let f, g F [x]. We say that f divides g,

More information

THE UNIT GROUP OF A REAL QUADRATIC FIELD

THE UNIT GROUP OF A REAL QUADRATIC FIELD THE UNIT GROUP OF A REAL QUADRATIC FIELD While the unit group of an imaginary quadratic field is very simple the unit group of a real quadratic field has nontrivial structure Its study involves some geometry

More information

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31 Contents 1 Lecture 1: Introduction 2 2 Lecture 2: Logical statements and proof by contradiction 7 3 Lecture 3: Induction and Well-Ordering Principle 11 4 Lecture 4: Definition of a Group and examples 15

More information

Summary Slides for MATH 342 June 25, 2018

Summary Slides for MATH 342 June 25, 2018 Summary Slides for MATH 342 June 25, 2018 Summary slides based on Elementary Number Theory and its applications by Kenneth Rosen and The Theory of Numbers by Ivan Niven, Herbert Zuckerman, and Hugh Montgomery.

More information

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2006 Contents 9 Introduction to Number Theory and Cryptography 1 9.1 Subgroups

More information

CONTINUED FRACTIONS. 1. Finite continued fractions A finite continued fraction is defined by [a 0,..., a n ] = a 0 +

CONTINUED FRACTIONS. 1. Finite continued fractions A finite continued fraction is defined by [a 0,..., a n ] = a 0 + CONTINUED FRACTIONS Abstract Continued fractions are used in various areas of number theory and its applications They are seen in the extended Euclidean algorithm; in approximations (of numbers and functions);

More information

arxiv:math/ v3 [math.nt] 23 May 2008

arxiv:math/ v3 [math.nt] 23 May 2008 ON THE CONTINUED FRACTION EXPANSION OF A CLASS OF NUMBERS arxiv:math/0409233v3 [math.nt] 23 May 2008 DAMIEN ROY Au Professeur Wolfgang Schmidt, avec mes meilleurs vœux et toute mon admiration. 1. Introduction

More information

φ(xy) = (xy) n = x n y n = φ(x)φ(y)

φ(xy) = (xy) n = x n y n = φ(x)φ(y) Groups 1. (Algebra Comp S03) Let A, B and C be normal subgroups of a group G with A B. If A C = B C and AC = BC then prove that A = B. Let b B. Since b = b1 BC = AC, there are a A and c C such that b =

More information

ECEN 5022 Cryptography

ECEN 5022 Cryptography Elementary Algebra and Number Theory University of Colorado Spring 2008 Divisibility, Primes Definition. N denotes the set {1, 2, 3,...} of natural numbers and Z denotes the set of integers {..., 2, 1,

More information

Public-key Cryptography: Theory and Practice

Public-key Cryptography: Theory and Practice Public-key Cryptography Theory and Practice Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Chapter 2: Mathematical Concepts Divisibility Congruence Quadratic Residues

More information

Math 2070BC Term 2 Weeks 1 13 Lecture Notes

Math 2070BC Term 2 Weeks 1 13 Lecture Notes Math 2070BC 2017 18 Term 2 Weeks 1 13 Lecture Notes Keywords: group operation multiplication associative identity element inverse commutative abelian group Special Linear Group order infinite order cyclic

More information

Winter Camp 2009 Number Theory Tips and Tricks

Winter Camp 2009 Number Theory Tips and Tricks Winter Camp 2009 Number Theory Tips and Tricks David Arthur darthur@gmail.com 1 Introduction This handout is about some of the key techniques for solving number theory problems, especially Diophantine

More information

LEGENDRE S THEOREM, LEGRANGE S DESCENT

LEGENDRE S THEOREM, LEGRANGE S DESCENT LEGENDRE S THEOREM, LEGRANGE S DESCENT SUPPLEMENT FOR MATH 370: NUMBER THEORY Abstract. Legendre gave simple necessary and sufficient conditions for the solvablility of the diophantine equation ax 2 +

More information

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. Chapter 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. If n > 1

More information

1 Continued Fractions

1 Continued Fractions Continued Fractions To start off the course, we consider a generalization of the Euclidean Algorithm which has ancient historical roots and yet still has relevance and applications today.. Continued Fraction

More information

THUE S LEMMA AND IDONEAL QUADRATIC FORMS

THUE S LEMMA AND IDONEAL QUADRATIC FORMS THUE S LEMMA AND IDONEAL QUADRATIC FORMS PETE L. CLARK Introduction Recently I learned about Thue s Lemma, an elementary result on congruences due to the Norwegian mathematician Axel Thue (1863-1922).

More information

Chapter 8. P-adic numbers. 8.1 Absolute values

Chapter 8. P-adic numbers. 8.1 Absolute values Chapter 8 P-adic numbers Literature: N. Koblitz, p-adic Numbers, p-adic Analysis, and Zeta-Functions, 2nd edition, Graduate Texts in Mathematics 58, Springer Verlag 1984, corrected 2nd printing 1996, Chap.

More information

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1 MATH 4400 SOLUTIONS TO SOME EXERCISES 1.1.3. If a b and b c show that a c. 1. Chapter 1 Solution: a b means that b = na and b c that c = mb. Substituting b = na gives c = (mn)a, that is, a c. 1.2.1. Find

More information

HASSE-MINKOWSKI THEOREM

HASSE-MINKOWSKI THEOREM HASSE-MINKOWSKI THEOREM KIM, SUNGJIN 1. Introduction In rough terms, a local-global principle is a statement that asserts that a certain property is true globally if and only if it is true everywhere locally.

More information

MATH 3030, Abstract Algebra FALL 2012 Toby Kenney Midyear Examination Friday 7th December: 7:00-10:00 PM

MATH 3030, Abstract Algebra FALL 2012 Toby Kenney Midyear Examination Friday 7th December: 7:00-10:00 PM MATH 3030, Abstract Algebra FALL 2012 Toby Kenney Midyear Examination Friday 7th December: 7:00-10:00 PM Basic Questions 1. Compute the factor group Z 3 Z 9 / (1, 6). The subgroup generated by (1, 6) is

More information

Numbers, Groups and Cryptography. Gordan Savin

Numbers, Groups and Cryptography. Gordan Savin Numbers, Groups and Cryptography Gordan Savin Contents Chapter 1. Euclidean Algorithm 5 1. Euclidean Algorithm 5 2. Fundamental Theorem of Arithmetic 9 3. Uniqueness of Factorization 14 4. Efficiency

More information

Continued fractions for complex numbers and values of binary quadratic forms

Continued fractions for complex numbers and values of binary quadratic forms arxiv:110.3754v1 [math.nt] 18 Feb 011 Continued fractions for complex numbers and values of binary quadratic forms S.G. Dani and Arnaldo Nogueira February 1, 011 Abstract We describe various properties

More information

Part II. Number Theory. Year

Part II. Number Theory. Year Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 Paper 3, Section I 1G 70 Explain what is meant by an Euler pseudoprime and a strong pseudoprime. Show that 65 is an Euler

More information

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2 8. p-adic numbers 8.1. Motivation: Solving x 2 a (mod p n ). Take an odd prime p, and ( an) integer a coprime to p. Then, as we know, x 2 a (mod p) has a solution x Z iff = 1. In this case we can suppose

More information

Chapter 14: Divisibility and factorization

Chapter 14: Divisibility and factorization Chapter 14: Divisibility and factorization Matthew Macauley Department of Mathematical Sciences Clemson University http://www.math.clemson.edu/~macaule/ Math 4120, Summer I 2014 M. Macauley (Clemson) Chapter

More information

QUADRATIC RINGS PETE L. CLARK

QUADRATIC RINGS PETE L. CLARK QUADRATIC RINGS PETE L. CLARK 1. Quadratic fields and quadratic rings Let D be a squarefree integer not equal to 0 or 1. Then D is irrational, and Q[ D], the subring of C obtained by adjoining D to Q,

More information

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2,

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2, SOLUTIONS TO PROBLEM SET 1 Section 1.3 Exercise 4. We see that 1 1 2 = 1 2, 1 1 2 + 1 2 3 = 2 3, 1 1 2 + 1 2 3 + 1 3 4 = 3 4, and is reasonable to conjecture n k=1 We will prove this formula by induction.

More information

PRIME NUMBERS YANKI LEKILI

PRIME NUMBERS YANKI LEKILI PRIME NUMBERS YANKI LEKILI We denote by N the set of natural numbers: 1,2,..., These are constructed using Peano axioms. We will not get into the philosophical questions related to this and simply assume

More information

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include PUTNAM TRAINING POLYNOMIALS (Last updated: December 11, 2017) Remark. This is a list of exercises on polynomials. Miguel A. Lerma Exercises 1. Find a polynomial with integral coefficients whose zeros include

More information

PELL S EQUATION, II KEITH CONRAD

PELL S EQUATION, II KEITH CONRAD PELL S EQUATION, II KEITH CONRAD 1. Introduction In Part I we met Pell s equation x dy = 1 for nonsquare positive integers d. We stated Lagrange s theorem that every Pell equation has a nontrivial solution

More information

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers ALGEBRA CHRISTIAN REMLING 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers by Z = {..., 2, 1, 0, 1,...}. Given a, b Z, we write a b if b = ac for some

More information

Gaussian integers. 1 = a 2 + b 2 = c 2 + d 2.

Gaussian integers. 1 = a 2 + b 2 = c 2 + d 2. Gaussian integers 1 Units in Z[i] An element x = a + bi Z[i], a, b Z is a unit if there exists y = c + di Z[i] such that xy = 1. This implies 1 = x 2 y 2 = (a 2 + b 2 )(c 2 + d 2 ) But a 2, b 2, c 2, d

More information

Chapter 5. Number Theory. 5.1 Base b representations

Chapter 5. Number Theory. 5.1 Base b representations Chapter 5 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,

More information

6 Orthogonal groups. O 2m 1 q. q 2i 1 q 2i. 1 i 1. 1 q 2i 2. O 2m q. q m m 1. 1 q 2i 1 i 1. 1 q 2i. i 1. 2 q 1 q i 1 q i 1. m 1.

6 Orthogonal groups. O 2m 1 q. q 2i 1 q 2i. 1 i 1. 1 q 2i 2. O 2m q. q m m 1. 1 q 2i 1 i 1. 1 q 2i. i 1. 2 q 1 q i 1 q i 1. m 1. 6 Orthogonal groups We now turn to the orthogonal groups. These are more difficult, for two related reasons. First, it is not always true that the group of isometries with determinant 1 is equal to its

More information

9. Integral Ring Extensions

9. Integral Ring Extensions 80 Andreas Gathmann 9. Integral ing Extensions In this chapter we want to discuss a concept in commutative algebra that has its original motivation in algebra, but turns out to have surprisingly many applications

More information

Chapter 3. Rings. The basic commutative rings in mathematics are the integers Z, the. Examples

Chapter 3. Rings. The basic commutative rings in mathematics are the integers Z, the. Examples Chapter 3 Rings Rings are additive abelian groups with a second operation called multiplication. The connection between the two operations is provided by the distributive law. Assuming the results of Chapter

More information

Table of Contents. 2013, Pearson Education, Inc.

Table of Contents. 2013, Pearson Education, Inc. Table of Contents Chapter 1 What is Number Theory? 1 Chapter Pythagorean Triples 5 Chapter 3 Pythagorean Triples and the Unit Circle 11 Chapter 4 Sums of Higher Powers and Fermat s Last Theorem 16 Chapter

More information

Math 201C Homework. Edward Burkard. g 1 (u) v + f 2(u) g 2 (u) v2 + + f n(u) a 2,k u k v a 1,k u k v + k=0. k=0 d

Math 201C Homework. Edward Burkard. g 1 (u) v + f 2(u) g 2 (u) v2 + + f n(u) a 2,k u k v a 1,k u k v + k=0. k=0 d Math 201C Homework Edward Burkard 5.1. Field Extensions. 5. Fields and Galois Theory Exercise 5.1.7. If v is algebraic over K(u) for some u F and v is transcendental over K, then u is algebraic over K(v).

More information

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 =

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 = 2 Numbers 2.1 Integers You remember the definition of a prime number. On p. 7, we defined a prime number and formulated the Fundamental Theorem of Arithmetic. Numerous beautiful results can be presented

More information

MODEL ANSWERS TO HWK #10

MODEL ANSWERS TO HWK #10 MODEL ANSWERS TO HWK #10 1. (i) As x + 4 has degree one, either it divides x 3 6x + 7 or these two polynomials are coprime. But if x + 4 divides x 3 6x + 7 then x = 4 is a root of x 3 6x + 7, which it

More information

Solutions of exercise sheet 6

Solutions of exercise sheet 6 D-MATH Algebra I HS 14 Prof. Emmanuel Kowalski Solutions of exercise sheet 6 1. (Irreducibility of the cyclotomic polynomial) Let n be a positive integer, and P Z[X] a monic irreducible factor of X n 1

More information

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations Page 1 Definitions Tuesday, May 8, 2018 12:23 AM Notations " " means "equals, by definition" the set of all real numbers the set of integers Denote a function from a set to a set by Denote the image of

More information

REAL NUMBERS. Any positive integer a can be divided by another positive integer b in such a way that it leaves a remainder r that is smaller than b.

REAL NUMBERS. Any positive integer a can be divided by another positive integer b in such a way that it leaves a remainder r that is smaller than b. REAL NUMBERS Introduction Euclid s Division Algorithm Any positive integer a can be divided by another positive integer b in such a way that it leaves a remainder r that is smaller than b. Fundamental

More information

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations D. R. Wilkins Academic Year 1996-7 1 Number Systems and Matrix Algebra Integers The whole numbers 0, ±1, ±2, ±3, ±4,...

More information

Rings and modular arithmetic

Rings and modular arithmetic Chapter 8 Rings and modular arithmetic So far, we have been working with just one operation at a time. But standard number systems, such as Z, have two operations + and which interact. It is useful to

More information

Introduction to Number Theory

Introduction to Number Theory Introduction to Number Theory Paul Yiu Department of Mathematics Florida Atlantic University Spring 017 March 7, 017 Contents 10 Pythagorean and Heron triangles 57 10.1 Construction of Pythagorean triangles....................

More information

Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra

Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra D. R. Wilkins Contents 3 Topics in Commutative Algebra 2 3.1 Rings and Fields......................... 2 3.2 Ideals...............................

More information

MATH 361: NUMBER THEORY FOURTH LECTURE

MATH 361: NUMBER THEORY FOURTH LECTURE MATH 361: NUMBER THEORY FOURTH LECTURE 1. Introduction Everybody knows that three hours after 10:00, the time is 1:00. That is, everybody is familiar with modular arithmetic, the usual arithmetic of the

More information

Pell Equation x 2 Dy 2 = 2, II

Pell Equation x 2 Dy 2 = 2, II Irish Math Soc Bulletin 54 2004 73 89 73 Pell Equation x 2 Dy 2 2 II AHMET TEKCAN Abstract In this paper solutions of the Pell equation x 2 Dy 2 2 are formulated for a positive non-square integer D using

More information

TC10 / 3. Finite fields S. Xambó

TC10 / 3. Finite fields S. Xambó TC10 / 3. Finite fields S. Xambó The ring Construction of finite fields The Frobenius automorphism Splitting field of a polynomial Structure of the multiplicative group of a finite field Structure of the

More information

Constructions with ruler and compass.

Constructions with ruler and compass. Constructions with ruler and compass. Semyon Alesker. 1 Introduction. Let us assume that we have a ruler and a compass. Let us also assume that we have a segment of length one. Using these tools we can

More information

CHAPTER 1 REAL NUMBERS KEY POINTS

CHAPTER 1 REAL NUMBERS KEY POINTS CHAPTER 1 REAL NUMBERS 1. Euclid s division lemma : KEY POINTS For given positive integers a and b there exist unique whole numbers q and r satisfying the relation a = bq + r, 0 r < b. 2. Euclid s division

More information

1. Let r, s, t, v be the homogeneous relations defined on the set M = {2, 3, 4, 5, 6} by

1. Let r, s, t, v be the homogeneous relations defined on the set M = {2, 3, 4, 5, 6} by Seminar 1 1. Which ones of the usual symbols of addition, subtraction, multiplication and division define an operation (composition law) on the numerical sets N, Z, Q, R, C? 2. Let A = {a 1, a 2, a 3 }.

More information

Complex Numbers: Definition: A complex number is a number of the form: z = a + bi where a, b are real numbers and i is a symbol with the property: i

Complex Numbers: Definition: A complex number is a number of the form: z = a + bi where a, b are real numbers and i is a symbol with the property: i Complex Numbers: Definition: A complex number is a number of the form: z = a + bi where a, b are real numbers and i is a symbol with the property: i 2 = 1 Sometimes we like to think of i = 1 We can treat

More information

CHAPTER 8: EXPLORING R

CHAPTER 8: EXPLORING R CHAPTER 8: EXPLORING R LECTURE NOTES FOR MATH 378 (CSUSM, SPRING 2009). WAYNE AITKEN In the previous chapter we discussed the need for a complete ordered field. The field Q is not complete, so we constructed

More information

Computations/Applications

Computations/Applications Computations/Applications 1. Find the inverse of x + 1 in the ring F 5 [x]/(x 3 1). Solution: We use the Euclidean Algorithm: x 3 1 (x + 1)(x + 4x + 1) + 3 (x + 1) 3(x + ) + 0. Thus 3 (x 3 1) + (x + 1)(4x

More information

Definitions, Theorems and Exercises. Abstract Algebra Math 332. Ethan D. Bloch

Definitions, Theorems and Exercises. Abstract Algebra Math 332. Ethan D. Bloch Definitions, Theorems and Exercises Abstract Algebra Math 332 Ethan D. Bloch December 26, 2013 ii Contents 1 Binary Operations 3 1.1 Binary Operations............................... 4 1.2 Isomorphic Binary

More information

Mathematics for Cryptography

Mathematics for Cryptography Mathematics for Cryptography Douglas R. Stinson David R. Cheriton School of Computer Science University of Waterloo Waterloo, Ontario, N2L 3G1, Canada March 15, 2016 1 Groups and Modular Arithmetic 1.1

More information

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru Number Theory Marathon Mario Ynocente Castro, National University of Engineering, Peru 1 2 Chapter 1 Problems 1. (IMO 1975) Let f(n) denote the sum of the digits of n. Find f(f(f(4444 4444 ))). 2. Prove

More information

THUE S LEMMA AND IDONEAL QUADRATIC FORMS

THUE S LEMMA AND IDONEAL QUADRATIC FORMS THUE S LEMMA AND IDONEAL QUADRATIC FORMS PETE L. CLARK Abstract. The representation of integers by binary quadratic forms is one of the oldest problems in number theory, going back at least to Fermat s

More information

INDEFINITE QUADRATIC FORMS AND PELL EQUATIONS INVOLVING QUADRATIC IDEALS

INDEFINITE QUADRATIC FORMS AND PELL EQUATIONS INVOLVING QUADRATIC IDEALS INDEFINITE QUADRATIC FORMS AND PELL EQUATIONS INVOLVING QUADRATIC IDEALS AHMET TEKCAN Communicated by Alexandru Zaharescu Let p 1(mod 4) be a prime number, let γ P + p Q be a quadratic irrational, let

More information

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru Number Theory Marathon Mario Ynocente Castro, National University of Engineering, Peru 1 2 Chapter 1 Problems 1. (IMO 1975) Let f(n) denote the sum of the digits of n. Find f(f(f(4444 4444 ))). 2. Prove

More information

Some Results Concerning Uniqueness of Triangle Sequences

Some Results Concerning Uniqueness of Triangle Sequences Some Results Concerning Uniqueness of Triangle Sequences T. Cheslack-Postava A. Diesl M. Lepinski A. Schuyler August 12 1999 Abstract In this paper we will begin by reviewing the triangle iteration. We

More information

1. multiplication is commutative and associative;

1. multiplication is commutative and associative; Chapter 4 The Arithmetic of Z In this chapter, we start by introducing the concept of congruences; these are used in our proof (going back to Gauss 1 ) that every integer has a unique prime factorization.

More information

Finite Fields: An introduction through exercises Jonathan Buss Spring 2014

Finite Fields: An introduction through exercises Jonathan Buss Spring 2014 Finite Fields: An introduction through exercises Jonathan Buss Spring 2014 A typical course in abstract algebra starts with groups, and then moves on to rings, vector spaces, fields, etc. This sequence

More information

Arithmetic Progressions Over Quadratic Fields

Arithmetic Progressions Over Quadratic Fields Arithmetic Progressions Over Quadratic Fields Alexander Diaz, Zachary Flores, Markus Vasquez July 2010 Abstract In 1640 Pierre De Fermat proposed to Bernard Frenicle de Bessy the problem of showing that

More information

1 Overview and revision

1 Overview and revision MTH6128 Number Theory Notes 1 Spring 2018 1 Overview and revision In this section we will meet some of the concerns of Number Theory, and have a brief revision of some of the relevant material from Introduction

More information

ABSTRACT ALGEBRA 2 SOLUTIONS TO THE PRACTICE EXAM AND HOMEWORK

ABSTRACT ALGEBRA 2 SOLUTIONS TO THE PRACTICE EXAM AND HOMEWORK ABSTRACT ALGEBRA 2 SOLUTIONS TO THE PRACTICE EXAM AND HOMEWORK 1. Practice exam problems Problem A. Find α C such that Q(i, 3 2) = Q(α). Solution to A. Either one can use the proof of the primitive element

More information

Finite Fields and Error-Correcting Codes

Finite Fields and Error-Correcting Codes Lecture Notes in Mathematics Finite Fields and Error-Correcting Codes Karl-Gustav Andersson (Lund University) (version 1.013-16 September 2015) Translated from Swedish by Sigmundur Gudmundsson Contents

More information

Lecture Notes. Advanced Discrete Structures COT S

Lecture Notes. Advanced Discrete Structures COT S Lecture Notes Advanced Discrete Structures COT 4115.001 S15 2015-01-13 Recap Divisibility Prime Number Theorem Euclid s Lemma Fundamental Theorem of Arithmetic Euclidean Algorithm Basic Notions - Section

More information

Math 200 University of Connecticut

Math 200 University of Connecticut IRRATIONALITY OF π AND e KEITH CONRAD Math 2 University of Connecticut Date: Aug. 3, 25. Contents. Introduction 2. Irrationality of π 2 3. Irrationality of e 3 4. General Ideas 4 5. Irrationality of rational

More information

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Chapter : Logic Topics:. Statements, Negation, and Compound Statements.2 Truth Tables and Logical Equivalences.3

More information

Elementary Number Theory Review. Franz Luef

Elementary Number Theory Review. Franz Luef Elementary Number Theory Review Principle of Induction Principle of Induction Suppose we have a sequence of mathematical statements P(1), P(2),... such that (a) P(1) is true. (b) If P(k) is true, then

More information

Lagrange s polynomial

Lagrange s polynomial Lagrange s polynomial Nguyen Trung Tuan November 16, 2016 Abstract In this article, I will use Lagrange polynomial to solve some problems from Mathematical Olympiads. Contents 1 Lagrange s interpolation

More information

Selected Math 553 Homework Solutions

Selected Math 553 Homework Solutions Selected Math 553 Homework Solutions HW6, 1. Let α and β be rational numbers, with α 1/2, and let m > 0 be an integer such that α 2 mβ 2 = 1 δ where 0 δ < 1. Set ǫ:= 1 if α 0 and 1 if α < 0. Show that

More information

1 The Galois Group of a Quadratic

1 The Galois Group of a Quadratic Algebra Prelim Notes The Galois Group of a Polynomial Jason B. Hill University of Colorado at Boulder Throughout this set of notes, K will be the desired base field (usually Q or a finite field) and F

More information

Rings. Chapter 1. Definition 1.2. A commutative ring R is a ring in which multiplication is commutative. That is, ab = ba for all a, b R.

Rings. Chapter 1. Definition 1.2. A commutative ring R is a ring in which multiplication is commutative. That is, ab = ba for all a, b R. Chapter 1 Rings We have spent the term studying groups. A group is a set with a binary operation that satisfies certain properties. But many algebraic structures such as R, Z, and Z n come with two binary

More information

Chapter 2. Divisibility. 2.1 Common Divisors

Chapter 2. Divisibility. 2.1 Common Divisors Chapter 2 Divisibility 2.1 Common Divisors Definition 2.1.1. Let a and b be integers. A common divisor of a and b is any integer that divides both a and b. Suppose that a and b are not both zero. By Proposition

More information

THE TRIANGULAR THEOREM OF THE PRIMES : BINARY QUADRATIC FORMS AND PRIMITIVE PYTHAGOREAN TRIPLES

THE TRIANGULAR THEOREM OF THE PRIMES : BINARY QUADRATIC FORMS AND PRIMITIVE PYTHAGOREAN TRIPLES THE TRIANGULAR THEOREM OF THE PRIMES : BINARY QUADRATIC FORMS AND PRIMITIVE PYTHAGOREAN TRIPLES Abstract. This article reports the occurrence of binary quadratic forms in primitive Pythagorean triangles

More information

Perspectives of Mathematics

Perspectives of Mathematics Perspectives of Mathematics Module on Diophantine Equations and Geometry Fall 2004 Michael Stoll What is a diophantine equation? 1. Introduction and Examples Being diophantine is not so much a property

More information