Number Theory and Cryptography

Size: px
Start display at page:

Download "Number Theory and Cryptography"

Transcription

1 Number Theory and Cryptography Paul Yiu Department of Mathematics Florida Atlantic University Fall 207 Chapters 9 October 23, 207

2 Contents 9 Sums of Two and Four Squares 95 9 Fermat s two-square theorem 95 9 Fermat s two-square theorem and Gaussian integers Representations of integers as sums of two squares Lagrange s four-square theorem Sums of three squares 99 0 Continued Fractions 0 0 Finite continued fractions 0 0 Euler s function F for finite continued fractions 0 02 The convergents of a continued fraction Cornacchia s algorithm for a prime as a sum of two squares Infinite continued fractions Approximations of irrational numbers Purely periodic continued fractions Lagrange s theorem 07 Continued fraction expansion of d 2 The Pell Equation 5 The equation x 2 dy 2 = 5 2 The equation x 2 dy 2 = 8 3 The equation x 2 dy 2 = N 8 4 Applications of Pell s equations 20 5 Sums of consecutive squares 22 5 Odd number of consecutive squares Even number of consecutive squares 23

3 Chapter 9 Sums of Two and Four Squares 9 Fermat s two-square theorem Theorem 9 Letpbe an odd prime p is a sum of two squares if and only ifp (mod 4) In this case, the expression is unique Proof (Euler) Let p (mod 4) be a prime number The following algorithm expresses p as a sum of two squares of integers () Let q be the smaller positive square root of (mod p), ie, q 2 (mod p) and 0 < q < p Then with (x 2 0,y 0 ) = (q,), we have x 2 0 +y0 2 = q 2 + = m 0 p for an integer m 0 > 0 ) 2 + p 2 4,m 0 p 4 Since q 2 + < ( p 2 (2) Now suppose we have a sequence of positive integers satisfying (x 0,y 0 ), (x,y ),, (x k, y k ) x 2 i +y 2 i = m i p for i = 0,,2,k, andm 0 > m > > m k If m k =, we are done: x 2 k +y2 k = p Otherwise, choose integers a k andb k such that { u k = x k m k a k, v k = y k m k b k satisfy u k, v k < m k 2 (u k and v k are the least absolute value residues of x k andy k modulo m k ) With this choice, u 2 k +v 2 k = (x 2 k +y 2 k ) 2m k (a k x k +b k y k )+m 2 k (a 2 k +b 2 k) = m k p 2m k (a k x k +b k y k )+m 2 k (a 2 k +b 2 k) = m k (p 2(a k x k +b k y k )+m k (a 2 k +b 2 k)) = m k m k

4 96 Sums of Two and Four Squares where m k = p 2(a k x k + b k y k ) + m k (a 2 k + b2 k ) Since u k, v k < m k m k < m k 2 From the 2-square identity, (x 2 k +y 2 k )(u 2 k +v 2 k) = (x k u k +y k v k ) 2 +(x k v k y k u k ) 2 ( ) Here, x k u k +y k v k and x k v k y k u k are both divisible by m k, ie, there are integers x k and y k such that From (*), m k x k = x k u k +y k v k, m k y k = x k v k y k u k m k p m k m k = m 2 k (x 2 k +y 2 k) = x 2 k +y 2 k = m k p (3) If m k =, then we are done: x 2 k +y2 k = p Otherwise, repeat step (2) (Uniqueness) Ifp = a 2 +b 2 = x 2 +y 2, wherea < b andx < y are all positive, then p 2 = (a 2 +b 2 )(x 2 +y 2 ) = (ax+by) 2 +(ay bx) 2 = (ax by) 2 +(ay +bx) 2 Note that (ax+by)(ay +bx) = ab(x 2 +y 2 )+(a 2 +b 2 )xy = p(ab+xy) This means that one ofax+by anday+bx is divisible byp Sinceax+by,ay+bx p, we must have ay bx = 0 or ax by = 0 In other words, x = a or b Indeed, y b a It follows that we must have x = a andy = b x y = a b We make the algorithm in the proof more explicit: () (x 0,y 0 ) = (q,) (2) m k = x2 k +y2 k p (3) u k+ andv k+ are the least absolute value residues of x k andy k modulo m k (4) (x k+,y k+ ) = ( xk u k+ +y k v k+ m k, x kv k+ y k u k+ m k ) (5) m k+ = x2 k+ +y2 k+ p (6) The process stops whenm k+ = Thenx 2 k+ +y2 k+ = p Otherwise, repeat (2) Example 9 Letp = 7933 The smaller positive root of (mod p) isq = 2950 From this, 7933 = k x k y k u k v k m k ,

5 9 Fermat s two-square theorem 97 9 Fermat s two-square theorem and Gaussian integers Since p (mod 4), is a quadratic residue This means that there exists an integer a p such thata 2 + is divisible by p Note thata 2 + < p 2 2 Regarded as Gaussian integers, a 2 + = (a + i)(a i) We claim that p does not divide a + i nor a i; otherwise, p 2 = N(p) N(a + i) = a 2 + < p 2, a contradiction This means that p is not a prime in Z[ ] and there is a factorization of p = αβ Z[ ], in which none of α, β is a unit, ie, N(α),N(β) > It follows from p 2 = N(p) = N(α)N(β) that N(α) = N(β) = p, and p is a sum of two squares of integers 92 Representations of integers as sums of two squares We say that a representation n = x 2 +y 2 is primitive if gcd(x,y) = Lemma 92 If n has a prime divisor q 3 (mod 4), then it does not have a primitive representation Proof Suppose to the contrary thatn = x 2 +y 2 is a primitive representation Since q divides n, it does not divide any of x and y In the field Z q, we write y = ax for somea This means that0 = x 2 +y 2 = x 2 (+a 2 ) Sincex 0, we havea 2 = in Z q, q 3 mod 4, a contradiction Theorem 93 n = 2 a i be the prime factorization of n in which the p s and q s are respectively primes of the form 4k + and 4k +3 The number n is expressible as a sum of two squares if and only if each of the exponents c j is even Proof (Sufficiency) Since 2 = 2 + 2, and every p i is a sum of two squares, if everyc j is even, by repeatedly using the composition formula p b i i j q c j j (a 2 +b 2 )(x 2 +y 2 ) = (ax+by) 2 +(ay bx) 2 we easily obtain n as a sum of two squares (Necessity) Let n be divisible by a prime q 3 (mod 4), with highest power q c, c odd Consider a representation n = x 2 +y 2, with gcd(x,y) = d > Let q c be the highest power of q dividing d (Possibly, c = 0) Write x = dx, y = dy Then gcd(x,y) = Let N = X 2 + Y 2 The highest power of q dividing N is q c 2c This is positive since c is odd, contradicting Lemma 92 above

6 98 Sums of Two and Four Squares 92 Lagrange s four-square theorem Theorem 94 Every positive integer can be represented as a sum of four squares of nonnegative integers Lemma 95 (4-square identity) where (x 2 +x 2 2 +x 2 3 +x 2 4)(y 2 +y 2 2 +y 2 3 +y 2 4) = z 2 +z 2 2 +z 2 3 +z 2 4, z = x y +x 2 y 2 +x 3 y 3 +x 4 y 4, z 2 = x y 2 x 2 y +x 3 y 4 x 4 y 3, z 3 = x y 3 x 2 y 4 x 3 y +x 4 y 2, z 4 = x y 4 +x 2 y 3 x 3 y 2 x 4 y Therefore it is enough to prove Lagrange s theorem for prime numbers Lemma 96 Let p be a prime number There are integers x and y such that x 2 + y (mod p) Proof The set S := {x 2 Z p : x Z} has exactly p+ 2 elements; so does the set T := { (x 2 +) Z p : x Z} Now, S T = S + T S T p+ 2 + p+ 2 p = Therefore, there are integers x and y satisfying x 2 (y 2 + ) (mod p), ie, x 2 +y (mod p) Proof of Theorem 94 Letpbe a prime number There are integersxandy such thatx 2 +y 2 + is divisible byp We write this in the formx 2 +x 2 2+x 2 3+x 2 4 = kp for some integerk Clearly, we may assume x, x 2, x 3, x 4 p < p (p) 2 This means kp < = p 2 and k < p If k, we shall show that x, x 2, x 3, x 4 can be replaced by another quadruple with a smaller k Then, by descent, we shall ultimately reachk = Suppose k is even We may assume x x 2 (mod 2) and x 3 x 4 (mod 2) Then ( ) 2 ( ) 2 ( ) 2 ( ) 2 x +x 2 x x 2 x3 +x 4 x3 x = x2 +x 2 2 +x 2 3 +x = k 2 p

7 93 Sums of three squares 99 with a smaller multiplier for p Suppose k is odd For i =,2,3,4, choose y i x i with y i < k Note that y 2 +y2 2 +y3 2 +y4 2 x 2 +x 2 2 +x 2 3 +x 2 4 (mod k) Write y 2 +y2 2 +y3 2 +y4 2 = kq for some q < k Note thatq must be nonzero Apply the four-square identity to the two quadruples x i and y i The left hand side is (kp)(kq) = k 2 pq On the right hand side, z 2, z 3, z 4 are clearly divisible by k; so is z because z = x y + x 2 y 2 + x 3 y 3 + x 4 y 4 x 2 + x x x (mod k) Writing z i = kw i for i =,2,3,4, we have, from the 4-square identity, wi 2 +w2 2 +w3 2 +w4 2 = qp for q < k 93 Sums of three squares Theorem 97 An integer of the form4 k (8m+7) cannot be a sum of 3 squares Proof Integer squares modulo 8 are congruent to 0,or4 x mod x 2 mod From these, a sum of 3 squares cannot be congruent to7(mod8) , 0+0+, , 0++ 2, , , ++ 3, ++4 6, +4+4, Note that x 2 + y 2 + z 2 4 (mod 8) only if x, y, z are all even In this case, x 2 +y 2 +z 2 = 4(x 2 +y 2 +z 2 ) for integers x, y, z It follows that if 4 k n is a sum of three squares, then so isn Since numbers of the form8m+7 are not sums of 3 squares, neither are 4 k (8m+7) Remark The converse of Theorem 97 is also true; but is a much more difficult theorem

8 00 Sums of Two and Four Squares

9 Chapter 0 Continued Fractions 0 Finite continued fractions 0 Euler s functionf for finite continued fractions Every rational number a b can be written as a finite continued fraction in the form a b = q 0 + q + q 2 + +q n + q n, where q 0, q, q 2,, q n are the quotients in the Euclidean algorithm sequence for (a,b): putting r 2 = a,r = b, we defineq k andr k for k = 0,,,n by Here,q k = r k 2 r k, and a = bq 0 +r 0, b = r 0 q +r, r 0 = r q 2 +r 2, r n 2 = r n q n +r n, r n = r n q n+ a > b > r 0 > r > r 2 > r 3 > r n > r n in which r n r n The number r n is the gcd of a and b If we assume the rational number given in its lowest terms, thenr n = We shall write the continued fraction above simply as [q 0,q,q 2,,q n ] Now, it is easy to compute the following

10 02 Continued Fractions [q 0 ] = q 0, [q 0,q ] = q 0q + q, [q 0,q,q 2 ] = q 0q q 2 +q 0 +q 2, q q 2 + [q 0,q,q 2,q 3 ] = q 0q q 2 q 3 +q 0 q +q 0 q 3 +q q 2 +, q q 2 q 3 +q +q 3 Euler has given a very elegant procedure of computing finite continued fractions: [q 0,q,q 2,,q n ] = F(q 0,q,q 2,,q n ) F(q,q 2,,q n ), where F is the function obtained in the following way: F(q 0,q,,q n ) is the sum of q 0 q q n and all products obtained by deleting pairs of consecutive factors, with the stipulation that if n+ is even, deleting all consecutive pairs leads to the empty product Lemma 0 (a)f is palindromic: F(q 0,q,,q n,q n ) = F(q n,q n,,q,q 0 ) (b) F(q 0,q,,q n,q n ) = F(q 0,q,,q n 2 )+F(q 0,q,q n ) q n (0) = q 0 F(q,,q n )+F(q 2,q n ) (02) Proof (a) is clear (b) The terms off(q 0,q,,q n,q n ) fall into two classes: (i) each of those containing q n is multiplied to a term in mathcalf(q 0,, n ), (ii) those not containing q b cannot contain q n and are all inf(q 0,,q n 2 This proves (0) The relation (02) follows from this and (a) Lemma 02 Letq 0,q,, q n be positive integers The numbers F(q 0,q,,q n ), F(q,q 2,,q n ),,F(q n,q n ), F(q n ) are pairwise relatively prime

11 0 Finite continued fractions 03 Proof From the above relations, gcd(f(q 0,q,,, F(q,q,,q n ) = gcd(f(q,,q n,q n ), F(q 2,,q n ) = gcd(f(q n,q n ),gcd(q n ) = gcd(q n q n +, q n ) = Proposition 03 Let a > b be relatively prime With r 2 = a and r = b, in the Euclidean algorithm sequence of(a,b), for k = 0,,n 2, and r n = r k = F(q k+2,,q n ), Proof Note thatr 2 = a = F(q 0,q,,q n ) and r = b = F(q,q 2,,q n ) r 0 F(q,q 2,,q n ) = r 0 r = a b q 0 = [0,q,q 2,,q n ] = [q,q 2,,q n ] = F(q 2,,q n ) F(q,q 2,,q n ) Therefore, r 0 = F(q 2,,q n ) The rest follows by induction 02 The convergents of a continued fraction Given a continued fraction [q 0,q,,q n ], by writing, for k = 0,,,n, P k = F(q 0,q,,q k ), Q k = F(q,,q k ), we obtain a sequence P k Q k, k = 0,,,n, in which the term Pn = a P b k and Q k can be computed recursively as follows P k = P k 2 +q k P k, P 2 = 0, P =, Q k = Q k 2 +q k Q k, Q 2 =, Q = 0

12 04 Continued Fractions Remark Comparison with the Euclidean algorithm table of (a,b) shows that for k = 0,,2,,n P k = y k = ( ) k y k, Q k = x k = ( ) k x k, Example 0 The continued fraction[, 2, 3, 4, 5, 6, 7, 8, 9, 0] are computed easily using these relations k q k P k Q k Lemma 04 Fork =,,n, P k Q k P k Q k = ( )k Q k Q k Proof Write P k Q k P k Q k = N k Q k Q k We have N k = P k Q k Q k P k = (P k 2 +q k P k )Q k (Q k 2 +q k Q k )P k = (P k Q k 2 Q k P k 2 ) = N k Since N =, we have by easy induction N k = ( ) k N = ( ) k, and the result follows Lemma 05 Fork = 2,,n, P k Q k P k 2 Q k 2 = ( )k q k Q k 2 Q k Proof P k Q k P k 2 Q k 2 = ( Pk P ) ( k 2 Pk + P ) k Q k Q k 2 Q k Q k = ( )k 2 Q k 2 Q k + ( )k Q k Q k = ( )k (Q k Q k 2 ) Q k 2 Q k Q k = ( )k q k Q k Q k 2 Q k Q k = ( )k q k Q k 2 Q k 02 Cornacchia s algorithm for a prime as a sum of two squares Theorem 06 (Cornacchia) Let p (mod 4) be a prime, and q the smaller positive square root of mod p If in the euclidean algorithm sequence of(p,q), x and y are the first two remainders smaller than p, thenp = x 2 +y 2

13 02 Cornacchia s algorithm for a prime as a sum of two squares 05 Proof Consider the Euclidean algorithm sequence r 2 = p, r = q, r 0, r,, r n =, r n+ = 0 for the pair(p,q), and its two associated sequences(x k ) and(y k ) fork = 2,,, n,n+ We complete the proof in the following steps n is even () Since = gcd(p,q) = px n +qy n qy n (mod p) andq 2 (mod p), we havey n q (mod p) It follows thaty n = q orp q The reversal of ( y k ) is a Euclidean algorithm sequence with the same length as that of(p,q) If y n = p q, the Euclidean algorithm sequence of (p, p q) would be p, p q, q, which is longer than that of(p,q), a contradiction Thus,( ) n y n = y n = q andnis even 2 The sequence ( y k ) is the reversal of (r k ); ie, y k = r n k for every 2 k n+ Furthermore, ( y k ) is the reversal of the Euclidean algorithm sequence of (p,q), which is exactly the sequence (r k ) 3 The sequence(q k ) is palindromic; ie,q n+ k = q k for everyk = 0,, 2,, n+ This is an immediate consequence of (2) 4 rk 2 +y2 k is divisible by p for everyk This follows from r k = px k +qy k qy k (mod p) Squaring, we have rk 2 q 2 yk 2 y2 k (mod p), andr2 k +y2 k 0 (mod p) 5 Let n = 2m In the sequence (r k ), r m and r m are the two terms smaller than p Write n = 2m Note that r m = F(q m+,q m+2,,q 2m ), and p = r 2 = F(q 0,,q 2m ) Now, since (q k ) is palindromic, r 2 m = r m r m = F(q m+,q m+2,,q 2m )F(q m+,q m+2,,q 2m ) = F(q 0,q,q m )F(q m+,q m+2,,q 2m ) It is clear that each term in the product is contained inf(q 0,q 2,,q 2m ) This shows that r 2 m < p On the other hand, r 2 m 2 = r m 2 r m 2 = F(q m,q m+,q m+2,,q 2m )F(q m,q m+,q m+2,,q 2m ) = F(q 0,q,, q m )F(q m,q m+,q m+2,,q 2m )

14 06 Continued Fractions This time, every term in F(q 0,q,q 2,,q 2m ) is contained in this product This shows that r 2 m 2 > p Therefore, r m and r m are the first two terms in the Euclidean algorithm less than p 6 p = r 2 m +r 2 m Now, since r m = r (n ) (m ) = y m, we have r 2 m +r 2 m = r 2 m +y 2 m 0 (mod p) Since r m < r m < p, the sum r 2 m +r 2 m being positive and smaller than 2p, must be p Example 02 p = is the00,000-th prime The square roots of mod p are ± mod p k q k r k x k y k = Infinite continued fractions Theorem 07 Let q 0,q,,q n, be an infinite sequence of positive integers The sequence of rational numbers defined by P n = [q 0,q,,q n ] is convergent ( ) P Proof By Lemma 05, (i) the subsequence of even indexed convergents 2n Q 2n is ( ) an increasing sequence, (ii) the subsequence of odd indexed convergents P2n+ Q 2n+

15 03 Infinite continued fractions 07 is a decreasing sequence By Lemma 04, ( P0, P ) ( P2, P ) ( 3 P2n, P ) 2n+ Q 0 Q Q 2 Q 3 Q 2n Q 2n+ By Lemma 04 again, the lengths of these intervals converges to0: lim n P 2n+ Q 2n+ P 2n Q 2n = lim n Q 2n+ Q 2n = 0 since Q 2n+ > Q 2n > 2n Therefore the intervals ( P n ) have a unique common point, which is the limit of the sequence Letζ be a real, irrational number, The continued fraction expansion ofζ can be found recursively as follows Then, ζ 0 = ζ, q 0 = [ζ 0 ]; ζ n+ = ζ = [q 0,q,q 2,,q n,] ζ n [ζ n ], q n+ = [ζ n+ ] Corollary 08 Every positive real number has a unique continued fraction expansion If the number is rational, the last quotient is greater than Proposition 09 Let ζ = [q 0,q,,q n,] with convergents Pn For every integer n, () +2 < ζ P n < +, (2) ζ P n < ζ P n, ζ (3) ζ Pn < P n, (4) ζ Pn < Q 2 n Proof We make use of the tails of the infinite continued fraction For each n, define ζ n+ := [q n+, q n+2,] This satisfies () ζ = [q 0,q,,q n,ζ n+ ] = P n +P n ζ n+ + ζ n+ Therefore, ζ P n = ζ n+p n +P n ζ n+ + P n ζ P n = = P n P n (ζ n+ + ) ζ n+ +

16 08 Continued Fractions Sinceq n+ < ζ n+ < +q n+, the denominator is betweenq n+ + = + and (+q n+ ) + = (The last equality holds only if q n+2 = ) Thus, +2 < ζ P n < + (2) Applying () twice, < ζ P n < < ζ P n < (3) This follows from (2) by dividing by, and the fact that > (4) Since ζ lies Pn and P n+ +, ζ P n < P n+ P n + = ( ) n + = < + Q 2 n since < + 04 Approximations of irrational numbers Lemma 00 Let0 < Q If P Q Pn, then ζ Q P > ζ P n Proof () Assume Q = Since P P n, P Pn Q On the other hand, ζ P n = P n +P n ζ n+ P n + ζ n+ = ( ) n ( + ζ n+ ) = ( +ζ n+ ) < < Q 2 n 2 From this, P Q P n ζ P Q + ζ P n ζ P Q + 2 Therefore, ζ P Q 2 ζ Pn Clearing denominators, we have ζq P ζ P n

17 05 Purely periodic continued fractions 09 (2) Assume ot equal to the denominator of any convergent of ζ It must be between two successive ones, say,q k < Q < Q k for k n Since P k Q k Q k P k = ±, there are unique integers a and b such that (P,Q) = a(p k,q k )+b(p k,q k ) Hence, ζq P = a(ζq k P k )+b(ζq k P k ) Note that a and b must have opposite signs, and so doζq k P k andζq k P k It follows thata(ζq k P k ) andb(ζq k P k ) have the same sign From this, ζq P > ζq k P k > ζq k P k > ζ P n Theorem 0 If ζ P Q <, then P is a convergent in the continued fraction 2Q 2 Q expansion of ζ Proof From ζ P Q <, we have Qζ P < 2Q 2 2Q Suppose P is not a convergent of ζ Then Q Q k < Q < Q k for some k, and by Lemma 00, ζq P > ζq k P k Therefore, From this, This contradicts ζ P k Q k = ζq k P k < ζq P < 2QQ k Q k Q k P Q P k < ζ P Q + ζ P k < QQ k Q k P Q P k Q k Q k = PQ k QP k QQ k QQ k 05 Purely periodic continued fractions Letζ be represented by a purely periodic continued fraction: ζ = [q 0,q,,q k ] This means ζ = [q 0,q,,q k,ζ] Let P k Q k and P k Q k be the last two convergents of the finite continued fraction [q 0,q,,q k ] Then, ζ = ζp k +P k ζq k +Q k

18 0 Continued Fractions From this, we see that ζ is a root of the quadratic equation f(x) := Q k x 2 (P k Q k )x P k = 0 Note that (i) f( ) = Q k +(P k Q k ) P k = (P k P k )+(Q k +Q k ) > 0, (ii) f(0) = P k < 0, (iii) f() = (P k Q k ) (P k Q k ) < 0 From these we conclude that ζ > is the only positive root, and the other root ζ = a b d lies between and0 We say that a quadratic irrationality ζ > is reduced if ζ lies between and 0 A purely periodic continued fraction is a reduced quadratic irrationality 2 An eventually periodic continued fraction is a quadratic irrationality Proof Letχ = [p 0,,p h,q,,q n ] If the last two convergents of[p 0,,p h ] are P h Q h and P h Q h, andζ = [q,,q n ], thenχ = ζ P h+p h ζ Q h +Q h is also a quadratic irrationality Lemma 02 If [q 0,q,,q k ] = ζ, then < ζ < 0 and [q k,,q,q 0 ] = ζ Proof From ζ = [q 0,q,,q k ], we have q 0 ζ = [ q 0, ] = ζ From this, q + [q,,q k,ζ] [q,,q k,ζ] = [q 0, [q,,q k,ζ] ζ ], [q 2,,ζ] = [q 0, ], ζ q + [q 0, ] = ζ [ q,q 0, ] = ζ [q 2,,ζ], [q 2,,ζ] Continuing, we obtain [ q k,q k,,q,q 0, ] = ζ ζ Therefore, ζ The positive root must be ζ is the negative root of the quadratic equation x = [q k,q k,,q 0,x]

19 06 Lagrange s theorem Corollary 03 If a+ d b = [q 0,,q k ], then[q k,,q 0 ] = a+ d b 06 Lagrange s theorem A quadratic irrationality can be expressed in the form ζ = a+ d, where a, b, and d b are integers such thatb = d a2 is an integer b Proof It is clear that a quadratic irrationality is one of the form a+ d for integers b a, b and d If d a2 = b for relatively prime integers b q b and q with q >, we replace a and b by qa and qb, and d by q 2 d In this case, ζ = a+ d = qa+ q 2 d, and q 2 d (qa) 2 qb = q d a2 b = b is an integer Theorem 04 The continued fraction expansion of a quadratic irrationality is eventually periodic Proof () Letζ = [q 0,,q n,ζ n ] We have ζ = ζnp n +P n 2 ζ n + 2 Consider the conjugate ζ = ζnp n +P n 2 ζ n + 2 From this, ζ n = ζ 2 P n 2 ζ P n = 2 ζ ζ P n b P n 2 2 Since the sequence Pn converges to ζ, and 2 <, we can choose N large enough so that for n > N, ζ n lies between and 0 In other words, ζ n is reduced for n > N (2) ζ n = an+ d b n for integers a n,b n satisfying b n d a 2 n Proof Clearly,q 0 = [ζ], and ζ = = ζ q 0 = a+ d b q 0 b a q 0 b+ d = b( a+q 0b+ d) d (a q 0 b) 2 = b( a+q 0b+ d) d a 2 +2q 0 ab q 2 0b 2 = a+q 0b+ d b +2q 0 a q 2 0b qb By putting ζ = a + d b d a 2 = b b with a = a+q 0 b, b = b +2q 0 a q 2 0b, we have Here,

20 2 Continued Fractions More generally, ifζ n = an+ d b n with d a 2 n = b n b n, thenζ n+ = a n++ d b n+ with These satisfyd a 2 n+ = b n+ b n+ a n+ = a n +q n b n, b n+ = b n +2q n a n q 2 nb n, b n+ = b n (3) If ζ = a+ d b is reduced, then 0 < a < d and0 < b < 2 d (4) Since ζ n is reduced for n > N, 0 < a n < d and 0 < b n < 2 d There are finitely many pairs of positive integers (a, b) satisfying these conditions We conclude that there are integers h < k satisfying (a h,b h ) = (a k,b k ) If we choose h and k = h+r to be the smallest possible integers for which these hold, then for every integer t 0 and0 s < r, then a h+tr+s = a h+s, b h+tr+s = b h+s In other words,ζ h+tr+s = ζ h+s, andq h+tr+s = q h+s This completes the proof of Langrange s theorem Corollary 05 The continued fraction expansion of a reduced quadratic irrationality is purely periodic Proof It is enough to show that if ζ = [q 0,q,,q r ] is reduced, then indeed, q 0 = q r (The general case follows by induction) Letθ = [q,,q r ] Sinceq 0 + θ is reduced, q 0 + θ > > 0 > q 0 + θ > From this, q 0 = [ θ ] However, θ has continued fraction expansion [q r,,q ] It follows that q r = q 0 07 Continued fraction expansion of d Theorem 06 Let d be a rational number which is not a square The continued fraction expansion ofdis of the form d = [q0,q,q 2,,q 2,q,2q 0 ], whereq 0 = [ d] Proof () Letq 0 = [ d] The number ζ = q 0 + d is reduced (2) The continued fraction expansion of q 0 + d is purely periodic: q 0 + d = [2q 0,q,,q k ]

21 07 Continued fraction expansion of d 3 for positive integers q,, q k (3) The continued fraction expansion of d q0 = [q k,,q,2q 0 ] (4) [ ] d = q 0, d q0 = [q 0,q k,,q,2q 0 ] (5) Also, d = [q 0,q,,q k,2q 0 ], and(q,,q k ) = (q k,,q ) Example 03 Continued fraction expansions of d, d < 50 Those with asterisks have periods of odd lengths 2 = [,2]; 27 = [5,5,0]; 3 = [,,2]; 28 = [5,3,2,3,0]; 5 = [2,4]; 29 = [5,2,,,2,0]; 6 = [2,2,4]; 30 = [5,2,0]; 7 = [2,,,,4]; 3 = [5,,,3,5,3,,,0]; 8 = [2,,4]; 32 = [5,,,,0]; 0 = [3,6]; 33 = [5,,2,,0]; = [3,3,6]; 34 = [5,,4,,0]; 2 = [3,2,6]; 35 = [5,,0]; 3 = [3,,,,,6]; 37 = [6,2]; 4 = [3,,2,,6]; 38 = [6,6,2]; 5 = [3,,6]; 39 = [6,4,2]; 7 = [4,8]; 40 = [6,3,2]; 8 = [4,4,8]; 4 = [6,2,2,2]; 9 = [4,2,,3,,2,8]; 42 = [6,2,2]; 20 = [4,2,8]; 43 = [6,,,3,,5,,3,,,2]; 2 = [4,,,2,,,8]; 44 = [6,,,,2,,,,2]; 22 = [4,,2,4,2,,8]; 45 = [6,,2,2,2,,2]; 23 = [4,,3,,8]; 46 = [6,,3,,,2,6,2,,,3,,2]; 24 = [4,,8]; 47 = [6,,5,,2]; 26 = [5,0]; 48 = [6,,2] 2 Some simple patterns: a2 + = [a,2a]; a2 = [a,,2a 2]; a2 +a = [a,2,2a]; a2 +2 = [a,a,2a]; a2 2 = [a,,a 2,,2a 2] Theorem 07 Let d = [q 0,q,,q k,2q 0 ] If ζ n = [q n,q n+,] = an+ d b n with b n d a 2 n, then P () n+ d d P n + d = a n++ b n (2) P 2 n d Q 2 n = ( ) n b n+ (3) b n = if and only if n is a multiple of the period length of d (4) P 2 n d Q 2 n = if and only ifn+ is a multiple of the period length of d Proof () By induction For n = 0, P 0 + Q 0 d = q0 + d, P + Q =, a 0 + b 0 d = d, and a + b d = d q0 = q 0+ d This means a = q 0 and b 0 = From these, P 0 + d P +Q d = a + d b 0 d q 2 0

22 4 Continued Fractions Now suppose b n (P n + d) = (an+ + d)(p n + d) (2) Therefore, P n+ ++ d = q n+ + P n + d P n + d P n + d b n = q n+ + a n+ + d = q n+ + b n( a n+ + d) d a 2 n+ = q n+ + a n+ + d b n+ = q n+b n+ a n+ + d b n+ = a n+2 + d b n+ P 2 n d Q 2 n P 2 n d Q 2 n = a2 n+ d b 2 n = b n+ b n Note that P 2 dq 2 = = b 0 From this, we have Pn 2 d Q 2 n = ( ) n b n+ for everyn (3) Let m be the period length of d = [q 0,q,,q m ] (with q m = 2q 0 ) Then ζ = q 0 + d = [q,,q m ] is purely periodic, with ζ jm = q 0 + d Corresponding, a jm = q 0 andb jm = Conversely, suppose b n = for some n Since ζ n is purely periodic, it is reduced This means < ζ n < 0 But ζ n = an d b n = a n d Therefore, 0 < d a n <, and a n = [ d] = q 0 and ζ n = q 0 + d Hence, n must be a multiple of m

23 Chapter The Pell Equation The equation x 2 dy 2 = Letd > 0 be a non-square integer Ifxandy are positive integers satisfyingx 2 dy 2 =, then x y of d Proof d x y = x y d = y x+y < d y 2y 2 Therefore, by Theorem 0, x is a convergent of d y is a convergent 2 If Pn is a convergent of d, then P 2 n dq 2 n < +2 d Proof By Theorem, d Pn < Q 2 n Therefore, Pn < d+ 2 < + d Pn dq 2 2 n = P n + d Qn d Pn < (2 d+) = +2 d 3 From P n = q n P n +P n 2 and = q n + 2, we have ( ) ( )( ) Pn P n Pn P = n 2 qn 2 0 If we write M n = ( ) qn for n = 0,,2,, then 0 ( ) ( ) Pn P n Pn P = n 2 M = n 2 ( ) P P = 2 M Q Q 0 M M n = M 0 M M n 2

24 6 The Pell Equation 4 If the period of d is l, then P 2 l d Q2 l = ( )l This is + or according aslis even or odd 5 The fundamental solution(a,b) ofx 2 dy 2 = is(p l,q l orp 2l,Q 2l ) according aslis even or odd ( ) a db 6 = M b a 0 M M l or (M 0 M M l ) 2 according as l is even or odd Theorem Letdbe a nonsquare, positive integer The totality of positive solutions of the Pell equation x 2 dy 2 = form an infinite sequence (x n,y n ) defined recursively by x n+ = ax n +dby n, y n+ = bx n +ay n ; x = a, y = b, where (x,y ) = (a,b) is the fundamental solution (with a, b smallest possible) obtained from the continued fraction expansion d = [q0,q,,q k ], as follows Let P k Q k the (k ) th convergent of d (a) If the length of the period is even, then(a,b) = (P k,q k ) is the smallest positive solution of the Pell equation x 2 dy 2 = (b) If the length of the period is odd, then the smallest positive solution of the equation x 2 dy 2 = is (a,b) = (P 2 k +dq2 k,2p k Q k ) Examples The fundamental solution of the Pell equation x 2 2y 2 = is (3,2) This generates an infinite sequence of nonnegative solutions (x n,y n ) defined by x n+ = 3x n +4y n, y n+ = 2x n +3y n ; x 0 =, y 0 = 0 The beginning terms are n x n y n Fundamental solution (a,b) of x 2 dy 2 = for d < 00:

25 The equation x 2 dy 2 = 7 d a b d a b d a b Pell s equations whose fundamental solutions are very large: d a b The equation x y 2 = arises from the famous Cattle problem of Archimedes, and has smallest positive solution x = , y =

26 8 The Pell Equation 2 The equation x 2 dy 2 = Indeed, if the length of the period of the continued fraction expansion of d is odd, then(p k,q k ) is the smallest positive solution of the equation x 2 dy 2 = Only when this period is odd does this equation have solutions Examples Smallest positive solution(a,b) ofx 2 dy 2 = for the first 24 values ofd: d a b d a b d a b If p (mod 4) is prime, then the equation x 2 py 2 = is solvable Proof Let (a,b) be the fundamental solution of x 2 py 2 = This means a 2 = pb 2 Note that a must be odd, for otherwise a 2 (mod 4), but pb 2 (mod 4), a contradiction Consequently, gcd(a+,a ) = 2, and we have (i) a+ = 2r 2,a = 2ps 2, or (ii) a+ = 2pr 2,a = 2s 2, for some nonnegative integers r ands In (i), we have r 2 ps 2 =, with r < a, a contradiction since (a,b) is the smallest positive solution of x 2 py 2 = It follows that (ii) holds, and we have s 2 pr 2 = 3 The equation x 2 dy 2 = N Let d > 0 be a nonsquare integer If d = [q 0,q,,q k,2q 0 ] with convergents P n, then Pn 2 dq 2 n < 2 d+ If N < d, every positive solution of x 2 dy 2 = N is a convergent of d (i) SupposeN > 0 If (x 0,y 0 ) is a positive solution ofx 2 dy 2 = N, (x 0 y 0 d)(x0 +y 0 d) = N = x0 > y 0 d Therefore, d 0 < x 0 y 0 d = N y 0 (x 0 +y 0 d) < N y 0 (y 0 d+y0 d < 2y 2 0 =, d 2y0 2

27 3 The equation x 2 dy 2 = N 9 and Px 0 y 0 is a convergent of d (ii) Suppose N < 0 We rewrite the equation as y 2 d x 2 = A similar N reasoning as above shows that y 0 x 0 is a convergent of d It follows that x 0 y 0 is a convergent of d Consider the equation x 2 dy 2 = N for an arbitrary integer N We say that a solution (x,y) of the equation is primitive ifgcd(x,y) = If(x 0,y 0 ) is a primitive solution ofx 2 dy 2 = N, then there exists an integer k such that (i) x 0 ky 0 (mod N) and (ii) k 2 d (mod N) Since gcd(x 0,y 0 ) =, gcd(y 0,N) = There exists an integer k such that x 0 ky 0 (mod N) x 2 0 dy 2 0 y 2 0(k 2 d) 0 (mod N) gcd(y 0,N) = = k 2 d 0 (mod N) We say that the primitive solution (x 0,y 0 ) of x 2 dy 2 = N belongs to the integer k Two solutions (x,y ) and (x 2,y 2 ) of x 2 dy 2 = N are in the same class if there is a solution (x 0,y 0 ) such that x +y d = (x0 +y 0 d)(s +t d), x 2 +y 2 d = (x0 +y 0 d)(s2 +t 2 d), for solutions of (s,t ) and (s 2,t 2 ) of s 2 dt 2 = Two solutions ofx 2 dy 2 = N are in the same class if and only if they belong to the same integer 2 Letk be an integer such thatk 2 d (mod N), andn = k2 d The equation N x 2 dy 2 = N has a positive solution belonging tok if and only if the equation t 2 du 2 = N has a solution (not necessarily positive) belonging tok such that ku 0 t 0 > 0 and du 0 kt 0 > 0 If this is the case, (x N N 0,y 0 ) = ( du 0 kt 0, ku 0 t 0 ) N N is a positive solution of x 2 dy 2 = N belonging to k Theorem 2 Letk 2 d (mod N) andn = k2 d The N equationx2 dy 2 = N has a positive solution belonging to ±k if and only if t 2 du 2 = N has a positive solution belong to ±k In this case, ( ) du 0 ±kt 0 (x 0,y 0 ) =, t 0 ±ku 0 N is a positive solution of x 2 dy 2 = N which belongs to ±k, the sign being chosen so that t 0 ±ku 0 0 (mod N ) N

28 20 The Pell Equation Example : Consider the equationx 2 3y 2 = 2 There are four possible classes: k 2 3 (mod )2 for k = ±,±5 For k = ±, N = 2 3 =, we use a 2 positive solution of(8,5) ofx 2 3y 2 =, and obtain (i) for k =, ( 3 5+8, 8+5 ) = (83,23), and (ii) for k =, ( 3 5 8, 8 5 ) = (47,3) For k = ±5, N = 52 3 =, we use the fundamental solution (649,80) of 2 x 2 3y 2 =, and obtain (iii) for k = +5, ( (iv) for k = 5 and ( , ) = (5585,549), and, ) = (905,25) Example 2: Consider x 2 +3y 2 = 5 Here,k 2 3 (mod 5) for k = ±8,±25 () Fork = ±8,N = 82 5 = 3 Using the fundamental solution (a,b) = (649,80) of x 2 3y 2 =, we obtain (i) for k = +8,(x 0,y 0 ) = ( ) , = (7532,2089), (ii) for k = 8,(x 0,y 0 ) = ( ) , = (2852,79) (2) For k = ±25, N = = 2 We make use of the four classes of solutions 5 of the equationx 2 3y 2 = 2 obtained above (i) from(83,23), fork = 25, we obtain ( 3 23±2583, 83±253 ) = (48,4), 2 2 (ii) from (47,3) for k = +25, we obtain (2,3), (iii) no integer solutions from (905,25) and (5585,549) 4 Applications of Pell s equations Example Which triangular numbers are squares? Suppose the k th triangular numbert k = 2 k(k+) is the square ofn n2 = 2 k(k+);4k2 +4k+ = 8n 2 +; (2k+) 2 8n 2 = The smallest positive solution of the Pell equationx 2 8y 2 = being(3,), we have the solutions (k i,n i ) of the equation given by This means 2k i+ + = 3(2k i +)+8n i, n i+ = (2k i +)+3n i, k 0 =, n 0 = k i+ = 3k i +4n i +, n i+ = 2k i +3n i +, k 0 =, n 0 = The beginning values ofk and n are as follows i k i n i Example 2 Find all integersnso that the mean and the standard deviation ofn consecutive integers are both integers

29 4 Applications of Pell s equations 2 If the mean of n consecutive integers is an integer, n must be odd We may therefore assume the numbers to be m, (m ),,, 0,,, m, m The standard deviation of these number is m(m+) For this to be an integer, we must have 3 m(m + ) = k2 for some integer k m 2 = m = 3k 2 ; n 2 = (2m + ) 2 = 2k 2 + The smallest positive solution of the Pell equation n 2 2k 2 = being (7,2), the solutions of this equations are given by (n i,k i ), where The beginning values of n andk are n i+ = 7n i +24k i, k i+ = 2n i +7k i, n 0 =, k 0 = 0 i n i k i Example 3 (Almost isosceles Pythagorean triangles) Find all Pythagorean triangles the lengths of whose two shorter sides differ by Let x and x + be the two shorter sides of a Pythagorean triangle, with hypotenusey Theny 2 = x 2 +(x+) 2 = 2x 2 +2x+ From this,2y 2 = (2x+) 2 + The equation With z = 2x +, this reduces to the Pell equation z 2 2y 2 =, which we know has solutions, with the of this equations are (z n,y n ) given recursively by smallest positive one (,), and the equation z 2 2y 2 = has smallest positive solution (3,2) It follows that the solutions are given recursively by z n+ = 3z n +4y n, y n+ = 2z n +3y n, z 0 =, y 0 = If we write z n = 2x n +, these become x n+ = 3x n +2y n +, y n+ = 4x n +3y n +2, x 0 = 0, y 0 = The beginning values of x n andy n are as follows n x n y n Example 4 Find eleven consecutive positive integers, the sum of whose squares is the square of an integer Answer: = 77 2,

30 22 The Pell Equation = 43 2, = 529 2, = , = , = , 5 Sums of consecutive squares 5 Odd number of consecutive squares Suppose the sum of the squares of 2k + consecutive positive integers is a square If the integers are b,b±,,b±k We require (2k +)b 2 + k(k +)(2k +) = a2 3 for an integer a From this we obtain the equation a 2 (2k +)b 2 = 3 k(k +)(2k +) (E k) Suppose 2k + is a square Show that (E k ) has solution only when k = 6m(m + ǫ) for some integers m >, and ǫ = ± In each case, the number of solutions is finite Number of solutions of (E k ) when2k + is a square 2k Find the unique sequence of 49 (respectively 2) consecutive positive integers whose squares sum to a square Answer: = ; = ; Remark: The two sequences of 69 consecutive squares whose sums are squares are = 62 2 ; = Suppose 2k + is not a square If k + is divisible 9 = 3 2 or by any prime of the form 4k +3 7, then the equation (E k ) has no solution 4 Show that for the following values of k < 50, the equation (E k ) has no solution: k = 6,8,0,3,7,8,20,2,22,26,27,30,32,

31 5 Sums of consecutive squares 23 34,35,37,40,4,42,44,45,46,48, 5 Suppose p = 2k + is a prime If the Legendre symbol ( 3 k(k+) p ) =, then the equation (E k ) has no solution 6 Show that for the following values of k < 50, the equation (E k ) has no solution:,2,3,8,9,4,5,20,2,26,33,39,44 We need only consider (E k ) for the following values of k: 5,7,,6,9,23,25,28,29,3,36,38,43,47,49 7 Check that among these, only fork = 5,,6,23,29 are the equations(e k ) solvable 8 From the data of Example 20, work out 5 sequences of 23 consecutive integers whose squares add up to a square in each case Answer: = 92 2 ; = ; = ; = ; 9 Consider the equation (E 36 ) : a 2 73b 2 = Check that this equation does in fact have solutions (u,v) = (4088,478),(23360,2734) 0 Make use of the fundamental solution of x 2 73y 2 =, namely, (a,b) = (228249, ), to obtain two sequences of solutions of (E 73 ): Answer: (4088, 478),( , ),( , ), (23360, 2734),( , ),( , ), This means, for example, the sum of the squares of the 73 numbers with center 478 (respectively 2734) is equal to the square of 4088 (respectively 23360) 52 Even number of consecutive squares Suppose the sum of the squares of the 2k consecutive numbers is equal toa 2 This means b k +,b k +2,,b,,b+k,b+k, (2a) 2 2k(2b+) 2 = 2k 3 (4k2 ) (E k )

32 24 The Pell Equation Note that the numbers 2k,4k 2 are relatively prime Show that the equation (E k ) has no solution if 2k is a square 2 Suppose 2k is not a square Show that if 2k + is divisible by 9, or by any prime of the form 4k +, then the equation (E k ) has no solution 3 Show that for k 50, the equation (E k ) has no solution for the following values of k: k = 3,4,5,9,,3,5,7,2,23,24,27,29,3,33, 35,38,39,40,4,45,47,49 4 Letk be a prime Show that the equation (E k ) can be written as (2b+) 2 2ky 2 = 4k2 3 By considering Legendre symbols, show that the equation (E k ) has no solution for the following values ofk 50: k = 5,7,7,9,29,3,4,43 5 By using Theorem 053, check that, excluding square values of 2k < 00, the equation (E k ) has solutions only for k =,2,37,44 The case2k = 2 has been dealt with in Example Show that (34, 0), (38, 3), (50, 7) are solutions of (E 2 ) Construct from them three infinite sequences of expressions of the sum of 24 consecutive squares as a square Answer: = 82 2 ; = ; = Show that (85, 2), (2257,26), and (2849, 330) are solutions of(e 37) Construct from them three infinite sequences of expressions of the sum of 74 consecutive squares as a square Answer: = ; = ; = Show that and (242, 4) and (2222,235) are solutions of(e 44) Construct from them two infinite sequences of expressions of the sum of 88 consecutive squares as a square Answer: = ;

33 5 Sums of consecutive squares = Remark: The equation (E 26) : x 2 52y 2 = does indeed have two infinite sequences of solutions generated by the particular solutions (338, 36), (2002,276), and the fundamental solution (649,90) of the Pell equationx 2 52y 2 = None of these, however, leads to a solution of (E 26) since all the y s are even

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

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

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

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

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

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

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

NOTES ON SIMPLE NUMBER THEORY

NOTES ON SIMPLE NUMBER THEORY NOTES ON SIMPLE NUMBER THEORY DAMIEN PITMAN 1. Definitions & Theorems Definition: We say d divides m iff d is positive integer and m is an integer and there is an integer q such that m = dq. In this case,

More information

M381 Number Theory 2004 Page 1

M381 Number Theory 2004 Page 1 M81 Number Theory 2004 Page 1 [[ Comments are written like this. Please send me (dave@wildd.freeserve.co.uk) details of any errors you find or suggestions for improvements. ]] Question 1 20 = 2 * 10 +

More information

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

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

Pell s equation. Michel Waldschmidt

Pell s equation. Michel Waldschmidt 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

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

On Representations of integers by the quadratic form x2 Dy2

On Representations of integers by the quadratic form x2 Dy2 Rochester Institute of Technology RIT Scholar Works Theses Thesis/Dissertation Collections 5-4-2012 On Representations of integers by the quadratic form x2 Dy2 Christopher Thomas Follow this and additional

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

MAS 6217 (Fall 2017) Number Theory and Cryptography (Yiu) Class Notes, October 10. Construction of Pythagorean triangles By a Pythagorean triangle we

MAS 6217 (Fall 2017) Number Theory and Cryptography (Yiu) Class Notes, October 10. Construction of Pythagorean triangles By a Pythagorean triangle we MAS 617 (Fall 017) Number Theory and Cryptography (Yiu) Class Notes, October 10. Construction of Pythagorean triangles By a Pythagorean triangle we mean a right triangle whose side lengths are integers.

More information

Wilson s Theorem and Fermat s Little Theorem

Wilson s Theorem and Fermat s Little Theorem Wilson s Theorem and Fermat s Little Theorem Wilson stheorem THEOREM 1 (Wilson s Theorem): (p 1)! 1 (mod p) if and only if p is prime. EXAMPLE: We have (2 1)!+1 = 2 (3 1)!+1 = 3 (4 1)!+1 = 7 (5 1)!+1 =

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

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

Chapter 3 Basic Number Theory

Chapter 3 Basic Number Theory Chapter 3 Basic Number Theory What is Number Theory? Well... What is Number Theory? Well... Number Theory The study of the natural numbers (Z + ), especially the relationship between different sorts of

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

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

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

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

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

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

Contents. 4 Arithmetic and Unique Factorization in Integral Domains. 4.1 Euclidean Domains and Principal Ideal Domains

Contents. 4 Arithmetic and Unique Factorization in Integral Domains. 4.1 Euclidean Domains and Principal Ideal Domains Ring Theory (part 4): Arithmetic and Unique Factorization in Integral Domains (by Evan Dummit, 018, v. 1.00) Contents 4 Arithmetic and Unique Factorization in Integral Domains 1 4.1 Euclidean Domains and

More information

Beautiful Mathematics

Beautiful Mathematics Beautiful Mathematics 1. Principle of Mathematical Induction The set of natural numbers is the set of positive integers {1, 2, 3,... } and is denoted by N. The Principle of Mathematical Induction is a

More information

PRACTICE PROBLEMS: SET 1

PRACTICE PROBLEMS: SET 1 PRACTICE PROBLEMS: SET MATH 437/537: PROF. DRAGOS GHIOCA. Problems Problem. Let a, b N. Show that if gcd(a, b) = lcm[a, b], then a = b. Problem. Let n, k N with n. Prove that (n ) (n k ) if and only if

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 theory. Myrto Arapinis School of Informatics University of Edinburgh. October 9, /29

Number theory. Myrto Arapinis School of Informatics University of Edinburgh. October 9, /29 Number theory Myrto Arapinis School of Informatics University of Edinburgh October 9, 2014 1/29 Division Definition If a and b are integers with a 6= 0, then a divides b if there exists an integer c such

More information

Chakravala - a modern Indian method. B.Sury

Chakravala - a modern Indian method. B.Sury Chakravala - a modern Indian method BSury Indian Statistical Institute Bangalore, India sury@isibangacin IISER Pune, India Lecture on October 18, 2010 1 Weil Unveiled What would have been Fermat s astonishment

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

MAS 6217 Number Theory and Cryptography (Yiu) Fall 2017 Exercise B (Solution)

MAS 6217 Number Theory and Cryptography (Yiu) Fall 2017 Exercise B (Solution) MAS 6217 Number Theory and Cryptography (Yiu) Fall 2017 Exercise B (Solution) Solution to Problem B1. Let(a n ) be a sequence of numbers defined recursively by a n+1 = a 2 n a n +1, a 1 = 2. Show that

More information

History of Mathematics

History of Mathematics History of Mathematics Paul Yiu Department of Mathematics Florida Atlantic University Summer 2011 6A: Fermat: Beginning of modern number theory (2) Fermat s little theorem Given a prime p, and any geometric

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

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

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

Number theory lectures

Number theory lectures Number theory lectures By Dr. Mohammed M. AL-Ashker Associated professor Mathematics Department E.mail:mashker @ mail.iugaza.edu Islamic University of Gaza P.O.Box 108, Gaza, Palestine 1 Contents 1 Divisibility

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

1. (a) q = 4, r = 1. (b) q = 0, r = 0. (c) q = 5, r = (a) q = 9, r = 3. (b) q = 15, r = 17. (c) q = 117, r = 11.

1. (a) q = 4, r = 1. (b) q = 0, r = 0. (c) q = 5, r = (a) q = 9, r = 3. (b) q = 15, r = 17. (c) q = 117, r = 11. 000 Chapter 1 Arithmetic in 1.1 The Division Algorithm Revisited 1. (a) q = 4, r = 1. (b) q = 0, r = 0. (c) q = 5, r = 3. 2. (a) q = 9, r = 3. (b) q = 15, r = 17. (c) q = 117, r = 11. 3. (a) q = 6, r =

More information

Proofs. Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm. Reading (Epp s textbook)

Proofs. Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm. Reading (Epp s textbook) Proofs Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm Reading (Epp s textbook) 4.3 4.8 1 Divisibility The notation d n is read d divides n. Symbolically,

More information

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska LECTURE 12 CHAPTER 4 NUMBER THEORY PART1: Divisibility PART 2: Primes PART 1: DIVISIBILITY Basic Definitions Definition Given m,n Z, we say

More information

LECTURE NOTES IN CRYPTOGRAPHY

LECTURE NOTES IN CRYPTOGRAPHY 1 LECTURE NOTES IN CRYPTOGRAPHY Thomas Johansson 2005/2006 c Thomas Johansson 2006 2 Chapter 1 Abstract algebra and Number theory Before we start the treatment of cryptography we need to review some basic

More information

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element. The first exam will be on Monday, June 8, 202. The syllabus will be sections. and.2 in Lax, and the number theory handout found on the class web site, plus the handout on the method of successive squaring

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

Instructor s suggestions for use of Number Theory notes

Instructor s suggestions for use of Number Theory notes Number Theory Instructor s suggestions for use of Number Theory notes Goal. Our goal is to inspire students to be actively engaged in mathematical thought. We want them to discover ideas on their own,

More information

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93. Exercises Exercises 1. Determine whether each of these integers is prime. a) 21 b) 29 c) 71 d) 97 e) 111 f) 143 2. Determine whether each of these integers is prime. a) 19 b) 27 c) 93 d) 101 e) 107 f)

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

