Homework until Test #2



Similar documents
CS 103X: Discrete Structures Homework Assignment 3 Solutions

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

The last three chapters introduced three major proof techniques: direct,

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

Today s Topics. Primes & Greatest Common Divisors

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

8 Primes and Modular Arithmetic

k, then n = p2α 1 1 pα k

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Every Positive Integer is the Sum of Four Squares! (and other exciting problems)

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Math 319 Problem Set #3 Solution 21 February 2002

15 Prime and Composite Numbers

SECTION 10-2 Mathematical Induction

Intermediate Math Circles March 7, 2012 Linear Diophantine Equations II

Theorem3.1.1 Thedivisionalgorithm;theorem2.2.1insection2.2 If m, n Z and n is a positive

Elementary Number Theory

Applications of Fermat s Little Theorem and Congruences

TEXAS A&M UNIVERSITY. Prime Factorization. A History and Discussion. Jason R. Prince. April 4, 2011

8 Divisibility and prime numbers

SOLUTIONS FOR PROBLEM SET 2

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

SUM OF TWO SQUARES JAHNAVI BHASKAR

MATH10040 Chapter 2: Prime and relatively prime numbers

Test1. Due Friday, March 13, 2015.

Number Theory: A Mathemythical Approach. Student Resources. Printed Version

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, Notes on Algebra

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

Lecture 13 - Basic Number Theory.

Handout NUMBER THEORY

SYSTEMS OF PYTHAGOREAN TRIPLES. Acknowledgements. I would like to thank Professor Laura Schueller for advising and guiding me

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

mod 10 = mod 10 = 49 mod 10 = 9.

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

Math 55: Discrete Mathematics

Section 4.2: The Division Algorithm and Greatest Common Divisors

MATH 537 (Number Theory) FALL 2016 TENTATIVE SYLLABUS

Chapter 11 Number Theory

Primality - Factorization

MATH 289 PROBLEM SET 4: NUMBER THEORY

Factoring Algorithms

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Chapter 3. if 2 a i then location: = i. Page 40

V Quantitative Reasoning: Computers, Number Theory and Cryptography

GCDs and Relatively Prime Numbers! CSCI 2824, Fall 2014!

GREATEST COMMON DIVISOR

CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY

RSA and Primality Testing

5544 = = = Now we have to find a divisor of 693. We can try 3, and 693 = 3 231,and we keep dividing by 3 to get: 1

Solutions for Practice problems on proofs

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

Settling a Question about Pythagorean Triples

Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures

Notes on Factoring. MA 206 Kurt Bryan

Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm

MATH 22. THE FUNDAMENTAL THEOREM of ARITHMETIC. Lecture R: 10/30/2003

Grade 6 Math Circles March 10/11, 2015 Prime Time Solutions

Continued Fractions and the Euclidean Algorithm

Solution to Exercise 2.2. Both m and n are divisible by d, som = dk and n = dk. Thus m ± n = dk ± dk = d(k ± k ),som + n and m n are divisible by d.

Lectures on Number Theory. Lars-Åke Lindahl

Some facts about polynomials modulo m (Full proof of the Fingerprinting Theorem)

Category 3 Number Theory Meet #1, October, 2000

Five fundamental operations. mathematics: addition, subtraction, multiplication, division, and modular forms

Introduction. Appendix D Mathematical Induction D1

Grade 7/8 Math Circles Fall 2012 Factors and Primes

An Introductory Course in Elementary Number Theory. Wissam Raji

Chapter 7 - Roots, Radicals, and Complex Numbers

Continued Fractions. Darren C. Collins

A Study on the Necessary Conditions for Odd Perfect Numbers

Math 3000 Section 003 Intro to Abstract Math Homework 2

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Winter Camp 2011 Polynomials Alexander Remorov. Polynomials. Alexander Remorov

PYTHAGOREAN TRIPLES KEITH CONRAD

Factoring. Factoring 1

Some practice problems for midterm 2

of Nebraska - Lincoln

On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples

Math Workshop October 2010 Fractions and Repeating Decimals

MATH 13150: Freshman Seminar Unit 10

Prime Factorization 0.1. Overcoming Math Anxiety

2 When is a 2-Digit Number the Sum of the Squares of its Digits?

Just the Factors, Ma am

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Session 6 Number Theory

The Fundamental Theorem of Arithmetic

3. Mathematical Induction

Quotient Rings and Field Extensions

minimal polyonomial Example

Integer roots of quadratic and cubic polynomials with integer coefficients

Integer Factorization using the Quadratic Sieve

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

DIVISIBILITY AND GREATEST COMMON DIVISORS

6.2 Permutations continued

Overview of Number Theory Basics. Divisibility

11 Ideals Revisiting Z

LAKE ELSINORE UNIFIED SCHOOL DISTRICT

Stanford Math Circle: Sunday, May 9, 2010 Square-Triangular Numbers, Pell s Equation, and Continued Fractions

THE CONGRUENT NUMBER PROBLEM

Transcription:

