Number Theory and Cryptography

Size: px
Start display at page:

Download "Number Theory and Cryptography"

Transcription

1 Number Theory and Crytograhy Paul Yiu Deartment of Mathematics Florida Atlantic University Fall 017 Chaters 9 14 October 3, 017

2 ii

3 Contents 5 Quadratic Residues Quadratic residues The Legendre symbol ( 5.3 The Legendre symbol 1 ) The square roots of 1 (mod ) Gauss lemma....(. ) The Legendre symbol The law of quadratic recirocity Smallest quadratic nonresidue modulo Square roots modulo Square roots modulo rime 1 (mod 8) Square roots modulo for a generic rime The Jacobi symbol Primality Tests and Factorization of Integers Primality of Mersenne numbers Germain rimes Probabilistic rimality tests Pseudorimes Eulerb-seudorimes Strongb-seudorimes Carmichael numbers Quadratic sieve and factor base Fermat s factorization Factor base Pollard s methods Theρ-method The( 1)-method Pythagorean Triangles Construction of Pythagorean triangles Fermat s construction of rimitive Pythagorean triangles with consecutive legs

4 iv CONTENTS 7.3 Fermat Last Theorem for n = Two ternary trees of rational numbers Genealogy of Pythagorean triangles Homogeneous Quadratic Equations in 3 Variables Pythagorean triangles revisited Rational oints on a conic Integer triangles with a 60 angle Integer triangles with a 10 angle Heron triangles The Heron formula Construction of Heron triangles Heron triangles with sides in arithmetic rogression Heron triangles with integer inradii The equation P k,a +P k,b = P k,c for olynomial numbers Double ruling of S Primitive Pythagorean trile associated with ak-gonal trile Triangular triles Pentagonal triles

5 38 CONTENTS

6 Chater 5 Quadratic Residues 5.1 Quadratic residues Let n > 1 be a given ositive integer, and gcd(a,n) = 1. We say that a Z n is a quadratic residue modnif the congruencex a (mod n) is solvable. Otherwise, a is called a quadratic nonresidue mod n. 1. If a andbare quadratic residues mod n, so is their roduct ab.. If a is a quadratic residue, and b a quadratic nonresidue mod n, then ab is a quadratic nonresidue mod n. 3. The roduct of two quadratic nonresidues mod n is not necessarily a quadratic residue mod n. For examle, in Z 1 = {1,5,7,11}, only 1 is a quadratic residue; 5, 7, and are all quadratic nonresidues. Proosition 5.1. Let be an odd rime, and a. The quadratic congruence ax +bx+c 0 (mod ) is solvable if and only if(ax+b) b 4ac (mod ) is solvable. Theorem 5.. Let be an odd rime. Exactly one half of the elements of Z are quadratic residues. Proof. Each quadratic residue modulois congruent to one of the following 1( 1) residues. ( ) 1 1,,...,k,...,. We show that these residue classes are all distinct. For 1 h < k 1, h k (mod ) if and only if(k h)(h+k) is divisible by, this is imossible since each of k h andh+k is smaller than. Corollary 5.3. If is an odd rime, the roduct of two quadratic nonresidues is a quadratic residue.