Math 5330 Spring Notes Congruences

Math 5330 Spring Notes Congruences Math 5330 Spring 2018 Notes Congruences One of the fundamental tools of number theory is the congruence. This idea will be critical to most of what we do the rest of the term. This set of notes partially

More information

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. Math 152, Problem Set 2 solutions (2018-01-24) All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. 1. Let us look at the following equation: x 5 1

More information

Introduction to Abstract Mathematics

Introduction to Abstract Mathematics Introduction to Abstract Mathematics Notation: Z + or Z >0 denotes the set {1, 2, 3,...} of positive integers, Z 0 is the set {0, 1, 2,...} of nonnegative integers, Z is the set {..., 1, 0, 1, 2,...} of

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

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

Math 314 Course Notes: Brief description

Math 314 Course Notes: Brief description Brief description These are notes for Math 34, an introductory course in elementary number theory Students are advised to go through all sections in detail and attempt all problems These notes will be

More information

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel Lecture Notes on DISCRETE MATHEMATICS Eusebius Doedel c Eusebius J. Doedel, 009 Contents Logic. Introduction............................................................................... Basic logical

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

SOME AMAZING PROPERTIES OF THE FUNCTION f(x) = x 2 * David M. Goldschmidt University of California, Berkeley U.S.A.

SOME AMAZING PROPERTIES OF THE FUNCTION f(x) = x 2 * David M. Goldschmidt University of California, Berkeley U.S.A. SOME AMAZING PROPERTIES OF THE FUNCTION f(x) = x 2 * David M. Goldschmidt University of California, Berkeley U.S.A. 1. Introduction Today we are going to have a look at one of the simplest functions in