MATH31: Number Theory Homework until Test # Philipp BRAUN Section 3.1 page 43, 1. It has been conjectured that there are infinitely many primes of the form n. Exhibit five such primes. Solution. Five such primes are e.g. = 4 =, 7 = 9 = 3, 3 = 5 = 5, 47 = 49 = 7 and 79 = 81 = 9.. Give an example to show that the following conjecture is not true: Every positive integer can be written in the form p + a, where p is either a prime or 1, and a 0. Counterexample: 5. Since none of the numbers 5, 5 1 = 4, 5 = 1, 5 3 = 16, 5 4 = 9 are primes and a has to be less than 5 since 5 = 5 which forced p to be zero, there is neither a prime p such that there is a such that p + a = 5, nor there is a such that 1 + a = 5. 3. Prove each of the assertions below: (a) Any prime of the form 3n + 1 is of the form 6m + 1 (b) Each integer of the form 3n + has a prime factor of this form. (c) The only prime of the form n 3 1 is 7. (d) The only prime p for which 3p + 1 is a perfect square is p = 5. (e) The only prime of the form n 4 is 5. Proof. (a) Let p = 3n + 1 be any prime. Since p is a prime by assumption, 3n has to be even (since otherwise 3n + 1 would be even and therefore divisible by, which contradicts the assumption that p is prime), i.e. 3n. Since 3, n by Theorem 3.1 (since is a prime). That means that there is an integer m such that n = m. Therefore 3n + 1 = 3(m) + 1 = 6m + 1, as we wanted to show. (b) Let m = 3n + be any integer. If m is prime, we are done. Assume m is not a prime. Therefore there are integers a, b such that a, b > 1 and ab = 3n +. Consider the following cases: Case I : a = 3k, b = 3l for integers k, l. Then ab = 3k 3l = 3(3kl), which is of the form 3z and therefore cannot equal 3n +. Case II : a = 3k, b = 3l + 1 (or vice versa) for integers k, l. Then ab = 3k(3l + 1) = 3(3kl + k), which is also of the form 3z. Case III : a = 3k + 1, b = 3l + 1 for integers k, l. Then ab = (3k + 1)(3l + 1) = 3(3kl + k + l) + 1, which is of the form 3z + 1. 1

So none of these cases can occur, so at least one of the factors a, b has to be 3z + for an integer z. Either this factor is a prime, or we can use the same argument to show that 3z + = (3x + )y with integers x, y. Since a, b > 1, 3z + < 3n +. Thus in every step the absolute value of the factor of the form 3a + will be smaller, so the method has to terminate with a prime of that form. (c) Since n 3 1 = (n + n + 1)(n 1), (n 1) (n 3 1). So n must be less than or equal to. For n = 1 we have 1 3 1 = 0, which is not the prime. So the only prime of the form n 3 1 is 3 1 = 7. (d) Assume (3p+1) = n for a prime p and an integer n. Then p = 1 3 (n 1) = 1 3 (n+1)(n 1). Since p is a prime, 1 3 (n 1) = 1, which implies n = 4 and therefore p = 1 3 5 3 = 5. (e) Since n 4 = (n + )(n ), n has to equal 1 (because otherwise n 4 is no prime since (n ) (n 4)), i.e. n = 3, so the only prime of that form is 3 4 = 5. 4. If p 5 is a prime number, show that p + is composite. Proof. p + = (p + 1)(p 1) + 3. Since p is a prime bigger than 3, p is not divisible by 3. But since one of three consecutive numbers is divisible by three, so is either (p 1) or (p + 1). Since 3 3, by Theorem. (vii) 3 (p + 1)(p 1) + 3, so p + is divisible by 3 and therefore composite. 6. Establish each of the following statements: (a) Every integer of the form n 4 + 4, with n > 1, is composite. (b) If n > 4 is composite, then n divides (n 1)!. (c) Any integer of the form 8 n + 1, where n 1, is composite. (d) Each integer n > 11 can be written as the sum of two composite numbers. Proof. (a) n 4 + 4 = (n + n + )(n n + ), and for n > 1, each of these factors is bigger than 1, hence n 4 + 4 is composite. (b) If n > 4 is composite, then it is a square number (then n < n since n > 4, and therefore n 1... n... n... (n 1) = (n 1)!) or it can be written as a product of a prime 1 < p < n and an integer n < m < n. Since (n 1)! = 1 p... m... (n 1), pm (n 1)!, i.e. n (n 1)!. (c) 8 n + 1=( n ) 3 + 1 = ( n + 1)(( n ) ( n ) + 1). Since both factors are bigger than 1 for n 1, 8 n + 1 is not prime and therefore composite. (d) In case n > 11 is even, there is k > 5 such that n = k. Therefore n = 6 + (k 3), where 6 = 3 is a composite number and (k 3) is a composite number (since k 3 > 1 since k > 5). In case n is odd, there is k > 5 such that n = k + 1. Therefore n = 9 + (k 4), where 9 = 3 3 and (k 4) are composite numbers (since k 4 > 1 because k > 5).

Section 3. page 49, 1. Determine whether the integer 701 is prime by testing all primes p 701 as possible divisors. Do the same for integer 1009. Solution. 701 6.47, i.e. we have to test the primes, 3, 5, 7, 11, 13, 17, 19 and 3 as possible divisors of 701: 701/ = 350.5 / Z 701. 701/3 = 33.6 / Z 3 701. 701/5 = 140. / Z 5 701. 701/7 100.14 / Z 7 701. 701/11 = 63.7 / Z 11 701. 701/13 53.9 / Z 13 701. 701/17 41.4 / Z 17 701. 701/19 36.89 / Z 19 701. 701/3 30.48 / Z 3 701. Hence 701 is a prime. Since 1009 31.76, we have to test the primes, 3, 5, 7, 11, 13, 17, 19, 3, 9 and 31 as possible divisors of 1009: 1009/ = 504.5 / Z 1009. 1009/3 = 336.3 / Z 3 1009. 1009/5 = 01.8 / Z 5 1009. 1009/7 144.14 / Z 7 1009. 1009/11 = 91.7 / Z 11 1009. 1009/13 77.6 / Z 13 1009. 1009/17 59.35 / Z 17 1009. 1009/19 53.11 / Z 19 1009. 1009/3 43.87 / Z 3 1009. 1009/9 34.79 / Z 9 1009. 1009/31 3.54 / Z 31 1009. Hence 1009 is a prime.. Employing the Sieve of Eratosthenes, obtain all the primes between 100 and 00. Solution. 100 101 10 103 104 105 106 107 108 109 110 111 11 113 114 115 116 117 118 H 119 H 10 H 11 H 1 13 14 15 16 17 18 19 130 131 13 H 133 H 134 135 136 137 138 139 140 141 14 H 143 H 144 145 146 147 148 149 150 151 15 153 154 155 156 157 158 159 160 H 161 H 16 163 164 165 166 167 168 H 169 H 170 171 17 173 174 175 176 177 178 179 3