7 40 Quadratic Residues In the table below we list, for rimes < 50, the quadratic residues and their square roots. It is understood that the square roots come in airs. For examle, the entry (,7) for the rime 47 should be interreted as saying that the two solutions of the congruence x (mod 47) are x ±7 (mod 47). Also, for rimes of the form = 4n+1, since 1 is a quadratic residue modulo, we only list quadratic residues smaller than. Those greater than can be found with the hel of the square roots of 1. Quadratic residues mod and their square roots 3 (1, 1) 5 ( 1, ) (1, 1) 7 (1, 1) (, 3) (4, ) 11 (1, 1) (3, 5) (4, ) (5, 4) (9, 3) 13 ( 1, 5) (1, 1) (3, 4) (4, ) 17 ( 1, 4) (1, 1) (, 6) (4, ) (8, 5) 19 (1, 1) (4, ) (5, 9) (6, 5) (7, 8) (9, 3) (11, 7) (16, 4) (17, 6) 3 (1, 1) (, 5) (3, 7) (4, ) (6, 11) (8, 10) (9, 3) (1, 9) (13, 6) (16, 4) (18, 8) 9 ( 1, 1) (1, 1) (4, ) (5, 11) (6, 8) (7, 6) (9, 3) (13, 10) 31 (1, 1) (, 8) (4, ) (5, 6) (7, 10) (8, 15) (9, 3) (10, 14) (14, 13) (16, 4) (18, 7) (19, 9) (0, 1) (5, 5) (8, 11) 37 ( 1, 6) (1, 1) (3, 15) (4, ) (7, 9) (9, 3) (10, 11) (11, 14) (1, 7) (16, 4) 41 ( 1, 9) (1, 1) (, 17) (4, ) (5, 13) (8, 7) (9, 3) (10, 16) (16, 4) (18, 10) (0, 15) 43 (1, 1) (4, ) (6, 7) (9, 3) (10, 15) (11, 1) (13, 0) (14, 10) (15, 1) (16, 4) (17, 19) (1, 8) (3, 18) (4, 14) (5, 5) (31, 17) (35, 11) (36, 6) (38, 9) (40, 13) (41, 16) 47 (1, 1) (, 7) (3, 1) (4, ) (6, 10) (7, 17) (8, 14) (9, 3) (1, 3) (14, ) (16, 4) (17, 8) (18, 1) (1, 16) (4, 0) (5, 5) (7, 11) (8, 13) (3, 19) (34, 9) (36, 6) (37, 15) (4, 18) 5. The Legendre symbol Letbe an odd rime. For an integer a, we define the Legendre symbol ( ) { a +1, ifais a quadratic residue mod, := 1, otherwise. Lemma 5.4. ( ) ab = ( a )( b ). Proof. This is equivalent to saying that modulo, the roduct of two quadratic residues (resectively nonresidues) is a quadratic residue, and the roduct of a quadratic residue and a quadratic nonresidue is a quadratic nonresidue.

8 ) 5.3 The Legendre symbol( 1 41 Theorem 5.5 (Euler). Letbe an odd rime. For each integeranot divisible by, ( ) a a 1 ( 1) mod. Proof. Suoseais a quadratic nonresidue mod. The modresidues1,,..., 1 are artitioned into airs satisfying xy = a. In this case, ( 1)! a 1 ( 1) (mod ). On the other hand, if a is a quadratic residue, with a k ( k) (mod ), aart from 0,±k, the remaining 3 elements of Z can be artitioned into airs satisfying xy = a. ( 1)! k( k)a 1 ( 3) a 1 ( 1) (mod ). Summarizing, we obtain ( 1)! ( ) a a 1 ( 1) (mod ). Note that by utting a = 1, we obtain Wilson s ( ) theorem: ( 1)! 1 (mod ). By comarison, we obtain a formula for : a ( ) a a 1 ( 1) (mod ). ( 5.3 The Legendre symbol ) 1 Theorem 5.6. Let be an odd rime. 1 is a quadratic residue modulo if and only if 1 (mod 4). Proof. ( ) If x 1 (mod ), then ( 1) 1 x 1 1 (mod ) by Fermat s little theorem. This means that 1 is even, and 1 (mod 4). ( ) If 1 (mod 4), the integer 1 is even. By Wilson s theorem, (( 1 )!) = j = 1 i=1 j ( j) 1 i=1 j ( j) = ( 1)! 1 (mod ). The solutions ofx 1 (mod ) are therefore x ±( 1 )!. Theorem 5.7. There are infinitely many rimes of the form4n+1. 1 i=1

9 4 Quadratic Residues Proof. Suose there are only finitely many rimes 1,,..., r of the form4n+1. Consider the roduct P = ( 1 r ) +1. Note that P 1 (mod 4). Since P is greater than each of 1,,..., r, it cannot be rime, and so must have a rime factor different from 1,,..., r. But then modulo, 1 is a square. By Theorem 5.6, must be of the form 4n + 1, a contradiction The square roots of 1 (mod ) Here are the square roots of 1 for the first0 rimes of the form 4k +1: ± 13 ±5 17 ±4 9 ±1 37 ±6 41 ±9 53 ±3 61 ±11 73 ±7 89 ±34 97 ± 101 ± ± ± ± ± ±8 173 ± ± ±81 In general, the square roots of 1 (mod ) can be found as n k for a quadratic nonresidue n modulo. Examle 5.1. Let = 7933 = Since 5 (mod 8), n = is a quadratic nonresidue. We comute 1983 by successive squaring and multilication making use of the binary exansion 1983 = ( ). Since this binary exansion has only one digit0at osition 6, = 11. From these, modulo 7933, k a k a k (mod 7933) 1983 = ( 1047) ( 3868) 950. The square roots of 1 (mod 7933) are ±950.

10 5.4 Gauss lemma Gauss lemma Theorem 5.8 ( (Gauss ) Lemma). Letbe an odd rime, andaan integer not divisible by. Then = ( 1) µ whereµis the number of residues among a falling in the range < x <. a, a, 3a,..., 1 a Proof. Every residue modulo has a unique reresentative with least absolute value, namely, the one in the range 1 x 1. The residues described above are recisely those whose reresentatives are negative. Now, among the reresentatives of the residues of a,a,..., 1 a, say, there are λ ositive ones, andµnegative ones r 1,r,...,r λ, s 1, s,..., s µ. Here,λ+µ = 1, and0 < r i,s j <. Note that no two of the r s are equal; similarly for the s s. Suose that r i = s j for some indices i and j. This means ha r i mod ; ka s j mod for some h, k in the range 0 < h, k < 1 ( 1). Note that (h + k)a 0 mod. But this is a contradiction since h+k < 1 and does not divide a. It follows that r 1,r,...,r λ,s 1,s,...,s µ are a ermutation of 1,,..., 1 ( 1). From this a a 1 a = ( 1)µ 1 1, ( ) anda 1 ( 1) = ( 1) µ. By Theorem 5.5, = ( 1) µ. ( 5.5 The Legendre symbol Theorem 5.9. Letbe an odd rime. ( ) = ( 1) 1 4 (+1) = ( 1) 1 8 ( 1). Equivalently, ) a ( ) = { +1 if ±1 mod 8, 1 if ±3 mod 8.

11 44 Quadratic Residues Proof. We need to see how many terms in the sequence 1,, 3,..., 1 are in the range < x <. If = 4k +1, these are the numbers k +,...,4k, and there are k of them. On the other hand, if = 4k + 3, these are the numbers k +,...,4k +, and there arek+1 of them. In each case, the number of terms is 1(+1). 4 Here are the square roots offor the first0 rimes = 8k ±1: The law of quadratic recirocity Theorem 5.10 (Law of quadratic recirocity). Letand q be distinct odd rimes. ( )( ) q = ( 1) 1 q 1. q Equivalently, when at least one of, q 1 mod 4, is a quadratic residue mod q if and only if q is a quadratic residue mod. 1 Proof. (1) Letabe an integer not divisible by. Suose, as in the roof of Gauss Lemma above, of the residues a, a,... 1 a, the ositive least absolute value reresentatives are r 1, r,..., r λ, and the negative ones are s 1, s,..., s µ. The numbers a,a,..., 1 a are a ermutation of hi a +r i, i = 1,,...,λ, and kj a +( s j ), j = 1,,...,µ, where h 1,..., h λ, k 1,..., k µ are a ermutation of 1,,..., 1. Considering the sum of these numbers, we have a 1 ( 1) m=1 m = 1 ( 1) m=1 ma + λ r i + i=1 µ ( s j ) 1 For q 3 mod 4,is a quadratic residue mod q if and only if q is a quadratic nonresidue mod. j=1

12 5.6 The law of quadratic recirocity 45 = = 1 ( 1) m=1 1 ( 1) m=1 In articular, if a is odd, then ma + ma + λ r i + i=1 1 ( 1) m=1 µ s j + j=1 µ ( s j ) j=1 m+µ µ s j. j=1 µ 1 ( 1) m=1 ma mod, and by Gauss lemma, ( ) a = ( 1) 1 ( 1) m=1 ma. () Therefore, for distinct odd rimes andq, we have ( ) q = ( 1) 1 ( 1) m=1 mq, and ( ) = ( 1) 1 (q 1) n=1 n q. q q n 1 1 m (3) In the diagram above, we consider the lattice oints (m,n) with 1 m 1 and 1 n q 1 1. There are altogether q 1 such oints forming a rectangle. These oints are searated by the line L of sloe q through the oint (0,0). For each m = 1,,..., 1, the number of oints in the vertical line through (m,0) underlis mq. Therefore, the total number of oints underl is 1 ( 1) m=1 mq.

13 46 Quadratic Residues Similarly, the total number of oints on the left side of L is 1 (q 1) n n=1. From q these, we have It follows that 1 ( 1) m=1 mq + 1 (q 1) n=1 n = 1 q 1 q. ( )( ) q = ( 1) 1 q 1. q The law of quadratic recirocity can be recast into the following form: ( ) ( ) q, if q 3 mod 4, = ( ) q +, otherwise. q Examle 5.. (a) 59 is a quadratic residue modulo 131: ( ) ( ) ( ) ( ) ( ) = = = = ( ) ( ) 13 1 = = = ( 1) = The square roots are ±37. ( (b)34 is a quadratic nonresidue modulo 97: 34 ( 97) = )( 17 ( 97 97). Now, 97) = +1 by Theorem 5.9, and ( ) ( ) ( ) ( )( ) ( ) = = = = = Therefore, ( 34 97) = (+1)( 1) = 1. ( ) 17 = 3 ( ) = 1. 3 Examle 5.3. For which rimes > 3 is 3 a quadratic residue? A rime > 3 is of the form6k+ε forε = ±1. For such a rime, ( ( 3) = ε 3) = ε. By the law of quadratic recirocity, ( ) 3 ( = ( 1) = ( 1) 3) k ( 1) ε 1 ε. ( ) Since ( 1) ε 1 3 ε = 1 for ε = ±1, we have = ( 1) k. This means that 3 is a quadratic residue mod if and only if k is even, i.e., = 1m±1.

14 5.7 Smallest quadratic nonresidue modulo 47 Exercise Comlete the following table for the rimes admitting a as a quadratic residue. ( ) a = +1 if and only if a 1 1 (mod 4) ±1 (mod 8) Smallest quadratic nonresidue modulo Lemma Let be an odd rime. The smallest quadratic nonresidue modulo is a rime. Proof. Let b be the smallest quadratic nonresidue. If b is not rime, we write b = cc, where 1 < c,c < b. Exactly one of c, c must be a quadratic nonresidue. This contradicts the minimality ofb. Letbe a rime. We want to determine the smallest quadratic nonresidue modulo, denoted by b(). Clearly, if 3 or 5 mod 8, then b() =. Recall that 3 is a quadratic residue mod if and only if is of the form 1n ± 1. It follows that b() = 3 for 5,7 (mod 1). Aart from the rime 3, modulo 4, every odd rime has residue 1, 5, 7, 11, 13, 17, 19, 3. The smallest quadratic nonresidue mod in these cases are given by (mod 4) b()? 3 3?

15 48 Quadratic Residues Smallest quadratic nonresidues for the first100 rimes of the form 4k ±1. b() b() b() b() b() b() Square roots modulo Square roots modulo rime 1 (mod 8) ( Proosition 5.1. Letbe a rime of the form4k+3. If roots of a (mod ) are ±a 1 4 (+1). Proof. ( a 1 4 (+1) ) a 1 (+1) = a 1 ( 1) a = ( Proosition Letbe a rime of the form8k+5. If roots of a (mod ) are (a)±a 1 8 (+3) if a 1 4 ( 1) 1 (mod ), (b) ± 1 4 ( 1) a 1 8 (+3) ifa 1 4 ( 1) 1 (mod ). Proof. Note that ( Since a a ) = 1, then the square ( ) a a = a (mod ). ( a 1 8 (+3) ) a 1 4 (+3) = a 1 4 ( 1) a (mod ). ) = a 1 ( 1) 1 (mod ), we have a 1 4 ( 1) ±1 (mod ). a ) = 1, then the square

16 5.8 Square roots modulo 49 If a 1 4 ( 1) 1 (mod ), then this gives a 1 8 (+3) as a square root ofa (mod ). If a 1 4 ( 1) 1 (mod ), then we have ( ) ( ) a a 1 y ( ) ( ) 8 (+3) a 1 8 (+3) y 1 4 ( 1) a 1 8 (+3) for any quadratic nonresidue y (mod ). Since 5 (mod 8), we may simly take y =. Examle 5.4. (a) Let = 3. Clearly is a quadratic residue mod 3. The square roots of mod 3 are ± 6 ±18 5 (mod 3). (b) Let = 9. Both 6 and 7 are quadratic residues mod 9. Since (mod 9), the square root of 7 mod 9 are ±7 4 ±3 6. On the other hand, Since (mod 9), the square roots of 6 mod 9 are ± ±1 0 ±8 (mod 9) Square roots modulofor a generic rime Let a be a quadratic residue mod. We find x Z such that x a (mod ). For this, we write 1 = s t with t odd, and begin with a quadratic nonresidue n mod. Comute the two residues (1) b := n t mod, which is a rimitive s -root of unity mod, and () r := a (t+1)/ mod. Lemma (a) b is a rimitive s -root of unity mod. (b) ρ 0 := a 1 r is a s 1 -root of unity mod. Proof. (a) b s = (n t ) s = n s t = n 1 1 (mod ). Therefore, b is a s -root of unity modulo. Note that b, being an odd ower of a quadratic nonresidue, is a quadratic nonresidue mod. If b is not a rimitive s -root of unity, there is an integer r, 0 r < s, such that b r 1 (mod ). Then b would be an even ower of a rimitive s -root of unity, and therefore a quadratic residue mod, a contradiction. (b) Modulo, ρ s 1 0 = (a 1 r ) s 1 (a 1 a t+1 ) s 1 = a s 1 t = a ( 1)/ = ( ) a = +1. Now we find a square root ofa mod in the formb j r, for somej,0 j < s 1. Let j = (j s j s 3 j 1 j 0 ) be the binary exression of j, each of j 0,..., j s 1 being 0 or 1. We find the binary digits of j inductively.

17 50 Quadratic Residues (i) From (b), ρ0 s 1 1 (mod ). Therefore,ρ0 s ±1 (mod ). Set { 0 ifρ0 s 1 mod, j 0 = 1 ifρ0 s 1 mod andρ 1 = a 1 (b (j 0) r) = a 1 (b j 0 r), which is a s -root of unity. (ii) Suose we have j 0,j 1,..., j k 1 such that ρ k := a 1 (b (j k 1 j 1 j 0 ) r) is a s k 1 -root of unity mod. Set { 0 if ρk s k 1 mod, j k = 1 if ρk s k 1 mod andρ k+1 := a 1 (b (j kj k 1 j 1 j 0 ) r), which is a s k -root of unity. (iii) With j 0,..., j s, we obtain ρ s 1 = a 1 (b (j s j 1 j 0 ) r) = 1. Therefore,b j r is a square root of a mod. Examle 5.5. Consider = 401 and a = 186; a is a quadratic residue mod, and a 1 = 35. Now, 1 = 400 = 4 5; (s,t) = (4,5). With the quadratic nonresidue n = 3, we take (i) b = n t = 3 5 = 68, (ii) r = a 1 (t+1) = = 103. With these, (iii) ρ 0 = a 1 r = = 98; ρ 0 = 1; j 0 = 1, andρ 1 = a 1 (br) = 1. (iv) ρ 1 1 = 1; j 1 = 0, andρ = 1. (v) ρ 0 = 1; j = 1. (vi) j = (101) = 5. The square roots of 186 mod 304 are ±b 5 r = ±304 = ±97. Examle 5.6. Consider = 7993 and a = 41; a is a quadratic residue mod, and a 1 = Now, 1 = 799 = ;(s,t) = (3,999). With the quadratic nonresidue n = 5, we take (i) b = n t = = 1654, (ii) r = a 1 (t+1) = = 487. With these, (iii) ρ 0 = a 1 r = ( 3899) 487 = 110; ρ 1 0 = 1; j 0 = 1, and ρ 1 = a 1 (br) = 799. (iv) ρ 0 1 = 799 = 1; j 1 = 1. (v) j = (11) = 3. The square roots of a mod are ±b 3 r = ±1975.

18 5.9 The Jacobi symbol The Jacobi symbol Definition. Let n = k i i be an odd integer. For an integer a with gcd(a, n) = 1, the Jacobi symbol is defined by ( a n) := ( ) ki a. i Proosition Letmandnbe odd numbers. (a) Ifgcd(a,n) = 1 anda b (mod n), then ( ( a n) = b n). (b) Ifgcd(a,n) = gcd(b,n) = 1, then ( ( ab n) = a b ) ) n)( n. In articular, (a n (c) Ifmand n are relatively rime, andgcd(a,m) = gcd(a,n) = 1, then ( a ) mn ( a = n )( a n). (d) ( ) 1 n = 1 if and only if n 1 (mod 4). (e) ( n) = 1 if and only ifn ±1 (mod 8). (f) (The law of recirocity) If gcd(m,n) = 1, then ( m n )( n m) = ( 1) m 1 n 1. = 1. Remark. If n is not a rime, ( a n) = +1 does not imly that a is a quadratic residue mod n. For examle, ( ( 15) = 3)( 5) = ( 1)( 1) = +1. But the quadratic residues modulo 15 are 1, 4, and 10.

19 5 Quadratic Residues

20 Chater 6 Primality Tests and Factorization of Integers 6.1 Primality of Mersenne numbers A Mersenne number of is one of the form M k := k 1. A Mersenne rime gives rise to an even erfect number. IfM k = k 1 is a rime, thenk must be a rime. The converse, however, is not true. The Mersenne numbers M = 3, M 3 = 7, M 5 = 31, M 7 = 17 are all rimes. ButM 11 = 047 is comosite. Theorem 6.1 (Fermat). If > is rime, then every rime divisor ofm := 1 is of the formk +1 for some integer k. Proof. Let q be a rime divisor of M, so that 1 (mod q). This means that order q () =. Since q 1 1 (mod q) by Fermat s little theorem, q 1 is an even multile of the odd rime. Therefore, q = k +1 for some integer k. Examle 6.1. (a)m 11 = 11 1 = 047. The divisors ofm 11 of the formk+1. For k = 1, it can be easily checked that 047 = (The other divisor 89 = 4+1). (b) M 13 = 13 1 = We need only check rime divisors of the form 6k +1 which are less than 90. These are 53 and 79. None of these divides We conclude that M 13 is rime. (c) M 9 = 9 1 = = There are 99 rimes of the form58k +1 smaller than the square root ofm 9. Of these,33,1103,089 divide M 9 (which are the second,6-th, and1-th rimes in increasing order). Exercise Factorize comletely each of the following Mersenne numbers, or rove that it is rime. (1) M 19 = 19 1 = () M 3 = 3 1 =

21 54 Primality Tests and Factorization of Integers (3)M 47 = 47 1 = Remark. In the beginning of the 0-th century, F. N. Cole, Professor of Mathematics at Columbia University, sent the Sundays of three consecutive years on the factorization ofm 67, and obtained M 67 = 67 1 = = Theorem 6.. Let 3 (mod 4) be a rime. The Mersenne numberm = 1 is divisible by +1 if and only if+1 is rime. Proof. Letq = +1. Note that q 7 (mod 8). ( ) If q divides 1, 1 (mod q), and order q () divides. Since is rime, order q () = = 1(q 1). On the other hand, order q() divides ϕ(q) q 1. Therefore, ϕ(q) = or. Since ϕ(q) (an odd number), we must have ϕ(q) = = q 1, andq is rime. ( q ( ) ( ) Since q 7 (mod 8), = 1. By Euler s theorem, = (q 1)/ q ) 1 (mod q). Therefore,q divides 1 = M. Table 1. The first100 Mersenne numbers M, 3 (mod 4), divisible by rime q = + 1 (,q) (,q) (,q) (,q) (,q) (11, 3) (3, 47) (83, 167) (131, 63) (179, 359) (191, 383) (39, 479) (51, 503) (359, 719) (419, 839) (431, 863) (443, 887) (491, 983) (659, 1319) (683, 1367) (719, 1439) (743, 1487) (911, 183) (1019, 039) (1031, 063) (1103, 07) (13, 447) (1439, 879) (1451, 903) (1499, 999) (1511, 303) (1559, 3119) (1583, 3167) (1811, 363) (1931, 3863) (003, 4007) (039, 4079) (063, 417) (339, 4679) (351, 4703) (399, 4799) (459, 4919) (543, 5087) (699, 5399) (819, 5639) (903, 5807) (939, 5879) (963, 597) (303, 6047) (399, 6599) (3359, 6719) (3491, 6983) (3539, 7079) (363, 747) (3779, 7559) (3803, 7607) (3851, 7703) (3863, 777) (3911, 783) (4019, 8039) (411, 843) (471, 8543) (4391, 8783) (4871, 9743) (4919, 9839) (4943, 9887) (5003, 10007) (5039, 10079) (5051, 10103) (5171, 10343) (531, 10463) (579, 10559) (5303, 10607) (5399, 10799) (5639, 1179) (5711, 1143) (5903, 11807) (6131, 163) (663, 157) (633, 1647) (6491, 1983) (6551, 13103) (6563, 1317) (6899, 13799) (6983, 13967) (7043, 14087) (7079, 14159) (7103, 1407) (7151, 14303) (711, 1443) (7643, 1587) (7691, 15383) (783, 15647) (7883, 15767) (8111, 163) (843, 16487) (8663, 1737) (8951, 17903) (9059, 18119) (9371, 18743) (9419, 18839) (9479, 18959) (9539, 19079) (9791, 19583) (10091, 0183)

22 6. Germain rimes Germain rimes An odd rimefor which+1 is also rime is called a Germain rime. Theorem 6. can be restated as saying that if 3 (mod 4) is a Germain rime, then the Mersenne number M has a rime divisor + 1. Table 1 gives the 100 Germain rimes of the form 4k +3. Here are the Germain rimes of the form 4k +1. Table. The first 100 Germain rimes = 4k + 1 (,q) (,q) (,q) (,q) (,q) (5, 11) (9, 59) (41, 83) (53, 107) (89, 179) (113, 7) (173, 347) (33, 467) (81, 563) (93, 587) (509, 1019) (593, 1187) (641, 183) (653, 1307) (761, 153) (809, 1619) (953, 1907) (1013, 07) (1049, 099) (19, 459) (189, 579) (1409, 819) (1481, 963) (1601, 303) (1733, 3467) (1889, 3779) (1901, 3803) (1973, 3947) (069, 4139) (19, 459) (141, 483) (73, 4547) (393, 4787) (549, 5099) (693, 5387) (741, 5483) (753, 5507) (969, 5939) (339, 6659) (3389, 6779) (3413, 687) (3449, 6899) (3593, 7187) (3761, 753) (381, 7643) (4073, 8147) (4349, 8699) (4373, 8747) (4409, 8819) (4481, 8963) (4733, 9467) (4793, 9587) (5081, 10163) (5333, 10667) (5441, 10883) (5501, 11003) (5741, 11483) (5849, 11699) (6053, 1107) (6101, 103) (6113, 17) (6173, 1347) (669, 1539) (639, 1659) (6449, 1899) (651, 13043) (6581, 13163) (6761, 1353) (711, 1443) (7193, 14387) (7349, 14699) (7433, 14867) (7541, 15083) (7649, 1599) (7841, 15683) (7901, 15803) (8069, 16139) (8093, 16187) (873, 16547) (8513, 1707) (8693, 17387) (8741, 17483) (8969, 17939) (909, 18059) (91, 18443) (993, 18587) (9473, 18947) (969, 1959) (9689, 19379) (10061, 013) (1053, 0507) (10313, 067) (1059, 1059) (10589, 1179) (10613, 17) (10709, 1419) (10733, 1467) (10781, 1563) (1131, 643) (11369, 739) Proosition 6.3. Letbe a Germain rime, so that q = +1 is also rime. (a) If 1 (mod 4), then+1 is rimitive root modulo q. (b) If 3 (mod 4), then is a rimitive root modulo q. Proof. (a) If 1 (mod 4),+ q +1 1 (mod q) and ( ) ( ) ( )( ) = = =. q q q q ( ) Note thatq 3 (mod 8), and = 1. From this q (+1) = (+1) q 1 ( ) +1 = 1 (mod q). q Therefore, the order of+1 mod q is, and +1 is a rimitive root.

23 56 Primality Tests and Factorization of Integers (b) If 3 (mod 4), then q 7 (mod 8) and 1 (mod q). It follows that ( ) ( ) ( )( ) ( ) 1 1 = = = =. q q q q q Again, andis a rimitive root for q. = q 1 ( ) = 1, q 6.3 Probabilistic rimality tests Pseudorimes The converse of Fermat s little theorem is not true. If 1 1 (mod ), one cannot conclude that is a rime. Here is an examle: = 341 = is comosite, but (mod 341). Definition. Given an integer b, an odd comosite n is called a b-seudorime ifgcd(n,b) = 1 andb n 1 1 (mod n). Examle is a 3-seudorime, since (mod 91). But91 is not a-seudorime, since (mod 91). To verify these, we make use of the binary exansion of90 = , and comute 90 and3 90 modulo91 by successive squaring and multilication: t k = t k (mod 91) 3 k (mod 91) ( 17)(16)(16) 4( 17)( 17) 4(16) 64 (mod 91), ( 9)( 10)( 10) 9 10 (90) 1 (mod 91). Proosition 6.4. Letb,b 1,b, andnbe an odd comosite number rime tob. (a)nis ab-seudorime if and only if order n (b) n 1. (b) If n is ab-seudorime, and ab 1 (mod n), thennis ana-seudorime. (c) Ifnis ab 1 - andb -seudorime, then it is also ab 1 b - andb 1 b 1 -seudorime.

24 6.3 Probabilistic rimality tests 57 Proof. (a) If n is a b-seudorime, thenb n 1 1 (mod n); order n (b) n 1. Conversely, if n 1 = k order n (b), then b n 1 (b ordern(b) ) k 1 (mod n) andnis a b-seudorime. (b) Let n be a b-seudorime. Since ab 1 (mod n), a n 1 a n 1 b n 1 (ab) n 1 1 (mod n). Therefore, n is ana-seudorime. (c) Fromb n (mod n) and b n 1 (mod n), we have Therefore, n is a b 1 b seudorime. Proosition 6.5. If n fails the test (b 1 b ) n 1 b n 1 1 b n 1 1 (mod n). b n 1 1 (mod n) for a single base b Z n, then it fails the test for at least half of the ossible bases b Z n. Proof. Suose b n 1 1 (mod n), i.e., n is not a b-seudorime. Let b 1, b,..., b s Z n be the bases for whichnis a seudorime. Ifnasses the test for any of the bases bb i, then by Proosition 6.4 (c), it would be a seudorime for (bb i )b 1 i b (mod n), a contradiction. Thus, the distinct residues bb 1, bb,..., bb s are bases for which the test fails. There are at least as many bases for which n fails the test as there are bases for whichnasses the test. Corollary 6.6. Letn > 1 be a given integer. If n asses the test b n 1 1 (mod n) for b = b 1, b,...,b k, then the robability that n is a rime is at least1 ( 1 ) k. Proof. For i = 1,,..., k, n is a b i -seudorime. By Proosition 6.5, the robability thatnis still comosite desite assing thek tests is at most1out of k. From this the result follows. Examle 6.3. n = is ab-seudorime for the9values ofb =,3,5,7,11, 13, 17, 19, 3. (In each column, the roduct of the numbers with row header 1 is 1 (mod 14979)). The robability that it is rime is at least1 ( ) 1 9 =

25 58 Primality Tests and Factorization of Integers Eulerb-seudorimes Definition. An odd comosite number b is called an Euler b-seudorime if gcd(n,b) = 1 and ( ) b b (n 1)/ (mod n), n where ( b n) is the Jacobi symbol. Proosition 6.7. Let b > 1 be a fixed integer and n > 1 be an odd comosite number. If n is an Euler b-seudorime, then it is ab-seudorime. Proof. Ifb n 1 ( ) b n (mod n), then squaring, we haveb n 1 ( b n) = 1 (mod n). This shows that n is a b-seudorime. Proosition 6.8 (Solovay-Strassen rimality test). Let n > 1 be a given integer. If n asses the test ( ) b b (n 1)/ (mod n) n for b = b 1, b,...,b k, then the robability that n is a rime is at least 1 ( 1 k. ) Strongb-seudorimes Definition. Let n be an odd comosite number, and n 1 = s t where t is odd. Forb Z n,nis called a strong b-seudorime if eitherb t 1 (mod n), or there exists r,0 r < s, such that b r t 1 (mod n).

26 6.3 Probabilistic rimality tests 59 Lemma 6.9. Let b > 1 be a fixed integer and n be an odd comosite number satisfying b n 1 1 (mod n). Write n 1 = s t with t odd. Let be a rime divisor of n, and write 1 = s t with t odd. Thens s and ( ) { b 1 if s = s, = 1 if s > s Proof. Sinceb n 1 b s 1t 1 (mod n), and t,t are both odd, we have (b s 1 t ) t ( ) t ( b s 1 t b n 1 ) t ( 1) t 1 (mod n). Therefore, b s 1 t 1 (mod n). Since is a divisor ofn, we also have b s 1 t 1 (mod ). (6.1) If s < s, then s s 1 and 1 = s t is a divisor of s 1 t. By (6.1), b 1 = b s t cannot be 1 mod, contrary to Fermat s little theorem. Thus,s s. From (6.1) again, ( ) b b 1 b s 1 t (b s 1 t ) s s = ( 1) s s = { 1 if s = s 1 if s > s. Proosition Let b > 1 be a fixed integer and n > 1 be an odd comosite number. Ifnis a strong b-seudorime, then it is an Euler seudorime. Proof. We consider three cases. Case 1.b t 1 (mod n). Since t is odd, b n 1 = (b t ) s 1 1 = ( b t n ) = ( b n), and ( ) 1 = n ( ) b t = n ( ) b. n Case. b n 1 1 (mod n). Write n = as a roduct of rimes, not necessarily distinct. Let k denote the number of rimes, counting multilicity, for which s = s in Lemma??. We always have s s and ( ) ( ) b n = b = ( 1) k. On the other hand, modulo s+1, we have 1 unless is one of the k rimes for which s = s, in which case = 1 + s. Since n = 1 + s t 1 + s (mod s+1 ), we have 1+ s (1+ s ) k 1+k s (mod k+1 ). This means that k must be odd, and ( b n) = ( 1) k = 1.

27 60 Primality Tests and Factorization of Integers Case 3.b r 1t 1 (mod n) for some 0 < r < s. Since b n 1 1 (mod n), we have to show that ( b n) = 1. Again, let be a rime divisor ofn, and write 1 = s t witht odd. Analogous to Lemma??, ( ) { b 1 if s = r = 1 if s > r. Let k be the number of rimes (counting multilicity) in the roduct n = for which s = r. Then as in case, we gave ( b n) = ( 1) k. On the other hand, since n = 1+ s t 1 (mod r+1 ) andn = (1+ r ) k (mod r+1 ), it follows that it must be even, and ( b n) = 1. Remark. The converses of Proositions 6.7 and 6.10 are not true. (1) 91 is a 3-seudorime but not an Euler3-eudorime. () 561 is an Euler-seudorime but not a strong -seudorime. Proosition Letb > 1 be a fixed integer, andn 3 (mod 4). Ifnis an Euler b-seudorime, then it is a strongb-seudorime. Proof. Since n 3 (mod 4), n 1 = s t with s = 1 and t odd. Since n is an Eulerb-seudorime, b t = b n 1 ( ) b ±1 (mod n). n Now, since s = 1, this is exactly the condition for n to be a strong b-seudorime. Proosition 6.1. Ifnis an odd comosite number, then it is a strongb-seudorime for at most 5% of all 0 < b < n. Proosition 6.13 (Rabin-Miller test). Let n be an odd integer, and n 1 = s t withtodd. If for b = b 1,b,..., b k,nasses the test: either b t 1 (mod n), or there exists r, 0 r < s, such that b r t 1 (mod n), then the robability that n is rime is at least 1 ( 1 4) k. Exercise 1. Check that M 17 = andm 19 = 5487 are rimes.. Find a rime divisor of M 3 = Find a rime divisor of M 9 =

28 6.4 Carmichael numbers Consider M 47 = 47 1 = The beginning rimes of the form 94k +1 are 83, 659, 941, 119, 13, 1693, 1787, 069, 351,539,633,3761,431,4513,4889,... (a) Find two rime divisors of M 47 from this list. (b) Comletely factorize M Show that 561 is a -seudorime. 6. Show that 179 is a - and3-seudorime. 6.4 Carmichael numbers Definition. A Carmichael number is a comosite integer n for which b n 1 1 (mod n) for everyb Z n. Examle = is a Carmichael number. To rove this, we show that if gcd(b,561) = 1, b (mod 3), b (mod 11), and b (mod 17). Now, by Fermat s little theorem, b 1 (mod 3) b 560 (b ) 80 1 (mod 3), b 10 1 (mod 11) b 560 (b 10 ) 56 1 (mod 11), b 16 1 (mod 17) b 560 (b 16 ) 35 1 (mod 17). By the Chinese Remainder Theorem, b (mod 561). This shows that 561 is a Carmichael number. This examle shows that to check if n is a Carmichael number, it is enough to check if it asses the testb n 1 1 (mod n) for rime numbers b < n. Proosition If n is an odd comosite number is divisible by the square of a (rime) number, thenncannot be a Carmichael number. Proof. Suose n for a rime. Let g be a rimitive root of. Let n be the roduct of all rimes other than which divide n. By the Chinese Remainder Theorem, there is an integer b satisfying b g (mod ), b 1 (mod n ). Thengcd(b,n) = 1 andbis a rimitive root of. We claim that n is not a b-seudorime. If n is a b-seudorime, then b n 1 1 (mod n), and b n 1 1 (mod ) since n. Since order (b) = ( 1),( 1) n 1. Sincen 1 1 (mod ),n 1 is not divisible by( 1). This is a contradiction.

29 6 Primality Tests and Factorization of Integers Proosition An odd, square free, comosite number n is a Carmichael number if and only if 1 n 1 for every rime dividing n. Proof. ( ) Letnbe a Carmichael number. Suose n 1 is not divisible by 1 for some rime divisor of n. Letg be a rimitive root of. Find an integer b satisfying b g (mod ), b 1 (mod n/). Then gcd(b,n) = 1 and b n 1 g n 1 1 (mod ) since n 1 is not divisible by order (g) = 1. Hence,b n 1 1 (mod n) cannot hold. ( ) For n, writen 1 = k( 1) for some integerk. Letbbe any base with gcd(b,n) = 1. b n 1 = b k( 1) (b 1 ) k 1 (mod ). Since n is square free, it is the roduct of all rime divisors of n. If follows that b n 1 1modn, andnis a Carmichael number. Proosition A Carmichael number is the roduct of at least three distinct rimes. Proof. By roosition 6.14, a Carmichael number must be a roduct of distinct rimes. It remains to show that it cannot be a roduct of two distinct rimes. Consider n = q for distinct rimes < q. If n were a Carmichael number, then, by Proosition 6.15, modulo q 1, 1 (q 1+1) 1 n 1 0, an imossibility since 0 < 1 < q 1. Examle = is a Carmichael number, since 560 is divisible by each of,10, and16. To show that this is the smallest Carmichael number, we make use of Proosition Since the roduct of the four smallest odd rimes is > 561, it is enough to consider n = qr with rime numbers < q < r 89, and qr 561. The table below lists all such scenarios. In every row excet the bottom one,qr 1 is not divisible by one of r 1 and q 1. This shows that 561 is the smallest Carmichael number. 6.5 Quadratic sieve and factor base Fermat s factorization Given an integernwith n = m, if there is an integerx > m such thatx n = y for some y Z, y x 1, then n = x y = (x y)(x+y) is a nontrivial factorization ofn.

30 6.5 Quadratic sieve and factor base 63 Examle 6.6. (a)n = 00819; n = n = = 1681 = 41. Therefore, = = , in which both factors are rime. (b) n = ; n = = 09 = = = , in which both factors are rime. (c) n = ; n = 899. x x n (mod 10) 90 3 (mod 10) = = = , in which both factors are rime. (d) n = ; n = If x n = y for an integer y, the units digit of x must be one of 1,4, 6,9. x x n x x n x x n = = = , in which both factors are rime. Exercise (1) Factor () Factorn = 96873, given n = Factor base This is a generalization of Fermats factorization. Given an integer n with m = n, we consider integers x close to m with x n factored into small rimes. More recisely, we secify a factor base B consisting of 1 and some rimes, and restrict to those x for which the factors of x n are all in B. With enough x, we collect those for which the roduct ofx n is a square. Suose, for j = 1,,..., k, z j := x j n = y j factors into rimes in B, and that k j=1 z j = Z for an integer Z. Then, withx := k j=1 x j, X = k x j Z j=1 (mod n).

31 64 Primality Tests and Factorization of Integers If X Y (mod n), then n has a common divisor of one or both of X ±Y. This gives a nontrivial factorization ofn. Examle 6.7. n = 9509; n = 97. LetB = { 1,,5,11}. j x j z j = x j n = = = = Note thatz 1 z = ( 5 11). Therefore,( )( ) 0 (mod n); (mod n). Now,gcd(n,9435) = 37 andgcd(n,8995) = 57. This gives 9509 = 37 57, in which both factors are rime. Examle 6.8. n = 87463; n = 95. LetB = { 1,3,17}. j x j z j = x j n = = Note that x 1 x = (mod n) and = Therefore, ( )( ) 0 (mod n). This gives (mod n). Now, gcd(n,4696) = 587 and gcd(n,7450) = 149. This gives = , in which both factors are rime. Examle 6.9. Consider n = with m = n = We have Multilication gives 1964 n = (mod n), n = (mod n), n = (mod n), n = (mod n). ( ) ( ) (mod n), or (mod n). Thus, gcd(383753, ) = gcd(383753, ) = 1093 is a divisor of n. The other divisor is = , both factors are rime numbers.

32 6.5 Quadratic sieve and factor base 65 Exercise (1) FactorN = by making use of (mod N) and (mod N). () FactorN = 8833 by making use of (mod N), (mod N), (mod N).

33 66 Primality Tests and Factorization of Integers 6.6 Pollard s methods Theρ-method Let n be a given integer and f(x) Z[x]. Beginning with an integer x 0, construct a sequence of integers x 1, x, x 3,... by x k+1 = f(x k ) (mod n). If is a rime divisor of n, there is a corresond sequence z k = x k (mod ) of integers in the range [0, 1]. If n, the number of ossible values of z k is much less than the number of ossible values of x k. We exect the z k to reeat sooner. Examle Letn = 341 andf(x) = x +1 (mod n). Withx 0 = 3 we generate two sequencesx k andy k by x k+1 = f(x k ) (mod n), y k = x k (mod n). k x k y k Since341 = 11 31, we reduce x k andy k modulo 31 and obtain k x k (mod 31) y k (mod 31) Note that x 3 y 3 (mod 31). The eriod of the sequence modulo 31 is 3. We can find a factor by comuting gcd(x k y k,n). Now, gcd(x 3 y 3, 341) = 31, which is a factor of341. Let n be an integer, known to be comosite by some means. To find a divisor of n, we roceed as follows. Let f(x) be a olynomial in Z[x]; for examle, f(x) = x + 1. With an arbitrary integer x 0, form a sequence x 1, x, x 3,..., x k,... by setting x k+1 = f(x k ). Comute gcd(x k x j, n) to find a nontrivial divisor of n. In ractice, we evaluategcd(x k x t 1, n) only for t k < t+1 to see if we get a number other than1.

34 6.6 Pollard s methods The ( 1)-method Letnbe a number, known to be comosite, and with rime divisorfor which 1 has no large rime divisor. To find, we roceed as follows. (1) Choose an integerk which is a multile of all or most integers less than some bound B. For examle, k = B! or the lcm of all integers B. () Choose an integer a between and n, and comute a k mod n by successive squaring and multilication. (3) Comute d := gcd(a k 1, n). (4) Ifdis a roer divisor ofn, we are done. If not, start with a new choice ofa or k. Examle Factorization of the Fermat number F 5 = 5 +1 = k 3 k! 1 mod n gcd(3 k! 1, F 5 ) Therefore, F 5 is divisible by641. The other factor is rime. Examle 6.1. The Fermat number F 6 = 6 +1 = k 3 k! 1 mod n gcd(3 k! 1, F 6 ) Therefore, F 6 is divisible by The other factor is

35 68 Primality Tests and Factorization of Integers Examle Consider n = M 37 = 37 1 = k 3 k! 1 mod n gcd(3 k! 1, n) Examle Letn = 479. We comute k! (mod n) andgcd( k! 1 (mod n), n). k d := k! (mod n) gcd(d,n)

36 Chater 7 Pythagorean Triangles 7.1 Construction of Pythagorean triangles By a Pythagorean triangle we mean a right triangle whose side lengths are integers. Any common divisor of two of the side lengths is necessarily a divisor of the third. We shall call a Pythagorean triangle rimitive if no two of its sides have a common divisor. Let (a,b,c) be one such triangle. From the relation a +b = c, we make the following observations. 1. Exactly two of a,b,care odd, and the third is even.. In fact, the even number must be one of a and b. For if c is even, then a and b are both odd. Writing a = h+1 andb = k +1, we have c = (h+1) +(k +1) = 4(h +k +h+k)+. This is a contradiction since c must be divisible by We shall assumeaodd andbeven, and rewrite the Pythagorean relation in the form c+a c a ( ) b =. Note that the integers c+a and c a are relatively rime, for any common divisor of these two numbers would be a common divisor c and a. Consequently, each of c+a and c a is a square. 4. Writing c+a = u and c a = v, we havec = u +v anda = u v. From these,b = uv. 5. Since c andaare both odd, u andv are of different arity. We summarize this in the following theorem. Theorem 7.1. The side lengths of a rimitive Pythagorean triangle are of the form u v,uv, andu +v for relatively rime integersuandv of different arity.

37 70 Pythagorean Triangles 7. Fermat s construction of rimitive Pythagorean triangles with consecutive legs Let a, b, c be the lengths of the sides of a right triangle, c the hyotenuse. Figures (a) and (b) below, together with the Pythagorean theorem, give the following two relations (a+b c) =(c a)(c b), (7.1) (a+b+c) =(c+a)(c+b). (7.) c b b b c a c a+b c c b a a a+b c c a (a)a,b,c fromc a and c b c (b)a,b,c fromc+a andc+b Beginning with a right triangle(a,b,c), we construct a new right triangle(a,b,c ) with c a = c+b and c b = c+a. By a comarison of (8.16) and (7.), we have a +b c = a+b+c. From these, a =a+b+c, b =a+b+c, c =a+b+3c. Note that b a = b a. This construction therefore leads to an infinite sequence of integer right triangles with constant difference of legs. In articular, beginning with (3,4,5), we obtain the sequence (3,4,5), (0,1,9), (119,10,169), (696,697,985),... of Pythagorean triangles with legs differing by 1. This construction gives all such Pythagorean triangles. Note that the above construction is invertible: from a right triangle(a,b,c ) one can construct a smaller

38 7. Fermat s construction of rimitive Pythagorean triangles with consecutive legs 71 one (a,b,c) with the same difference between the legs. More recisely, a =a +b c, b =a +b c, (7.3) c = a b +3c. Since a+b+c = a +b c < a +b +c, this inverse construction does yield a smaller triangle. However, it certainly cannot lead to a strictly decreasing sequence of integer right triangles. Now,a = a +b c must be a ositive integer. Using the Pythagorean theorem, it is easy to deduce from a +b > c that4a > 3b, or a > 3(b a ). This means that from every Pythagorean triangle with legs differing by 1, there is a descent, by reeated alications of (7.3), to a minimal integer right triangle with shortest side not exceeding 3. It is clear that there is only one such triangle, namely,(3, 4, 5). This therefore shows that the above construction actually gives all Pythagorean triangles with consecutive legs.

39 7 Pythagorean Triangles Aendix: Primitive Pythagorean triles < 1000 u,v a,b,c u,v a,b,c u,v a,b,c u,v a,b,c,1 3,4,5 3, 5,1,13 4,1 15,8,17 4,3 7,4,5 5, 1,0,9 5,4 9,40,41 6,1 35,1,37 6,5 11,60,61 7, 45,8,53 7,4 33,56,65 7,6 13,84,85 8,1 63,16,65 8,3 55,48,73 8,5 39,80,89 8,7 15,11,113 9, 77,36,85 9,4 65,7,97 9,8 17,144,145 10,1 99,0,101 10,3 91,60,109 10,7 51,140,149 10,9 19,180,181 11, 117,44,15 11,4 105,88,137 11,6 85,13,157 11,8 57,176,185 11,10 1,0,1 1,1 143,4,145 1,5 119,10,169 1,7 95,168,193 1,11 3,64,65 13, 165,5,173 13,4 153,104,185 13,6 133,156,05 13,8 105,08,33 13,10 69,60,69 13,1 5,31,313 14,1 195,8,197 14,3 187,84,05 14,5 171,140,1 14,9 115,5,77 14,11 75,308,317 14,13 7,364,365 15, 1,60,9 15,4 09,10,41 15,8 161,40,89 15,14 9,40,41 16,1 55,3,57 16,3 47,96,65 16,5 31,160,81 16,7 07,4,305 16,9 175,88,337 16,11 135,35,377 16,13 87,416,45 16,15 31,480,481 17, 85,68,93 17, 4 73, 136, , 6 53, 04, 35 17, 8 5, 7, , , 340, ,1 145,408,433 17,14 93,476,485 17,16 33,544,545 18,1 33,36,35 18, 5 99, 180, , 7 75, 5, , 11 03, 396, , , 468, ,17 35,61,613 19, 357,76,365 19,4 345,15,377 19,6 35,8,397 19, 8 97, 304, 45 19, 10 61, 380, , 1 17, 456, , , 53, ,16 105,608,617 19,18 37,684,685 0,1 399,40,401 0,3 391,10,409 0, 7 351, 80, 449 0, 9 319, 360, 481 0, 11 79, 440, 51 0, 13 31, 50, 569 0,17 111,680,689 0,19 39,760,761 1, 437,84,445 1,4 45,168,457 1, 8 377, 336, 505 1, , 40, 541 1, , 67, 697 1, 0 41, 840, 841,1 483,44,485,3 475,13,493,5 459,0,509,7 435,308,533, 9 403, 396, 565, , 57, 653, 15 59, 660, 709, , 748, 773,19 13,836,845,1 43,94,95 3, 55,9,533 3,4 513,184,545 3, 6 493, 76, 565 3, 8 465, 368, 593 3, 10 49, 460, 69 3, 1 385, 55, 673 3, , 644, 75 3, 16 73, 736, 785 3, 18 05, 88, 853 3, 0 19, 90, 99 4,1 575,48,577 4,5 551,40,601 4,7 57,336,65 4,11 455,58,697 4, , 64, 745 4, 17 87, 816, 865 4, 19 15, 91, 937 5, 61, 100, 69 5, 4 609, 00, 641 5, 6 589, 300, 661 5, 8 561, 400, 689 5, 1 481, 600, 769 5, 14 49, 700, 81 5, , 800, 881 5, , 900, 949 6, 1 675, 5, 677 6,3 667,156,685 6,5 651,60,701 6,7 67,364,75 6,9 595,468,757 6, , 57, 797 6, , 780, 901 6, , 884, 965 7, 75, 108, 733 7, 4 713, 16, 745 7, 8 665, 43, 793 7, 10 69, 540, 89 7, , 756, 95 7,16 473,864,985 8,1 783,56,785 8,3 775,168,793 8,5 759,80,809 8, 9 703, 504, 865 8, , 616, 905 8, , 78, 953 9, 837, 116, 845 9, 4 85, 3, 857 9, 6 805, 348, 877 9, 8 777, 464, 905 9, , 580, 941 9,1 697,696,985 30,1 899,60,901 30,7 851,40,949 31, 957,14,965 31,4 945,48,977 31,6 95,37, Fermat Last Theorem forn = 4 Theorem 7. (Fermat). The area of a Pythagorean triangle cannot be a square. Proof. Suose to the contrary there is one such triangle, which we may assume rimitive, with side lengths (u v,uv,u + v ), u, v being relative rime of

40 7.4 Two ternary trees of rational numbers 73 different arity. The area A = uv(u v ) being a square, and no two of u, v, u v sharing common divisors, each of these numbers must be a square. We write u = a, v = b so that u v = a 4 b 4 is also a square. Since a 4 b 4 = (a b )(a +b ) and the two factors are relatively rime, we must have a b = r anda +b = s for some integersr ands. From these,a = r +s and (a) = (r +s ) = (r+s) +(r s). Thus, we have a new Pythagorean triangle(r s,r+s,a). This is a Pythagorean triangle whose area is the square of an integer: 1 (r s)(r+s) = 1 (r s ) = b. But it is a smaller triangle since b = v is a roer divisor of A = uv(u v ). By descent, beginning with one Pythagorean triangle with square area, we obtain an infinite sequence of Pythagorean triangles with decreasing areas, each of which is a square integer; a contradiction. Corollary 7.3 (Fermat Last Theorem for n = 4). The equation x 4 +y 4 = z 4 does not have solutions in nonzero integers. Proof. Suosex 4 +y 4 = z 4 for ositive integersx,y,z. The Pythagorean triangle with sides z 4 y 4,z y andz 4 +y 4 has a square area a contradiction. z y (z 4 y 4 ) = z y x 4 = (x yz), Remark. This roof actually shows that the equation x +y 4 = z 4 has no solution in nonzero integers. 7.4 Two ternary trees of rational numbers Consider the rational numbers in the oen interval (0,1). Each of these is uniquely in the form q, for relatively rime ositive integers > q. We call +q the height of the rational numbers. The rational numbers in(0,1) with odd heights can be arranged in a ternary tree with root 1, as follows. For a rational number t of odd heights, the numbers 1, t 1, and t are also in(0,1) and have odd heights. We call these the descendants +t 1+t of t and label them the left (L), middle (M), and right (R) resectively. If we write t = q, then these three descendants are, and q, and have greater q +q +q heights. Thus, the rational number 1 has left descendant, middle descendant, 5 3 and right descendant 1. 4 On the other hand, each rational number s (0,1) \ { 1, 1} with odd height 3 is the descendant of a unique rational number t, which we call its arent. In fact, s = n is m (i) the left descendant of 1 = n m if 1 < s < 1, s n

Practice Final Solutions

Practice Final Solutions Practice Final Solutions 1. True or false: (a) If a is a sum of three squares, and b is a sum of three squares, then so is ab. False: Consider a 14, b 2. (b) No number of the form 4 m (8n + 7) can be written

More information

Practice Final Solutions

Practice Final Solutions Practice Final Solutions 1. Find integers x and y such that 13x + 1y 1 SOLUTION: By the Euclidean algorithm: One can work backwards to obtain 1 1 13 + 2 13 6 2 + 1 1 13 6 2 13 6 (1 1 13) 7 13 6 1 Hence

More information

Mersenne and Fermat Numbers

Mersenne and Fermat Numbers NUMBER THEORY CHARLES LEYTEM Mersenne and Fermat Numbers CONTENTS 1. The Little Fermat theorem 2 2. Mersenne numbers 2 3. Fermat numbers 4 4. An IMO roblem 5 1 2 CHARLES LEYTEM 1. THE LITTLE FERMAT THEOREM

More information

Math 4400/6400 Homework #8 solutions. 1. Let P be an odd integer (not necessarily prime). Show that modulo 2,

Math 4400/6400 Homework #8 solutions. 1. Let P be an odd integer (not necessarily prime). Show that modulo 2, MATH 4400 roblems. Math 4400/6400 Homework # solutions 1. Let P be an odd integer not necessarily rime. Show that modulo, { P 1 0 if P 1, 7 mod, 1 if P 3, mod. Proof. Suose that P 1 mod. Then we can write

More information

MATH 3240Q Introduction to Number Theory Homework 7

MATH 3240Q Introduction to Number Theory Homework 7 As long as algebra and geometry have been searated, their rogress have been slow and their uses limited; but when these two sciences have been united, they have lent each mutual forces, and have marched

More information

Representing Integers as the Sum of Two Squares in the Ring Z n

Representing Integers as the Sum of Two Squares in the Ring Z n 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 17 (2014), Article 14.7.4 Reresenting Integers as the Sum of Two Squares in the Ring Z n Joshua Harrington, Lenny Jones, and Alicia Lamarche Deartment

More information

MATH342 Practice Exam

MATH342 Practice Exam MATH342 Practice Exam This exam is intended to be in a similar style to the examination in May/June 2012. It is not imlied that all questions on the real examination will follow the content of the ractice

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

The Hasse Minkowski Theorem Lee Dicker University of Minnesota, REU Summer 2001

The Hasse Minkowski Theorem Lee Dicker University of Minnesota, REU Summer 2001 The Hasse Minkowski Theorem Lee Dicker University of Minnesota, REU Summer 2001 The Hasse-Minkowski Theorem rovides a characterization of the rational quadratic forms. What follows is a roof of the Hasse-Minkowski

More information

QUADRATIC RECIPROCITY

QUADRATIC RECIPROCITY QUADRATIC RECIPROCITY JORDAN SCHETTLER Abstract. The goals of this roject are to have the reader(s) gain an areciation for the usefulness of Legendre symbols and ultimately recreate Eisenstein s slick

More information

Quadratic Residues, Quadratic Reciprocity. 2 4 So we may as well start with x 2 a mod p. p 1 1 mod p a 2 ±1 mod p

Quadratic Residues, Quadratic Reciprocity. 2 4 So we may as well start with x 2 a mod p. p 1 1 mod p a 2 ±1 mod p Lecture 9 Quadratic Residues, Quadratic Recirocity Quadratic Congruence - Consider congruence ax + bx + c 0 mod, with a 0 mod. This can be reduced to x + ax + b 0, if we assume that is odd ( is trivial

More information

t s (p). An Introduction

t s (p). An Introduction Notes 6. Quadratic Gauss Sums Definition. Let a, b Z. Then we denote a b if a divides b. Definition. Let a and b be elements of Z. Then c Z s.t. a, b c, where c gcda, b max{x Z x a and x b }. 5, Chater1

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 oerations defined on them, addition and multilication,

More information

QUADRATIC RECIPROCITY

QUADRATIC RECIPROCITY QUADRATIC RECIPROCITY JORDAN SCHETTLER Abstract. The goals of this roject are to have the reader(s) gain an areciation for the usefulness of Legendre symbols and ultimately recreate Eisenstein s slick

More information

Number Theory Naoki Sato

Number Theory Naoki Sato Number Theory Naoki Sato 0 Preface This set of notes on number theory was originally written in 1995 for students at the IMO level. It covers the basic background material that an IMO

More information

x 2 a mod m. has a solution. Theorem 13.2 (Euler s Criterion). Let p be an odd prime. The congruence x 2 1 mod p,

x 2 a mod m. has a solution. Theorem 13.2 (Euler s Criterion). Let p be an odd prime. The congruence x 2 1 mod p, 13. Quadratic Residues We now turn to the question of when a quadratic equation has a solution modulo m. The general quadratic equation looks like ax + bx + c 0 mod m. Assuming that m is odd or that b

More information

6 Binary Quadratic forms

6 Binary Quadratic forms 6 Binary Quadratic forms 6.1 Fermat-Euler Theorem A binary quadratic form is an exression of the form f(x,y) = ax 2 +bxy +cy 2 where a,b,c Z. Reresentation of an integer by a binary quadratic form has

More information

Primes - Problem Sheet 5 - Solutions

Primes - Problem Sheet 5 - Solutions Primes - Problem Sheet 5 - Solutions Class number, and reduction of quadratic forms Positive-definite Q1) Aly the roof of Theorem 5.5 to find reduced forms equivalent to the following, also give matrices

More information

1 Integers and the Euclidean algorithm

1 Integers and the Euclidean algorithm 1 1 Integers and the Euclidean algorithm Exercise 1.1 Prove, n N : induction on n) 1 3 + 2 3 + + n 3 = (1 + 2 + + n) 2 (use Exercise 1.2 Prove, 2 n 1 is rime n is rime. (The converse is not true, as shown

More information

MAT 311 Solutions to Final Exam Practice

MAT 311 Solutions to Final Exam Practice MAT 311 Solutions to Final Exam Practice Remark. If you are comfortable with all of the following roblems, you will be very well reared for the midterm. Some of the roblems below are more difficult than

More information

By Evan Chen OTIS, Internal Use

By Evan Chen OTIS, Internal Use Solutions Notes for DNY-NTCONSTRUCT Evan Chen January 17, 018 1 Solution Notes to TSTST 015/5 Let ϕ(n) denote the number of ositive integers less than n that are relatively rime to n. Prove that there

More information

CERIAS Tech Report The period of the Bell numbers modulo a prime by Peter Montgomery, Sangil Nahm, Samuel Wagstaff Jr Center for Education

CERIAS Tech Report The period of the Bell numbers modulo a prime by Peter Montgomery, Sangil Nahm, Samuel Wagstaff Jr Center for Education CERIAS Tech Reort 2010-01 The eriod of the Bell numbers modulo a rime by Peter Montgomery, Sangil Nahm, Samuel Wagstaff Jr Center for Education and Research Information Assurance and Security Purdue University,

More information

On the Multiplicative Order of a n Modulo n

On the Multiplicative Order of a n Modulo n 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 13 2010), Article 10.2.1 On the Multilicative Order of a n Modulo n Jonathan Chaelo Université Lille Nord de France F-59000 Lille France jonathan.chaelon@lma.univ-littoral.fr

More information

MAS 4203 Number Theory. M. Yotov

MAS 4203 Number Theory. M. Yotov MAS 4203 Number Theory M. Yotov June 15, 2017 These Notes were comiled by the author with the intent to be used by his students as a main text for the course MAS 4203 Number Theory taught at the Deartment

More information

MATH 361: NUMBER THEORY EIGHTH LECTURE

MATH 361: NUMBER THEORY EIGHTH LECTURE MATH 361: NUMBER THEORY EIGHTH LECTURE 1. Quadratic Recirocity: Introduction Quadratic recirocity is the first result of modern number theory. Lagrange conjectured it in the late 1700 s, but it was first

More information

Maths 4 Number Theory Notes 2012 Chris Smyth, University of Edinburgh ed.ac.uk

Maths 4 Number Theory Notes 2012 Chris Smyth, University of Edinburgh ed.ac.uk Maths 4 Number Theory Notes 202 Chris Smyth, University of Edinburgh c.smyth @ ed.ac.uk 0. Reference books There are no books I know of that contain all the material of the course. however, there are many

More information

ERRATA AND SUPPLEMENTARY MATERIAL FOR A FRIENDLY INTRODUCTION TO NUMBER THEORY FOURTH EDITION

ERRATA AND SUPPLEMENTARY MATERIAL FOR A FRIENDLY INTRODUCTION TO NUMBER THEORY FOURTH EDITION ERRATA AND SUPPLEMENTARY MATERIAL FOR A FRIENDLY INTRODUCTION TO NUMBER THEORY FOURTH EDITION JOSEPH H. SILVERMAN Acknowledgements Page vii Thanks to the following eole who have sent me comments and corrections

More information

Algebraic Number Theory

Algebraic Number Theory Algebraic Number Theory Joseh R. Mileti May 11, 2012 2 Contents 1 Introduction 5 1.1 Sums of Squares........................................... 5 1.2 Pythagorean Triles.........................................

More information

Jacobi symbols and application to primality

Jacobi symbols and application to primality Jacobi symbols and alication to rimality Setember 19, 018 1 The grou Z/Z We review the structure of the abelian grou Z/Z. Using Chinese remainder theorem, we can restrict to the case when = k is a rime

More information

.4. Congruences. We say that a is congruent to b modulo N i.e. a b mod N i N divides a b or equivalently i a%n = b%n. So a is congruent modulo N to an

.4. Congruences. We say that a is congruent to b modulo N i.e. a b mod N i N divides a b or equivalently i a%n = b%n. So a is congruent modulo N to an . Modular arithmetic.. Divisibility. Given ositive numbers a; b, if a 6= 0 we can write b = aq + r for aroriate integers q; r such that 0 r a. The number r is the remainder. We say that a divides b (or

More information

MA3H1 Topics in Number Theory. Samir Siksek

MA3H1 Topics in Number Theory. Samir Siksek MA3H1 Toics in Number Theory Samir Siksek Samir Siksek, Mathematics Institute, University of Warwick, Coventry, CV4 7AL, United Kingdom E-mail address: samir.siksek@gmail.com Contents Chater 0. Prologue

More information

Math 261 Exam 2. November 7, The use of notes and books is NOT allowed.

Math 261 Exam 2. November 7, The use of notes and books is NOT allowed. Math 261 Eam 2 ovember 7, 2018 The use of notes and books is OT allowed Eercise 1: Polynomials mod 691 (30 ts In this eercise, you may freely use the fact that 691 is rime Consider the olynomials f( 4

More information

Introductory Number Theory

Introductory Number Theory Introductory Number Theory Lecture Notes Sudita Mallik May, 208 Contents Introduction. Notation and Terminology.............................2 Prime Numbers.................................. 2 2 Divisibility,

More information

POINTS ON CONICS MODULO p

POINTS ON CONICS MODULO p POINTS ON CONICS MODULO TEAM 2: JONGMIN BAEK, ANAND DEOPURKAR, AND KATHERINE REDFIELD Abstract. We comute the number of integer oints on conics modulo, where is an odd rime. We extend our results to conics

More information

We collect some results that might be covered in a first course in algebraic number theory.

We collect some results that might be covered in a first course in algebraic number theory. 1 Aendices We collect some results that might be covered in a first course in algebraic number theory. A. uadratic Recirocity Via Gauss Sums A1. Introduction In this aendix, is an odd rime unless otherwise

More information

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES 2018

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES 2018 MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES 2018 J. E. CREMONA Contents 0. Introduction: What is Number Theory? 2 Basic Notation 3 1. Factorization 4 1.1. Divisibility in Z 4 1.2. Greatest Common

More information

Quadratic Residues. Chapter Quadratic residues

Quadratic Residues. Chapter Quadratic residues Chter 8 Qudrtic Residues 8. Qudrtic residues Let n>be given ositive integer, nd gcd, n. We sy tht Z n is qudrtic residue mod n if the congruence x mod n is solvble. Otherwise, is clled qudrtic nonresidue

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

MATH 371 Class notes/outline October 15, 2013

MATH 371 Class notes/outline October 15, 2013 MATH 371 Class notes/outline October 15, 2013 More on olynomials We now consider olynomials with coefficients in rings (not just fields) other than R and C. (Our rings continue to be commutative and have

More information

Factorability in the ring Z[ 5]

Factorability in the ring Z[ 5] University of Nebraska - Lincoln DigitalCommons@University of Nebraska - Lincoln Dissertations, Theses, and Student Research Paers in Mathematics Mathematics, Deartment of 4-2004 Factorability in the ring

More information

MA3H1 TOPICS IN NUMBER THEORY PART III

MA3H1 TOPICS IN NUMBER THEORY PART III MA3H1 TOPICS IN NUMBER THEORY PART III SAMIR SIKSEK 1. Congruences Modulo m In quadratic recirocity we studied congruences of the form x 2 a (mod ). We now turn our attention to situations where is relaced

More information

Mobius Functions, Legendre Symbols, and Discriminants

Mobius Functions, Legendre Symbols, and Discriminants Mobius Functions, Legendre Symbols, and Discriminants 1 Introduction Zev Chonoles, Erick Knight, Tim Kunisky Over the integers, there are two key number-theoretic functions that take on values of 1, 1,

More information

Chapter 3. Number Theory. Part of G12ALN. Contents

Chapter 3. Number Theory. Part of G12ALN. Contents Chater 3 Number Theory Part of G12ALN Contents 0 Review of basic concets and theorems The contents of this first section well zeroth section, really is mostly reetition of material from last year. Notations:

More information

RATIONAL AND INTEGRAL POINTS ON CURVES. Andrew Granville. Table of Contents

RATIONAL AND INTEGRAL POINTS ON CURVES. Andrew Granville. Table of Contents RATIONAL AND INTEGRAL POINTS ON CURVES Andrew Granville Abstract. These are notes that have been extracted from a book that I am writing on elementary number theory. I make no attemt here to organize this

More information

Introduction to Arithmetic Geometry Fall 2013 Lecture #10 10/8/2013

Introduction to Arithmetic Geometry Fall 2013 Lecture #10 10/8/2013 18.782 Introduction to Arithmetic Geometry Fall 2013 Lecture #10 10/8/2013 In this lecture we lay the groundwork needed to rove the Hasse-Minkowski theorem for Q, which states that a quadratic form over

More information

CONGRUENCES CONCERNING LUCAS SEQUENCES ZHI-HONG SUN

CONGRUENCES CONCERNING LUCAS SEQUENCES ZHI-HONG SUN Int. J. Number Theory 004, no., 79-85. CONGRUENCES CONCERNING LUCAS SEQUENCES ZHI-HONG SUN School of Mathematical Sciences Huaiyin Normal University Huaian, Jiangsu 00, P.R. China zhihongsun@yahoo.com

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

ON THE LEAST SIGNIFICANT p ADIC DIGITS OF CERTAIN LUCAS NUMBERS

ON THE LEAST SIGNIFICANT p ADIC DIGITS OF CERTAIN LUCAS NUMBERS #A13 INTEGERS 14 (014) ON THE LEAST SIGNIFICANT ADIC DIGITS OF CERTAIN LUCAS NUMBERS Tamás Lengyel Deartment of Mathematics, Occidental College, Los Angeles, California lengyel@oxy.edu Received: 6/13/13,

More information

Almost 4000 years ago, Babylonians had discovered the following approximation to. x 2 dy 2 =1, (5.0.2)

Almost 4000 years ago, Babylonians had discovered the following approximation to. x 2 dy 2 =1, (5.0.2) Chater 5 Pell s Equation One of the earliest issues graled with in number theory is the fact that geometric quantities are often not rational. For instance, if we take a right triangle with two side lengths

More information

THE DIOPHANTINE EQUATION x 4 +1=Dy 2

THE DIOPHANTINE EQUATION x 4 +1=Dy 2 MATHEMATICS OF COMPUTATION Volume 66, Number 9, July 997, Pages 347 35 S 005-57897)0085-X THE DIOPHANTINE EQUATION x 4 +=Dy J. H. E. COHN Abstract. An effective method is derived for solving the equation

More information

Pythagorean triples and sums of squares

Pythagorean triples and sums of squares Pythagorean triles and sums of squares Robin Chaman 16 January 2004 1 Pythagorean triles A Pythagorean trile (x, y, z) is a trile of ositive integers satisfying z 2 + y 2 = z 2. If g = gcd(x, y, z) then

More information

Small Zeros of Quadratic Forms Mod P m

Small Zeros of Quadratic Forms Mod P m International Mathematical Forum, Vol. 8, 2013, no. 8, 357-367 Small Zeros of Quadratic Forms Mod P m Ali H. Hakami Deartment of Mathematics, Faculty of Science, Jazan University P.O. Box 277, Jazan, Postal

More information

Elementary Number Theory

Elementary Number Theory Elementary Number Theory WISB321 = F.Beukers 2012 Deartment of Mathematics UU ELEMENTARY NUMBER THEORY Frits Beukers Fall semester 2013 Contents 1 Integers and the Euclidean algorithm 4 1.1 Integers................................

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

SQUAREFREE VALUES OF QUADRATIC POLYNOMIALS COURSE NOTES, 2015

SQUAREFREE VALUES OF QUADRATIC POLYNOMIALS COURSE NOTES, 2015 SQUAREFREE VALUES OF QUADRATIC POLYNOMIALS COURSE NOTES, 2015 1. Squarefree values of olynomials: History In this section we study the roblem of reresenting square-free integers by integer olynomials.

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

Diophantine Equations

Diophantine Equations Diohantine Equations Winter Semester 018/019 University of Bayreuth Michael Stoll Contents 1. Introduction and Examles 3. Aetizers 8 3. The Law of Quadratic Recirocity 1 Print version of October 5, 018,

More information

MATH 2710: NOTES FOR ANALYSIS

MATH 2710: NOTES FOR ANALYSIS MATH 270: NOTES FOR ANALYSIS The main ideas we will learn from analysis center around the idea of a limit. Limits occurs in several settings. We will start with finite limits of sequences, then cover infinite

More information

Characteristics of Fibonacci-type Sequences

Characteristics of Fibonacci-type Sequences Characteristics of Fibonacci-tye Sequences Yarden Blausa May 018 Abstract This aer resents an exloration of the Fibonacci sequence, as well as multi-nacci sequences and the Lucas sequence. We comare and

More information

RECIPROCITY LAWS JEREMY BOOHER

RECIPROCITY LAWS JEREMY BOOHER RECIPROCITY LAWS JEREMY BOOHER 1 Introduction The law of uadratic recirocity gives a beautiful descrition of which rimes are suares modulo Secial cases of this law going back to Fermat, and Euler and Legendre

More information

ARITHMETIC PROGRESSIONS OF POLYGONAL NUMBERS WITH COMMON DIFFERENCE A POLYGONAL NUMBER

ARITHMETIC PROGRESSIONS OF POLYGONAL NUMBERS WITH COMMON DIFFERENCE A POLYGONAL NUMBER #A43 INTEGERS 17 (2017) ARITHMETIC PROGRESSIONS OF POLYGONAL NUMBERS WITH COMMON DIFFERENCE A POLYGONAL NUMBER Lenny Jones Deartment of Mathematics, Shiensburg University, Shiensburg, Pennsylvania lkjone@shi.edu

More information

DISCRIMINANTS IN TOWERS

DISCRIMINANTS IN TOWERS DISCRIMINANTS IN TOWERS JOSEPH RABINOFF Let A be a Dedekind domain with fraction field F, let K/F be a finite searable extension field, and let B be the integral closure of A in K. In this note, we will

More information

PartII Number Theory

PartII Number Theory PartII Number Theory zc3 This is based on the lecture notes given by Dr.T.A.Fisher, with some other toics in number theory (ossibly not covered in the lecture). Some of the theorems here are non-examinable.

More information

MATH 152 NOTES MOOR XU NOTES FROM A COURSE BY KANNAN SOUNDARARAJAN

MATH 152 NOTES MOOR XU NOTES FROM A COURSE BY KANNAN SOUNDARARAJAN MATH 5 NOTES MOOR XU NOTES FROM A COURSE BY KANNAN SOUNDARARAJAN Abstract These notes were taken from math 5 (Elementary Theory of Numbers taught by Kannan Soundararajan in Fall 00 at Stanford University

More information

AN INTRODUCTION TO GAUSS S NUMBER THEORY. Andrew Granville

AN INTRODUCTION TO GAUSS S NUMBER THEORY. Andrew Granville AN INTRODUCTION TO GAUSS S NUMBER THEORY Andrew Granville We resent a modern introduction to number theory, aimed both at students who have little exerience of university level mathematics, as well as

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

HOMEWORK # 4 MARIA SIMBIRSKY SANDY ROGERS MATTHEW WELSH

HOMEWORK # 4 MARIA SIMBIRSKY SANDY ROGERS MATTHEW WELSH HOMEWORK # 4 MARIA SIMBIRSKY SANDY ROGERS MATTHEW WELSH 1. Section 2.1, Problems 5, 8, 28, and 48 Problem. 2.1.5 Write a single congruence that is equivalent to the air of congruences x 1 mod 4 and x 2

More information

Elementary Number Theory

Elementary Number Theory This is age i Printer: Oaque this Elementary Number Theory William Stein October 2005 ii To my students and my wife, Clarita Lefthand. Contents This is age iii Printer: Oaque this Preface 3 1 Prime Numbers

More information

An Overview of Witt Vectors

An Overview of Witt Vectors An Overview of Witt Vectors Daniel Finkel December 7, 2007 Abstract This aer offers a brief overview of the basics of Witt vectors. As an alication, we summarize work of Bartolo and Falcone to rove that

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

19th Bay Area Mathematical Olympiad. Problems and Solutions. February 28, 2017

19th Bay Area Mathematical Olympiad. Problems and Solutions. February 28, 2017 th Bay Area Mathematical Olymiad February, 07 Problems and Solutions BAMO- and BAMO- are each 5-question essay-roof exams, for middle- and high-school students, resectively. The roblems in each exam are

More information

Quadratic Reciprocity

Quadratic Reciprocity Quadratic Recirocity 5-7-011 Quadratic recirocity relates solutions to x = (mod to solutions to x = (mod, where and are distinct odd rimes. The euations are oth solvale or oth unsolvale if either or has

More information

HENSEL S LEMMA KEITH CONRAD

HENSEL S LEMMA KEITH CONRAD HENSEL S LEMMA KEITH CONRAD 1. Introduction In the -adic integers, congruences are aroximations: for a and b in Z, a b mod n is the same as a b 1/ n. Turning information modulo one ower of into similar

More information

GAUSSIAN INTEGERS HUNG HO

GAUSSIAN INTEGERS HUNG HO GAUSSIAN INTEGERS HUNG HO Abstract. We will investigate the ring of Gaussian integers Z[i] = {a + bi a, b Z}. First we will show that this ring shares an imortant roerty with the ring of integers: every

More information

The Fibonacci Quarterly 44(2006), no.2, PRIMALITY TESTS FOR NUMBERS OF THE FORM k 2 m ± 1. Zhi-Hong Sun

The Fibonacci Quarterly 44(2006), no.2, PRIMALITY TESTS FOR NUMBERS OF THE FORM k 2 m ± 1. Zhi-Hong Sun The Fibonacci Quarterly 44006, no., 11-130. PRIMALITY TESTS FOR NUMBERS OF THE FORM k m ± 1 Zhi-Hong Sun eartment of Mathematics, Huaiyin Teachers College, Huaian, Jiangsu 3001, P.R. China E-mail: zhsun@hytc.edu.cn

More information

Diophantine Equations and Congruences

Diophantine Equations and Congruences International Journal of Algebra, Vol. 1, 2007, no. 6, 293-302 Diohantine Equations and Congruences R. A. Mollin Deartment of Mathematics and Statistics University of Calgary, Calgary, Alberta, Canada,

More information

THUE-VINOGRADOV AND INTEGERS OF THE FORM x 2 + Dy 2. Contents. Introduction Study of an Elementary Proof

THUE-VINOGRADOV AND INTEGERS OF THE FORM x 2 + Dy 2. Contents. Introduction Study of an Elementary Proof THUE-VINOGRADOV AND INTEGERS OF THE FORM x 2 + Dy 2 PETE L. CLARK Contents Introduction Study of an Elementary Proof 1 1. The Lemmas of Thue and Vinogradov 4 2. Preliminaries on Quadratic Recirocity and

More information

16 The Quadratic Reciprocity Law

16 The Quadratic Reciprocity Law 16 The Quadratic Recirocity Law Fix an odd rime If is another odd rime, a fundamental uestion, as we saw in the revious section, is to know the sign, ie, whether or not is a suare mod This is a very hard

More information

The Euler Phi Function

The Euler Phi Function The Euler Phi Function 7-3-2006 An arithmetic function takes ositive integers as inuts and roduces real or comlex numbers as oututs. If f is an arithmetic function, the divisor sum Dfn) is the sum of the

More information

INTRODUCTION TO GAUSS S NUMBER THEORY. Andrew Granville

INTRODUCTION TO GAUSS S NUMBER THEORY. Andrew Granville INTRODUCTION TO GAUSS S NUMBER THEORY Andrew Granville We resent a modern introduction to number theory. There are many introductory number theory books available, mostly develoed more-or-less directly

More information

The Group of Primitive Almost Pythagorean Triples

The Group of Primitive Almost Pythagorean Triples The Grou of Primitive Almost Pythagorean Triles Nikolai A. Krylov and Lindsay M. Kulzer arxiv:1107.2860v2 [math.nt] 9 May 2012 Abstract We consider the triles of integer numbers that are solutions of the

More information

A CONCRETE EXAMPLE OF PRIME BEHAVIOR IN QUADRATIC FIELDS. 1. Abstract

A CONCRETE EXAMPLE OF PRIME BEHAVIOR IN QUADRATIC FIELDS. 1. Abstract A CONCRETE EXAMPLE OF PRIME BEHAVIOR IN QUADRATIC FIELDS CASEY BRUCK 1. Abstract The goal of this aer is to rovide a concise way for undergraduate mathematics students to learn about how rime numbers behave

More information

3 Properties of Dedekind domains

3 Properties of Dedekind domains 18.785 Number theory I Fall 2016 Lecture #3 09/15/2016 3 Proerties of Dedekind domains In the revious lecture we defined a Dedekind domain as a noetherian domain A that satisfies either of the following

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

PARTITIONS AND (2k + 1) CORES. 1. Introduction

PARTITIONS AND (2k + 1) CORES. 1. Introduction PARITY RESULTS FOR BROKEN k DIAMOND PARTITIONS AND 2k + CORES SILVIU RADU AND JAMES A. SELLERS Abstract. In this aer we rove several new arity results for broken k-diamond artitions introduced in 2007

More information

Solvability and Number of Roots of Bi-Quadratic Equations over p adic Fields

Solvability and Number of Roots of Bi-Quadratic Equations over p adic Fields Malaysian Journal of Mathematical Sciences 10(S February: 15-35 (016 Secial Issue: The 3 rd International Conference on Mathematical Alications in Engineering 014 (ICMAE 14 MALAYSIAN JOURNAL OF MATHEMATICAL

More information

arxiv: v1 [math.nt] 9 Sep 2015

arxiv: v1 [math.nt] 9 Sep 2015 REPRESENTATION OF INTEGERS BY TERNARY QUADRATIC FORMS: A GEOMETRIC APPROACH GABRIEL DURHAM arxiv:5090590v [mathnt] 9 Se 05 Abstract In957NCAnkenyrovidedanewroofofthethreesuarestheorem using geometry of

More information

#A47 INTEGERS 15 (2015) QUADRATIC DIOPHANTINE EQUATIONS WITH INFINITELY MANY SOLUTIONS IN POSITIVE INTEGERS

#A47 INTEGERS 15 (2015) QUADRATIC DIOPHANTINE EQUATIONS WITH INFINITELY MANY SOLUTIONS IN POSITIVE INTEGERS #A47 INTEGERS 15 (015) QUADRATIC DIOPHANTINE EQUATIONS WITH INFINITELY MANY SOLUTIONS IN POSITIVE INTEGERS Mihai Ciu Simion Stoilow Institute of Mathematics of the Romanian Academy, Research Unit No. 5,

More information

An Estimate For Heilbronn s Exponential Sum

An Estimate For Heilbronn s Exponential Sum An Estimate For Heilbronn s Exonential Sum D.R. Heath-Brown Magdalen College, Oxford For Heini Halberstam, on his retirement Let be a rime, and set e(x) = ex(2πix). Heilbronn s exonential sum is defined

More information

QUADRATIC RESIDUES AND DIFFERENCE SETS

QUADRATIC RESIDUES AND DIFFERENCE SETS QUADRATIC RESIDUES AND DIFFERENCE SETS VSEVOLOD F. LEV AND JACK SONN Abstract. It has been conjectured by Sárközy that with finitely many excetions, the set of quadratic residues modulo a rime cannot be

More information

A CRITERION FOR POLYNOMIALS TO BE CONGRUENT TO THE PRODUCT OF LINEAR POLYNOMIALS (mod p) ZHI-HONG SUN

A CRITERION FOR POLYNOMIALS TO BE CONGRUENT TO THE PRODUCT OF LINEAR POLYNOMIALS (mod p) ZHI-HONG SUN A CRITERION FOR POLYNOMIALS TO BE CONGRUENT TO THE PRODUCT OF LINEAR POLYNOMIALS (mod ) ZHI-HONG SUN Deartment of Mathematics, Huaiyin Teachers College, Huaian 223001, Jiangsu, P. R. China e-mail: hyzhsun@ublic.hy.js.cn

More information

When do Fibonacci invertible classes modulo M form a subgroup?

When do Fibonacci invertible classes modulo M form a subgroup? Calhoun: The NPS Institutional Archive DSace Reository Faculty and Researchers Faculty and Researchers Collection 2013 When do Fibonacci invertible classes modulo M form a subgrou? Luca, Florian Annales

More information

f(r) = a d n) d + + a0 = 0

f(r) = a d n) d + + a0 = 0 Math 400-00/Foundations of Algebra/Fall 07 Polynomials at the Foundations: Roots Next, we turn to the notion of a root of a olynomial in Q[x]. Definition 8.. r Q is a rational root of fx) Q[x] if fr) 0.

More information

Corollary 4.2 (Pepin s Test, 1877). Let F k = 2 2k + 1, the kth Fermat number, where k 1. Then F k is prime iff 3 F k 1

Corollary 4.2 (Pepin s Test, 1877). Let F k = 2 2k + 1, the kth Fermat number, where k 1. Then F k is prime iff 3 F k 1 4. Primality testing 4.1. Introduction. Factorisation is concerned with the problem of developing efficient algorithms to express a given positive integer n > 1 as a product of powers of distinct primes.

More information

arxiv: v2 [math.nt] 9 Oct 2018

arxiv: v2 [math.nt] 9 Oct 2018 ON AN EXTENSION OF ZOLOTAREV S LEMMA AND SOME PERMUTATIONS LI-YUAN WANG AND HAI-LIANG WU arxiv:1810.03006v [math.nt] 9 Oct 018 Abstract. Let be an odd rime, for each integer a with a, the famous Zolotarev

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

On generalizing happy numbers to fractional base number systems

On generalizing happy numbers to fractional base number systems On generalizing hay numbers to fractional base number systems Enriue Treviño, Mikita Zhylinski October 17, 018 Abstract Let n be a ositive integer and S (n) be the sum of the suares of its digits. It is

More information

Number Theory. Lectured by V. Neale Michaelmas Term 2011

Number Theory. Lectured by V. Neale Michaelmas Term 2011 Number Theory Lectured by V Neale Michaelmas Term 0 NUMBER THEORY C 4 lectures, Michaelmas term Page Page 5 Page Page 5 Page 9 Page 3 Page 4 Page 50 Page 54 Review from Part IA Numbers and Sets: Euclid

More information

University of Bristol - Explore Bristol Research. Peer reviewed version. Link to published version (if available): 10.

University of Bristol - Explore Bristol Research. Peer reviewed version. Link to published version (if available): 10. Booker, A. R., & Pomerance, C. (07). Squarefree smooth numbers and Euclidean rime generators. Proceedings of the American Mathematical Society, 45(), 5035-504. htts://doi.org/0.090/roc/3576 Peer reviewed

More information

A Curious Property of the Decimal Expansion of Reciprocals of Primes

A Curious Property of the Decimal Expansion of Reciprocals of Primes A Curious Proerty of the Decimal Exansion of Recirocals of Primes Amitabha Triathi January 6, 205 Abstract For rime 2, 5, the decimal exansion of / is urely eriodic. For those rime for which the length

More information