More information

Selected Chapters from Number Theory and Algebra

Selected Chapters from Number Theory and Algebra Selected Chapters from Number Theory and Algebra A project under construction Franz Rothe Department of Mathematics University of North Carolina at Charlotte Charlotte, NC 83 frothe@uncc.edu December 8,

More information

Homework 7 solutions M328K by Mark Lindberg/Marie-Amelie Lawn

Homework 7 solutions M328K by Mark Lindberg/Marie-Amelie Lawn Homework 7 solutions M328K by Mark Lindberg/Marie-Amelie Lawn Problem 1: 4.4 # 2:x 3 + 8x 2 x 1 0 (mod 1331). a) x 3 + 8x 2 x 1 0 (mod 11). This does not break down, so trial and error gives: x = 0 : f(0)

More information

Just like the ring of Gaussian integers, the ring of Eisenstein integers is a Unique Factorization Domain.

Just like the ring of Gaussian integers, the ring of Eisenstein integers is a Unique Factorization Domain. Fermat s Infinite Descent PMATH 340 Assignment 6 (Due Monday April 3rd at noon). (0 marks) Use Femtat s method of infinite descent to prove that the Diophantine equation x 3 + y 3 = 4z 3 has no solutions

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

Basic Algebra. Final Version, August, 2006 For Publication by Birkhäuser Boston Along with a Companion Volume Advanced Algebra In the Series