180 181 18 183 184 785 186 H 187 H 188 189 190 191 19 193 194 195 196 197 198 199 ( x means x is divisible by, 3, or 5, x A means that x is divisible by 7, 11, or 13.) Thus the primes between 100 and 00 are 101, 103, 107, 109, 113, 17, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197 and 199. 3. Given that p n for all primes p 3 n, show that n > 1 is either a prime or the product of two primes. Proof. If n was the product of three or more primes, at least one of them had to be less than or equal to 3 n. Since by assumption none of the primes p 3 n divides n, this is a contradiction. Hence n is a prime or a product of two primes. 4. Establish the following facts: (a) p is irrational for any prime p. (b) If a > 0 and n a is rational, then n a must be an integer. n (c) For n, n is irrational. Proof. (a) Assume p is rational. Then there are integers a, b with p = a b and gcd(a, b) = 1. Square the equation and multiply both sides with b to get b p = a. That means p a and since p is a prime p a by Theorem 3.1. Therefore there is an integer c such that a = cp. Applying that to our first equation, we have b p = (cp) = c p, or b = c p. That means p b, and again by Theorem 3.1 p b, so p gcd(a, b), a contradiction. (b) Assume n n a is rational, i.e. a = p pn q for relatively prime integers p, q. Then a = q. n Since p and q are relatively prime, p n and q n are relatively prime, too. That a is an integer forces q n n to be 1, so q = 1, i.e. a = p, an integer. (c) Since n > n for n, n n > n n. But n n =, so n n <. On the other hand n n > 1 since 1 n n = 1 < n. By part (b), n is either an integer or irrational, so n n has to be irrational as there is no integer between 1 and. 5. Show that any composite three-digit number must have a prime factor less than or equal to 31. Proof. Let c be any composite three-digit number. Since c is composite, there are integers a, b such that c = ab. Assume a and b are both greater than 31, i.e. at least 3. Then ab 3 3 = 5 5 = 10 = 104, which contradicts to the fact that c is a three-digit number by assumption. 4

Section 3.3 page 57, 1. Verify that the integers 1949 and 1951 are twin primes. Solution. Since 1951 44.17, we have to check if 1949 or 1951 are divisible by, 3, 5, 7, 11, 13, 17, 19, 3, 9, 31, 37, 41, or 43. Obviously, both numbers are odd and therefore not divisible by. Since the sum of the digits of 1949, 1+9+4+9=3 and the sum of the digits of 1951, 1+9+5+1=16 are both not divisible by 3, both numbers are not divisible by 3. Since both numbers do not end with 0 or 5, they are not divisible by 5. Using the same method as in exercise 1 on page 49, we have 1949/7 78.43 / Z 7 1949, 1951/7 78.71 / Z 7 1951 1949/11 = 177.18 / Z 11 1949, 1951/11 = 177.36 / Z 11 1951 1949/13 149.9 / Z 13 1949, 1951/13 150.08 / Z 13 1951 1949/17 114.65 / Z 17 1949, 1951/17 114.76 / Z 17 1951 1949/19 10.58 / Z 19 1949, 1951/19 10.68 / Z 19 1951 1949/3 84.74 / Z 3 1949, 1951/3 84.83 / Z 3 1951 1949/9 67.1 / Z 9 1949, 1951/9 67.8 / Z 9 1951 1949/31 6.87 / Z 31 1949, 1951/31 6.94 / Z 31 1951 1949/37 = 5.675 / Z 37 1949, 1951/37 = 5.79 / Z 37 1951 1949/41 = 47.53658 / Z 41 1949, 1951/41 = 47.58536 / Z 41 1951 1949/43 45.33 / Z 43 1949, 1951/43 45.37 / Z 43 1951. Therefore 1949 and 1951 both are prime. Since 1951 1949 =, they are twin primes.. (a) If 1 is added to a product of twin primes, prove that a perfect square is always obtained. (b) Show that the sum of twin primes p and p + is divisible by 1, provided that p > 3. Proof. (a) Assume p and p + are twin primes. Then their product is p(p + ) = p + p. If we add 1, we have p + p + 1, which is equal to (p + 1), which obviously is a perfect square. (b) The sum of the twin primes p and p + is p + (p + ) = p +. Since p is a prime greater than 3, p is of the form 3k + for an integer k (if it was of the form 3k, it would be divisible by 3, which contradicts the assumption that p is a prime, and if it was of the form 3k + 1, p + = 3k + 1 + = 3(k + 1) would not be a prime). So p + is of the form (3k + ) + = 6k + 4 + = 6k + 6 = 6k + 6 = 6(k + 1). Since p is a prime, k is odd (because if k is even, then so is 3k +, which contradicts that p is a prime greater than 3). Hence k + 1 is even, i.e. there is an integer n such that k + 1 = n. That means that p + = 6(k + 1) = 6 n = 1n, so the sum of the primes p and p + is divisible by 1. 3. Find all pairs of primes p and q satisfying p q = 3. Solution. Since the difference should be 3, one of the primes has to be even and the 5