Basic Algebra. Final Version, August, 2006 For Publication by Birkhäuser Boston Along with a Companion Volume Advanced Algebra In the Series Basic Algebra Final Version, August, 2006 For Publication by Birkhäuser Boston Along with a Companion Volume Advanced Algebra In the Series Cornerstones Selected Pages from Chapter I: pp. 1 15 Anthony

More information

4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus...

4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus... PREFACE These notes have been prepared by Dr Mike Canfell (with minor changes and extensions by Dr Gerd Schmalz) for use by the external students in the unit PMTH 338 Number Theory. This booklet covers

More information

Math 480/580 Number Theory Notes. Richard Blecksmith

Math 480/580 Number Theory Notes. Richard Blecksmith Math 480/580 Number Theory Notes Richard Blecksmith Contents Chapter 1. Introduction 5 1. Beginning Exercises 5 2. Counting the primes 6 Chapter 2. Math 420 Number Theory Review 9 1. Divisors 9 2. Divisibility

More information

1. (a) q = 4, r = 1. (b) q = 0, r = 0. (c) q = 5, r = (a) q = 9, r = 3. (b) q = 15, r = 17. (c) q = 117, r = 11.

1. (a) q = 4, r = 1. (b) q = 0, r = 0. (c) q = 5, r = (a) q = 9, r = 3. (b) q = 15, r = 17. (c) q = 117, r = 11. 000 Chapter 1 Arithmetic in 1.1 The Division Algorithm Revisited 1. (a) q = 4, r = 1. (b) q = 0, r = 0. (c) q = 5, r = 3. 2. (a) q = 9, r = 3. (b) q = 15, r = 17. (c) q = 117, r = 11. 3. (a) q = 6, r =

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

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

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

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