other has to be odd. Since the only even prime is, the only of these pairs is p = 5 and q =. 5. In 175, Goldbach submitted the following conjecture to Euler: Every odd integer can be written in the form p + a, were p is either a prime or 1 and a 0. Show that the integer 5777 refutes this conjecture. Solution. a has to be less than or equal to 53, since 54 = 583 > 5777. The set { 5777 a 0 a 53 } = {5777 = 53 109, 5775 = 5 1155, 5769 = 3 193, 5759 = 13 443, 5745 = 5 1149, 577 = 3 1909, 5705 = 5 1141, 5679 = 3 1893, 5649 = 3 1883, 5615 = 5 113, 5577 = 3 1859, 5535 = 5 1107, 5489 = 11 499, 5439 = 3 1813, 5385 = 5 1077, 537 = 7 761, 565 = 5 1053, 5199 = 3 1733, 519 = 3 3, 5055 = 5 1011, 4977 = 3 1659, 4895 = 5 979, 4809 = 3 1603, 4719 = 3 1573, 465 = 5 95, 457 = 3 1509, 445 = 5 885, 4319 = 7 617, 409 = 3 1403, 4095 = 5 819, 3977 = 41 97, 3855 = 5 771, 379 = 3 143, 3599 = 59 61, 3465 = 5 693, 337 = 3 1109, 3185 = 5 637, 3039 = 3 1013, 889 = 3 963, 735 = 5 547, 577 = 3 859, 415 = 5 483, 49 = 13 173, 079 = 3 693, 1905 = 5 381, 177 = 11 157, 1545 = 5 309, 1359 = 3 453, 1169 = 7 167, 975 = 5 195, 777 = 7 111, 575 = 5 115, 369 = 3 13, 159 = 3 53} contains neither a prime nor 1, so 5777 cannot be written in the wanted form. 7. A conjecture of Lagrange (1775) asserts that every odd integer greater than 5 can be written as a sum p 1 + p, where p 1, p are both primes. Confirm this for all odd integers through 75. Solution. 7 = 3 +, 9 = 5 +, 11 = 7 +, 13 = 7 + 3, 15 = 5 + 5, 17 = 7 + 5, 19 = 5 + 7, 1 = 7 + 7, 3 = 13 + 5, 5 = 3 + 11, 7 = 5 + 11, 9 = 7 + 11, 31 = 5 + 13, 33 = 7 + 13, 35 = 13 + 11, 37 = 11 + 13, 39 = 13 + 13, 41 = 7 + 17, 43 = 5 + 19, 45 = 7 + 19, 47 = 13 + 17, 49 = 3 + 3, 51 = 5 + 3, 53 = 7 + 3, 55 = 17 + 19, 57 = 19 + 19, 59 = 37 + 11, 61 = 3 + 9, 63 = 5 + 9, 65 = 7 + 9, 67 = 5 + 31, 69 = 7 + 31, 71 = 13 + 9, 73 = 47 + 13, 75 = 13 + 31. 6

Sections 4.1 & 4. page 67, 1. Prove each of the following assertions: (a) If a b (mod n) and m n, then a b (mod m) (b) If a b (mod n) and c > 0, then ca cb (mod cn) (c) If a b (mod n) and the integers a, b, n are all divisible by d > 0, then a/d b/d (mod n/d) Proof. (a) a b (mod n) n (a b). Since m n, by Theorem. (iv) m (a b), or in other words a b (mod m). (b) a b (mod n) n (a b). Thus there is an integer d such that nd = a b. Multiply both sides with c to get cnd = c(a b) = ca cb. Since c > 0 and n > 0, cn > 0, and since cn (ca cb), ca cb (mod cn). (c) a b (mod n) n (a b). Therefore there is an integer c such that cn = a b. If a, b and n all are divisible by d, then cn/d = (a b)/d = a/d b/d, where cn/d, a/d, b/d all are integers. So n/d (a/d b/d). Since d > 0, n/d > 0 and therefore a/d b/d (mod n/d).. Give an example to show that a b (mod n) need not imply a b (mod n). Solution. Let a =, b = 3, n = 5. Then a = 4, b = 9, and 4 9 (mod 5) (because 9 4 = 5, where 5 is obviously a multiple of 5), but 3 (mod 5) (because 3 = 1, and 1 is not a multiple of 5). 3. If a b (mod n), prove that gcd(a, n) = gcd(b, n). Proof. a b (mod n) n (a b) there is an integer c such that cn = a b. Let d be any divisor of both a and n. Then there are integers k, l such that dk = a and dl = n, which means cdl = dk b, or in other words b = dk cdl = d(k cl), so d divides b. Especially gcd(a, n) gcd(b, n). Similarly we can show that gcd(b, n) gcd(a, n), which forces the gcd s to be equal. 4. (a) Find the remainders when 50 and 41 65 are divided by 7. (b) What is the remainder when the following sum is divided by 4? 1 5 + 5 + 3 5 + + 99 5 + 100 5 Solution. (a) 50 = ( 5) 10, and 5 3 5 (mod 7). By Theorem 4. (f), 50 5 10 (mod 7). 5 10 = ( 5 ) 5, and 5 5 4 (mod 7). Again by Theorem 4. (f), 50 4 5 (mod 7). 4 5 = ( 5 ), and 5 5 (mod 7), as we already saw. Hence 50 5 5 4 (mod 7), i.e. the remainder when dividing 50 by 7 is 4. Since 41 ( 1) (mod 7), 41 65 ( 1) 65 (mod 7) by Theorem 4. (f). Since ( 1) 65 = 1, 41 65 1 6 (mod 7), so the remainder when dividing 41 56 by 7 is 6. (b) The even numbers to the fifth power have a factor 5 and therefore are divisible by 4 (i.e. congruent 0 (mod 4)). The other numbers are alternating either congruent 1 or congruent -1, and so are their fifth powers. Since the sum of numbers is congruent to the sum of any numbers their summands are congruent to by Theorem 4. (d), 1 5 + 5 + 3 5 + 7