Favorite Topics from Complex Arithmetic, Analysis and Related Algebra

Favorite Topics from Complex Arithmetic, Analysis and Related Algebra Favorite Topics from Complex Arithmetic, Analysis and Related Algebra construction at 09FALL/complex.tex Franz Rothe Department of Mathematics University of North Carolina at Charlotte Charlotte, NC 3

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

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

2.2 Inverses and GCDs

2.2 Inverses and GCDs 34 CHAPTER 2. CRYPTOGRAPHY AND NUMBER THEORY 2.2 Inverses and GCDs 2.2.1 Inverses mod p In the last section we explored the multiplication in Z n. We saw in the special case with n =12 and a = 4 that if

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

Notes on Primitive Roots Dan Klain

Notes on Primitive Roots Dan Klain Notes on Primitive Roots Dan Klain last updated March 22, 2013 Comments and corrections are welcome These supplementary notes summarize the presentation on primitive roots given in class, which differed

More information

Math 104B: Number Theory II (Winter 2012)

Math 104B: Number Theory II (Winter 2012) Math 104B: Number Theory II (Winter 01) Alina Bucur Contents 1 Review 11 Prime numbers 1 Euclidean algorithm 13 Multilicative functions 14 Linear diohantine equations 3 15 Congruences 3 Primes as sums

More information

Number Theory. Henry Liu, 6 July 2007

Number Theory. Henry Liu, 6 July 2007 Number Theory Henry Liu, 6 July 007 1. Introduction In one sentence, number theory is the area of mathematics which studies the properties of integers. Some of the most studied subareas are the theories

More information

4 Powers of an Element; Cyclic Groups

4 Powers of an Element; Cyclic Groups 4 Powers of an Element; Cyclic Groups Notation When considering an abstract group (G, ), we will often simplify notation as follows x y will be expressed as xy (x y) z will be expressed as xyz x (y z)

More information

A Guide to Arithmetic

A Guide to Arithmetic A Guide to Arithmetic Robin Chapman August 5, 1994 These notes give a very brief resumé of my number theory course. Proofs and examples are omitted. Any suggestions for improvements will be gratefully

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

Chapter 1. Greatest common divisor. 1.1 The division theorem. In the beginning, there are the natural numbers 0, 1, 2, 3, 4,...,

Chapter 1. Greatest common divisor. 1.1 The division theorem. In the beginning, there are the natural numbers 0, 1, 2, 3, 4,..., Chapter 1 Greatest common divisor 1.1 The division theorem In the beginning, there are the natural numbers 0, 1, 2, 3, 4,..., which constitute the set N. Addition and multiplication are binary operations