+ 99 5 + 100 5 1 + 0 1 + 1 + 0 0 (mod 4), i.e. the remainder when dividing the sum by 4 is 0. 5. Prove that the integer 53 103 + 103 53 is divisible by 39, and that 111 333 + 333 111 is divisible by 7. Proof. 53 103 + 103 53 ( 1) 103 + 1 53 1 + 1 0 (mod 3) (by Theorem 4. (f)), and 53 103 + 103 53 1 103 + ( 1) 53 (mod 13), so both 3 and 13 divide 53 103 + 103 53. Since 3 and 13 are relatively prime (in fact, they are both prime numbers), the fist statement is true by Collary of Theorem.4. For the second statement, note that 111 333 + 333 111 ( 1) 333 + 4 111 1 + (4 3 ) 37 1 + (64) 37 = 1 + 1 37 1 + 1 0 (mod 7). 6. For n 1, use congruence theory to establish each of the following divisibility statements: (a) 7 5 n + 3 5n. (b) 13 3 n+ + 4 n+1. (c) 7 5n+1 + 5 n+. (d) 43 6 n+ + 7 n+1. Proof. (a) For n = 1, the statement is true since 7 49 = 5 + 4 = 5 + 3 8 = 5 + 3 3. Assume the statement is true for n = k. Then 5 k + 3 5k 0 (mod 7). 5 (k+1) + 3 5(k+1) 5 5 k + 5 3 5k 5 5 k + 3 3 5k 5(5 k + 3 5k ) + 7 3 5k (mod 7). Since 5 k + 3 5k 0 (mod 7), 5(5 k + 3 5k ) 0 (mod 7) by Theorem 4. (e). Since 7 is a factor, 7 3 5k 0 (mod 7). Therefore the statement is true for n = k + 1 by Theorem 4. (d). (b) For n = 1, we have 13 91 = 7 + 64 = 3 3 + 4 3, which is true since 13 7 = 91. Assume the statement is true for n = k. Then 3 (k+1)+ + 4 (k+1)+1 3 3 k+ + 4 4 k+1 3(3 k+ + 4 k+1 ) + 13 4 k+1 (mod 13). By induction assumption, 3 k+ + 4 k+1 0 (mod 13), so 3(3 k+ + 4 k+1 ) 0 (mod 13) by Theorem 4.(e). Since 13 is a factor of 13 4 k+1, 13 4 k+1 0 (mod 13). By Theorem 4. (d), the statement is true for n = k + 1. (c) For n = 1, it is stated that 7 189 = 64 + 15 = 6 + 5 3, which is true since 7 7 = 189. Assume the statement is true for n = k. Then 5(k+1)+1 + 5 (k+1)+ 5 5k+1 + 5 5 k+ 3 5k+1 + 5 5 k+ 5( 5k+1 + 5 k+ ) + 7 5k+1 (mod 7). By assumption and since 7 is a factor of the second summand, for the same reasons as in parts (a) and (b), 5( 5k+1 + 5 k+ ) + 7 5k+1 0 (mod 7), hence the statement is true for n = k + 1. (d) Since 43 559 = 16 + 343 = 6 3 + 7 3 because 43 13 = 559, the statement is true for n = 1. Assume the statement is true for n = k. Similar to parts (a), (b) and (c), 6 (k+1)+ +7 (k+1)+1 6 6 k+ +7 7 k+1 6 6 k+ +49 7 k+1 6( 6 k+ +7 k+1 )+43 7 k+1 0 + 0 0 (mod 43), thus the statement is true for n = k + 1. 8

7. For n 1, show that ( 13) n+1 ( 13) n + ( 13) n 1 (mod 181). Proof. For n = 1, the statement is true because ( 13) 169 1 13 1 + ( 13) 0 (mod 181). Assume the statement is true for n = k. Then ( 13) (k+1)+1 ( 13) [ ( 13) k + ( 13) k 1] ( 13) k+1 + ( 13) (k+1) 1 (mod 181). 9

Section 4.3 page 73, 1. Use the binary exponentiation algorithm to compute both 19 53 (mod 503) and 141 47 (mod 1537). Solution. 19 53 = 19 3 1916 194 19, so 19 53 19 3 1916 13031 19 19 3 (194 ) 4 44 19 19 3 (44) 4 44 19 19 3 3, 748, 096 44 19 (19 16 ) 43 44 19 43 43 44 19 59049 43 44 19 (198 43) (44 19) 48114 836 39 333 406 (mod 503) 141 47 = 141 3 1418 1414 141 141, so 141 47 141 3 1418 (141 ) 19881 141 1413 1418 (1437) 1437 141 141 3 (141 4 ), 064, 969 1437 141 141 3 (778) 778 1437 141 (141 8 ) 4 60584 778 1437 141 (143) 4 143 778 1437 141 (1, 545, 049) 143 778 1437 141 364 143 778 1437 141 13496 143 778 1437 141 (314 143) (778 1437) 141 39030 1, 117, 986 141 1441 587 141 845867 141 517 141 7897 658 (mod 1537).. Prove the following statements: (a) For any integer a, the units digit of a is 0, 1, 4, 5, 6, or 9. (b) Any one of the integers 0, 1,, 3, 4, 5, 6, 7, 8, 9 can occur as units digit of a 3. (c) For any integer a, the units digit of a 4 is 0, 1, 5, or 6. (d) The units digit of a triangular number is 0, 1, 3, 5, 6, or 8. Proof. Let a be an integer. (a) By Division Algorithm, a is of the form 10k + r, where k is an integer and r {0, 1,, 9}. a = (10k + r) = 10 k + 10 r + r, and since 10 is a factor of both 10 k and 10 r, a r (mod 10). Considering the values r can have, we get: in case r = 0: a 0 0 (mod 10), in case r = 1: a 1 1 (mod 10), in case r = : a 4 (mod 10), in case r = 3: a 3 9 (mod 10), in case r = 4: a 4 16 6 (mod 10), in case r = 5: a 5 5 5 (mod 10), in case r = 6: a 6 36 6 (mod 10), in case r = 7: a 7 49 9 (mod 10), in case r = 8: a 8 64 4 (mod 10), and finally in case r = 9: a 9 81 1 (mod 10). So we see that in each case a is congruent to either 0, 1, 4, 5, 6, or 9 (mod 10), which means that one of these is the units digit of a. (b) Using the same method as in (a), we have a 3 r 3 (mod 10), because by Binomial Theorem the other summands of the binomial extension of (10k + r) 3 have a factor 10. Considering the cases, we see that in case r = 0: a 3 0 3 0 (mod 10), in case r = 1: a 3 1 3 1 (mod 10), 10