More information

Math 109 HW 9 Solutions

Math 109 HW 9 Solutions Math 109 HW 9 Solutions Problems IV 18. Solve the linear diophantine equation 6m + 10n + 15p = 1 Solution: Let y = 10n + 15p. Since (10, 15) is 5, we must have that y = 5x for some integer x, and (as we

More information

REVIEW Chapter 1 The Real Number System

REVIEW Chapter 1 The Real Number System REVIEW Chapter The Real Number System In class work: Complete all statements. Solve all exercises. (Section.4) A set is a collection of objects (elements). The Set of Natural Numbers N N = {,,, 4, 5, }

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

Number Theory and Graph Theory

Number Theory and Graph Theory 1 Number Theory and Graph Theory Chapter 5 Additional Topics By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com 2 Module-2: Pythagorean

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

Elementary Number Theory MARUCO. Summer, 2018

Elementary Number Theory MARUCO. Summer, 2018 Elementary Number Theory MARUCO Summer, 2018 Problem Set #0 axiom, theorem, proof, Z, N. Axioms Make a list of axioms for the integers. Does your list adequately describe them? Can you make this list as

More information

0 Sets and Induction. Sets

0 Sets and Induction. Sets 0 Sets and Induction Sets A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a A to denote that a is an element of the set

More information

CSC 474 Network Security. Outline. GCD and Euclid s Algorithm. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms

CSC 474 Network Security. Outline. GCD and Euclid s Algorithm. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms Computer Science CSC 474 Network Security Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography CSC 474 Dr. Peng Ning 1 Outline GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation

More information

Our Number Theory Textbook

Our Number Theory Textbook Our Number Theory Textbook Math 311: Fall 2015 December, 2015 Contents 1 Divisibility 2 M. Gonsalves, L. Lewis.......................... 2 1.1 Introduction.............................. 2 1.2 Glossary

More information

MAS 6217 (Fall 2017) Number Theory and Cryptography (Yiu) Class Notes, August 24.

MAS 6217 (Fall 2017) Number Theory and Cryptography (Yiu) Class Notes, August 24. MAS 6217 (Fall 2017) Number Theory and Cryptography (Yiu) Class Notes, August 24. Linear Diophantine equations Theorem 1. Let a, b, c be integers, a and b nonzero, and d := gcd(a, b). Consider the linear

More information

2. THE EUCLIDEAN ALGORITHM More ring essentials

2. THE EUCLIDEAN ALGORITHM More ring essentials 2. THE EUCLIDEAN ALGORITHM More ring essentials In this chapter: rings R commutative with 1. An element b R divides a R, or b is a divisor of a, or a is divisible by b, or a is a multiple of b, if there

More information

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes. INTEGERS PETER MAYR (MATH 2001, CU BOULDER) In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes. 1. Divisibility Definition. Let a, b

More information

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3 CS 70 Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes wish to work over a smaller

More information

RMT 2013 Power Round Solutions February 2, 2013

RMT 2013 Power Round Solutions February 2, 2013 RMT 013 Power Round Solutions February, 013 1. (a) (i) {0, 5, 7, 10, 11, 1, 14} {n N 0 : n 15}. (ii) Yes, 5, 7, 11, 16 can be generated by a set of fewer than 4 elements. Specifically, it is generated

More information

Outline. Some Review: Divisors. Common Divisors. Primes and Factors. b divides a (or b is a divisor of a) if a = mb for some m

Outline. Some Review: Divisors. Common Divisors. Primes and Factors. b divides a (or b is a divisor of a) if a = mb for some m Outline GCD and Euclid s Algorithm AIT 682: Network and Systems Security Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography Modulo Arithmetic Modular Exponentiation Discrete Logarithms

More information

Outline. AIT 682: Network and Systems Security. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms

Outline. AIT 682: Network and Systems Security. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms AIT 682: Network and Systems Security Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography Instructor: Dr. Kun Sun Outline GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation

More information

Congruence of Integers

Congruence of Integers Congruence of Integers November 14, 2013 Week 11-12 1 Congruence of Integers Definition 1. Let m be a positive integer. For integers a and b, if m divides b a, we say that a is congruent to b modulo m,

More information

Number Theory Course notes for MA 341, Spring 2018

Number Theory Course notes for MA 341, Spring 2018 Number Theory Course notes for MA 341, Spring 2018 Jared Weinstein May 2, 2018 Contents 1 Basic properties of the integers 3 1.1 Definitions: Z and Q....................... 3 1.2 The well-ordering principle...................

More information