in case r = : a 3 3 8 (mod 10), in case r = 3: a 3 3 3 7 7 (mod 10), in case r = 4: a 3 4 3 64 4 (mod 10), in case r = 5: a 3 5 3 15 5 (mod 10), in case r = 6: a 3 6 3 16 6 (mod 10), in case r = 7: a 3 7 3 343 3 (mod 10), in case r = 8: a 3 8 3 51 (mod 10), and finally in case r = 9: a 3 9 3 79 9 (mod 10). So we see that each of the numbers 0, 1,, 3, 4, 5, 6, 7, 8, and 9 occur as units digit of a 3. (c) We use again the same method to obtain in case r = 0: a 4 0 4 0 (mod 10), in case r = 1: a 4 1 4 1 (mod 10), in case r = : a 4 4 16 6 (mod 10), in case r = 3: a 4 3 4 81 1 (mod 10), in case r = 4: a 4 4 4 56 6 (mod 10), in case r = 5: a 4 5 4 65 5 (mod 10), in case r = 6: a 4 6 4 196 6 (mod 10), in case r = 7: a 4 7 4 401 1 (mod 10), in case r = 8: a 4 8 4 4096 6 (mod 10), and finally in case r = 9: a 4 9 4 6561 1 (mod 10). So the only possibilities for the units digit of a 4 are 0, 1, 5, and 6. (d) Let a be a triangular number. By problem 1.(a) of section.1, there is an integer n such that a = n(n+1) = n +n. By Division Algorithm, n is of the form 10k + r, where k is an integer and r {0, 1,, 9}. So a = (10k+r) +10k+r = 10 k + 10 r+r +10k+r. Not that a multiple of 5 ends either with 0 or with 5, so 5k 0 (mod 10) or 5k 5 (mod 10). In case r = 0: a 0 +0+10k 0 + 5k (mod 10), so a {[0], [5]} in case r = 1: a 1 +1+10k 1 + 5k (mod 10), so a {[1], [6]} in case r = : a ++10k 3 + 5k (mod 10), so a {[3], [8]} in case r = 3: a 3 +3+10k 6 + 5k (mod 10), so a {[6], [1]} in case r = 4: a 4 +4+10k 10 + 5k 0 + 5k (mod 10), so a {[0], [5]} in case r = 5: a 5 +5+10k 15 + 5k 5 + 5k (mod 10), so a {[5], [0]} in case r = 6: a 6 +6+10k 1 + 5k 1 + 5k (mod 10), so a {[1], [6]} in case r = 7: a 7 +7+10k 8 + 5k 8 + 5k (mod 10), so a {[8], [3]} in case r = 8: a 8 +8+10k 36 + 5k 6 + 5k (mod 10), so a {[6], [1]}, and finally in case r = 9: a 9 +9+10k 45 + 5k 5 + 5k (mod 10), so a {[0], [5]}. In every case a is element of one of the congruence classes [0], [1], [3], [5], [6], and [8] (mod 10). This implies the statement. 11

3. Find the last two digits of the number 9 99. Solution. 9 9 (9 ) 4 9 81 4 9 1 4 9 9 (mod 10), i.e. 9 9 = 10k + 9 for an integer k, and therefore 9 9 9 = 9 10k+9. So 9 9 9 9 10k+9 9 10k 9 9 (9 10 ) k 9 9 (9 9 9) k 9 9 (mod 100). Since 9 9 9 3 9 3 9 3 79 79 79 9 9 9 841 9 41 9 1189 89 (mod 100), (9 9 9) k 9 9 (89 9) k 89 (801) k 89 1 k 89 89 (mod 100). Therefore the last two digits of 9 9 9 are 89. 4. Without performing the divisions, determine whether the integers 176,51,1 and 149,35,678 are divisible by 9 or 11. Solution. Using Theorem 4.5, we only have to check if the sum of the digits of the numbers are divisible by 9 to check divisibility by 9. 1 + 7 + 6 + 5 + + 1 + + + 1 = 7, which is divisible by 9, so 176,51,1 is divisible by 9. 1 +4+9++3+5+6+7+8 = 45, which is also divisible by 9, so 149,35,678 is divisible by 9, as well. To check divisibility by 11, we use Theorem 4.6: 1 7+6 5+ 1+ +1 = 3, which is not divisible by 11, so 176,51,1 is not divisible by 11. 1 4+9 +3 5+6 7+8 = 9, which is also not divisible by 11, so 149,35,678 is not divisible by 11. 7. Establish the following divisibility criteria: (a) An integer is divisible by if and only if its units digit is 0,, 4, 6, or 8. (b) An integer is divisible by 3 if and only if the sum of its digits is divisible by 3. (c) An integer is divisible by 4 if and only if the number formed by its tens and units digits is divisible by 4. (d) An integer is divisible by 5 if and only if its units digit is 0 or 5. Proof. (a) An integer n is divisible by if and only if there is an integer k such that n = k. Let l be that number out of k, k 1, k, k 3, and k 4 that is divisible by 5. Since l is divisible by 10, it is congruent 0 (mod 10). k is equal to one of the numbers l, l + 1, l +, l + 3, and l + 4. In case k = l, n k l 0 (mod 10), in case k = l + 1, n k (l + 1) l + (mod 10), in case k = l +, n k (l + ) l + 4 4 (mod 10), in case k = l + 3, n k (l + 3) l + 6 6 (mod 10), and finally in case k = l + 4, n k (l + 4) l + 8 8 (mod 10), so the units digit of n is one of the numbers 0,, 4, 6, and 8. Trivially, if n ends with 0,, 4, 6, or 8, it is even and therefore divisible by. (b) Let n be an integer. There are m Z, a 0, a 1,..., a m {0, 1,..., 9} such that n = 10 m a m + + 10a 1 + a 0. Let P (x) = m a k x k. Then P (10) = n and P (1) = m a m, the k=0 sum of the digits of n. Since 1 10 (mod 3), P (1) P (10) (mod 3) by Theorem 4.4, which implies the statement. (c) Let n be an integer. There are m Z, a 0, a 1,..., a m {0, 1,..., 9} such that n = 10 m a m + + 10a 1 + a 0. Since 100 = 4 5, 100 4 5 0 5 0 (mod 4). Therefore k=0 1

100 10 m 0 10 m 0 (mod 4) for any m 0; in other words 10 k 0 (mod 4), for k = m +. Therefore 10 m a m + + 10a 1 + a 0 10a 1 + a 0 (mod 4). That is why n 0 (mod 4) 10a 1 + a 0 0 (mod 4). Note that 10a 1 + a 0 is the number formed by the tens and units digits of n to obtain the statement. (d) Let n be an integer. There are m Z, a 0, a 1,..., a m {0, 1,..., 9} such that n = 10 m a m + + 10a 1 + a 0. Since 10 = 5, 10 k k 5 k 0 (mod 5), if k > 0. Hence 10 m a m + + 10a 1 + a 0 a 0 (mod 5). The statement is true since a 0 0 (mod 5) if and only if a 0 = 0 or a 0 = 5. 8. For any integer a, show that a a + 7 ends in one of the digits 3, 7, or 9. Proof. By Division Algorithm, a = 10k + r, where k is an integer and r {0, 1,..., 9}. Therefore a a + 7 = 10 k + 10 r + r 10k r + 7, which is congruent r r + 7 (mod 10). Consider the following cases: in case r = 0: a a + 7 0 0 + 7 7 (mod 10), in case r = 1: a a + 7 1 1 + 7 7 (mod 10), in case r = : a a + 7 + 7 9 (mod 10), in case r = 3: a a + 7 3 3 + 7 13 3 (mod 10), in case r = 4: a a + 7 4 4 + 7 19 9 (mod 10), in case r = 5: a a + 7 5 5 + 7 7 7 (mod 10), in case r = 6: a a + 7 6 6 + 7 37 7 (mod 10), in case r = 7: a a + 7 7 7 + 7 49 9 (mod 10), in case r = 8: a a + 7 8 8 + 7 63 3 (mod 10), and finally in case r = 9: a a + 7 9 9 + 7 79 9 (mod 10). So we see that in each case a a + 7 is in one of the congruence classes [3], [7], [9] (mod 10), and therefore ends in 3, 7, or 9. 13

Section 4.4 1. Solve the following linear congruences: (a) 5x 15 (mod 9). (b) 5x (mod 6). (c) 6x 15 (mod 1). (d) 36x 8 (mod 10). (e) 34x 60 (mod 98). (f) 140x 133 (mod 301). Solution. (a) By Theorem 4.7, 5x 15 (mod 9) has a solution since gcd(5, 9) = 1 15. The solution is [18] (mod 9), since 5 18 450 15 (mod 9). The solution is unique by Theorem 4.7. (b) Since gcd(5, 6) = 1, 5x (mod 6) has a unique solution, namely [0] (mod 6). (c) Since gcd(6, 1) = 3 15, 6x 15 (mod 1) has three solutions. By trial-and-error we get [6] (mod 1) as a solution, so by Theorem 4.7 the others are [13] (mod 1) and [0] (mod 1). (d) Since gcd(36, 10) = 6, which does not divide 8, there are no solutions. (e) Since gcd(34, 98) =, 34x 60 (mod 98) has two solutions. By trial-and-error we find [45] (mod 98) (because 34 45 1530 60 (mod 60)), so the other one is [94] (mod 98). (f) Since gcd(140, 301) = 7 by the hint, which divides 133, there are seven congruence classes which elements solve 140x 133 (mod 301). By trial-and-error, we find [16] (mod 301), because 140 16 40 133 (mod 301). By Theorem 4.7, the other solutions are [59] (mod 301), [10] (mod 301), [145] (mod 301), [188] (mod 301), [31] (mod 301), and [74] (mod 301).. Using congruences, solve the following Diophantine equations below: (a) 4x + 51y = 9. (b) 1x + 5y = 331. (c) 5x 53y = 17. Solution. (a) 4x + 51y = 9 4x 9 (mod 51). The solution of this linear congruence is [15] (mod 51), and with x = 15, we have y = 9 4 15 51 = 1 we have a solution of 4x+51y = 9. The general solution therefore is x = 15 + 51t, y = 1 4t, where t is any integer. (b) 1x + 5y = 331 1x 331 6 (mod 5). The solution of this linear congruence is [13] (mod 5). For x = 13, we have y = 331 1 13 5 = 7, so the general solution is x = 13 + 5t, y = 7 1t for any integer t. (c) 5x 53y = 17 5x 17 (mod 53). The solution of this linear congruence is (by trial-and-error) [14] (mod 53). With x = 14, we get y = 17 5 14 53 = 1, which leads to the general solution x = 14 + 53t, y = 1 + 5t, where t is an arbitrary integer. 14

4. Solve each of the following sets of simultaneous congruences: (a) x 1 (mod 3), x (mod 5), x 3 (mod 7). (b) x 5 (mod 11), x 14 (mod 9), x 15 (mod 31). (c) x 5 (mod 6), x 4 (mod 11), x 3 (mod 17). (d) x 1 (mod 5), 3x 9 (mod 6), 4x 1 (mod 7), 5x 9 (mod 11). Solution. (a) By Chinese Remainder Theorem, we have to solve 35x 1 1 (mod 3), 1x 1 (mod 5), 15x 3 1 (mod 7). Trial-and-error gives us x 1 =, x = 1, x 3 = 1, therefore x = 1 35 + 1 1 + 3 15 1 = 157 is a solution, so the solution is [5] (mod 105). (b) Solving 899x 1 1 (mod 11), 341x 1 (mod 9), 319x 3 1 (mod 31), we get x 1 = 7, x = 4, x 3 = 7, so we have x = 5 899 7 + 14 341 4 + 15 319 7 = 31465 + 19096 + 33495 = 84056, so the solution is [4944] (mod 9889). (c) Solving 187x 1 1 (mod 6), 10x 1 (mod 11), 66x 3 1 (mod 17), we get x 1 = 1, x = 4, x 3 = 8, so we have x = 5 187 1 + 4 10 4 + 3 66 8 = 935 + 163 + 1584 = 4151, so the general solution is [785] (mod 11) (d) Solving 46x 1 1 (mod 5), 385x 1 (mod 6), 330x 3 1 (mod 7), 10x 4 1 (mod 11), we get x 1 = 3, x = 1, x 3 = 1, x 4 = 1, considering that x 1 must be a multiple of, we have x 1 = 8, considering that x 3 must be a multiple of 4, we have x 3 = 8, considering that x 4 must be a multiple of 5, we have x 4 = 45, so we have x = 1 1 46 8 + 1 3 9 385 1 + 1 4 1 330 8 + 1 59 10 45 = 1848 + 1155 + 660 + 17010 = 0673, so the solution is [193] (mod 310). 5. Solve the linear congruence 17x 3 (mod 3 5 7) by solving the system 17x 3 (mod ), 17x 3 (mod 3), 17x 3 (mod 5), 17x 3 (mod 7). Solution. By Chinese Remainder Theorem, we have to solve 105x 1 1 (mod ), 70x 1 (mod 3), 4x 3 1 (mod 5), and 30x 1 1 (mod 7). By trial-and-error, one solution is x 1 = 1, x = 1, x 3 = 3, x 4 = 4. Considering that x i has to be divisible by 17, we get x 1 = 17, x = 34, x 3 = 68, x 4 = 10, from which we get x = 3 105 17 + 3 70 34 + 3 4 68 + 3 30 10 = 1 173(1785 + 380 + 856 + 3060) = 1779. Hence the solution is [99] (mod 10). 6. Find the smallest integer a > such that a, 3 a + 1, 4 a +, 5 a + 3, 6 a + 4. Solution. Since 4 a + implies a and 6 a + 4 implies 3 a + 1, we do not need these conditions. So we only have the conditions a (mod 4), a (mod 5), a (mod 6). Since 4 and 6 are not relatively prime, we cannot use the Chinese Remainder Theorem. But by trial-and-error, we get 6 as a solution. This is the smallest solution, because a (mod 6) implies that if < a < 6, a {8, 14, 0, 6, 3, 38, 44, 50, 56}, but 8 (mod 5), 14 (mod 5), 0 (mod 5), 6 (mod 5), 3 (mod 4), 38 (mod 5), 44 (mod 5), 50 (mod 5), and 56 (mod 5). 15

7. (a) Obtain three consecutive integers, each having a square factor. (b) Obtain three consecutive integers, the first of which is divisible by a square, the second by a cube, and the third by a fourth power. Solution. (a) The condition holds if a 0 (mod ), a 8 (mod 3 ), and a 3 (mod 5 ). Using the Chinese Remainder Theorem, we have x 1 = 1, x = 1, x 3 = 16 as a solution of 5x 1 1 (mod 4), 100x 1 (mod 9), 36x 3 1 (mod 5). Therefore x = 8 100 1 + 3 36 16 = 800 + 1348 = 14048 is a solution, i.e. [548] (mod 900) is the general solution, therefore 548 = 137, 549 = 3 61, 550 = 5 are three such integers. (b) Similarly to part (a), we get x 1 = 18, x = 16, x 3 = 11 as a solution of 43x 1 1 (mod 5), 400x 1 (mod 7), 675x 3 1 (mod 16). Therefore x = 6 400 16 + 14 675 11 = 166400+103950 = 70350, and the general the solution is [350] (mod 10800), and the three integers could e.g. be 350 = 5 14, 351 = 3 3 39, 35 = 4. 8. (Brahmagupta, 7th century A.D.) When eggs in a basket are removed, 3, 4, 5, 6 at a time there remain, respectively, 1,, 3, 4, 5 eggs. When they are taken out 7 at a time, none are left over. Find the smallest number of eggs that could have been contained in the basket. Solution. Let x be the number off eggs. We know that x 1 (mod ), x (mod 3), x 3 (mod 4), x 4 (mod 5), x 5 (mod 6), x 0 (mod 7), which is equal to x 4 (mod 5), x 11 (mod 1), x 0 (mod 7). To solve this, we use the Chinese Remainder Theorem: 84x 1 1 (mod 5), 35x 1 (mod 1), 60x 3 1 (mod 7), so x 1 = 4, x = 11, x 3 =, thus x = 4 84 4 + 11 35 11 = 1344 + 435 = 5579, and the general solution is [119] (mod 40). The smallest number of eggs is 119. 16