8 Divisibility and prime numbers

Save this PDF as:

Size: px
Start display at page:

Transcription

1 8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express the same idea. Given any two integers x and y we say that x is a multiple of y, if x = yq for some q Z. We also say that y is a divisor or factor of x, that y divides x, and that x is divisible by y. All these statements are expressed by the notation y x. For example, each of the following statements is true: 17 51, 17 51, 17 51, Contents 8.1 Divisibility Quotient and remainder Representation of integers The greatest common divisor Prime numbers Existence and uniqueness of prime factorization Miscellaneous Exercises 73 Exercises Prove that x 0 for every x Z, but 0 x only when x = 0. 2 Show that if c a and c b, then c xa + yb for any integers x, y. 3 Prove that if x and y are non-zero integers such that x y and y x then either x = y or x = y. [Hint: you may assume that if a and b are integers such that ab = 1 then a = b = 1 or a = b = 1. But how would you prove this?] 8.2 Quotient and remainder Given integers x and y it often happens that y does not divide x, which we can write as y x. For example, 6 does not divide 27 exactly. But as children we are taught that 6 does go into 27 four times with three left over. That is, / 27 = The number 4 is called the quotient and 3 is called the remainder. The important point is that the remainder must be less than 6. It is also true that, for instance 27 = , but we are told that we must take the least value, so that the amount left over is as small as possible.

2 66 Divisibility and prime numbers Since the number 0 must be allowed as a remainder (why?), we shall state the general result in terms of the set N 0 = N {0}. Theorem 8.2 that Given positive integers a and b there exist q and r in N 0 such a = bq + r and 0 r < b. Proof The set of remainders is R = {x N 0 a = by + x for some y N 0 }. Now, R is not empty because the identity a = b0 + a shows that a R. Thus R is a non-empty subset of N 0, and so it has a least member r. Specifically, since r is in R it follows that a = bq + r for some q in N 0. It remains to show that r < b. Observe that a = bq + r a = b(q + 1) + (r b), so that if r b then r b is in R. But r b is less than r, contrary to the definition of r as the least member of R. Since the assumption r b leads to this contradiction we must have r < b, as required. The remainder r defined by the theorem is unique, because it is the least member of R, and if a set of integers has a least member, then it is unique (Ex ). It follows that the quotient q is also unique (Ex ). Exercises Find the quotient q and remainder r when (i) a = 1001, b = 11; (ii) a = 12345, b = Show that, under the conditions of the theorem, if a = bq + r and a = bq + r, then q = q. 8.3 Representation of integers An important consequence of the theorem on quotient and remainder is that it justifies the usual notation for integers. (This is comforting, because we have been using the notation throughout the book.) Let t 2 be a positive integer, called the base. For any positive integer x we have, by repeated application of the theorem, x = tq 0 + r 0 q 0 = tq 1 + r 1... q n 2 = tq n 1 + r n 1 q n 1 = tq n + r n. Here each remainder is r i, is one of the integers 0, 1,..., t 1, and we stop when q n = 0. Eliminating the quotients q i we obtain

3 8.4 The greatest common divisor 67 x = r n t n + r n 1 t n r 1 t + r 0. We have represented x (with respect to the base t) by the sequence of remainders, and we write x = (r n r n 1... r 1 r 0 ) t. Conventionally, t = 10 is the base for calculations carried out by hand, and we omit the subscript, so we have the familiar notation 1984 = ( ) + ( ) + (8 10) + 4. This positional notation requires symbols only for the integers 0, 1,..., t 1. When t = 2 it is particularly suited for machine calculations, since the symbols 0 and 1 can be represented physically by the absence or presence of a pulse of electricity or light. Example What is the representation in base 2 of (109) 10? Solution Dividing repeatedly by 2 we obtain 109 = = = = = = = Hence (109) 10 = ( ) 2. Exercises Find the representations of (1985) 10 in base 2, in base 5, and in base Find the decimal (base 10) representations of (i) ( ) 2 ; (ii) (4165) The greatest common divisor According to the definition given in Section 8.1, the set D m of divisors of a positive integer m contains both positive and negative integers. For example, D 12 = { 12, 6, 4, 3, 2, 1, 1, 2, 3, 4, 6, 12}. Given two positive integers a, b we say that D a D b is the set of common divisors of a and b. The set D a D b is not empty, because it contains 1. Also, any

4 68 Divisibility and prime numbers common divisor c satisfies c a and c b, so the set has a greatest member. This justifies the following definition. Definition If a and b are positive integers (or zero) we say that d is the greatest common divisor (gcd) of a and b provided that (i) d a and d b; (ii) if c a and c b, then c d. In other words, d is the greatest member of the set D a D b. For example, if a = 63 and b = 35, D 63 = { 63, 21, 9, 7, 3, 1, 1, 3, 7, 9, 21, 63}, D 35 = { 35, 7, 5, 1, 1, 5, 7, 35}. So the greatest common divisor of 63 and 35 is 7. We write gcd(63, 35) = 7. Note that every integer divides 0, so gcd(a, 0) = a. There is a very famous method for calculating the gcd of two given numbers, based on the quotient and remainder technique. It depends on the fact that a = bq + r = gcd(a, b) = gcd(b, r). In order to prove this, observe that if d divides a and b then it surely divides a bq; and a bq = r, so d divides r. Thus any common divisor of a and b is also a common divisor of b and r. Conversely, if d divides b and r it also divides a = bq + r. So D a D b = D b D r, and the greatest members of these sets are the same. Repeated application of this simple fact is the basis of the Euclidean algorithm for calculating the gcd. Example Find the gcd of 2406 and 654. Solution We have 2406 = , gcd(2406, 654) = gcd(654, 444) 654 = , = gcd(444, 210) 444 = , = gcd(210, 24) 210 = , = gcd(24, 18) 24 = , = gcd(16, 6) 18 = 6 3. = gcd(6, 0) = 6. In general, in order to calculate the gcd of integers a and b (both 0) we define q i and r i recursively by the equations

5 8.4 The greatest common divisor 69 a = bq 1 + r 1 (0 r 1 < b) b = r 1 q 2 + r 2 (0 r 2 < r 1 ) r 1 = r 2 q 3 + r 3 (0 r 3 < r 2 ).... It is clear that the process must stop eventually, since each remainder r i is strictly less than the preceding one. So the final steps are as follows: r k 4 = r k 3 q k 2 + r k 2 (0 r k 2 < r k 3 ) r k 3 = r k 2 q k 1 + r k 1 (0 r k 1 < r k 2 ) r k 2 = r k 1 q k. In the last line, the term r k is omitted, because it is zero, and the required gcd is r k 1. As well as being extremely useful in practice, this technique has important theoretical consequences. Theorem 8.4 Let a and b be positive integers, and let d = gcd(a, b). Then there are integers m and n such that d = ma + nb. Proof According to the calculation given above d = r k 1, and using the penultimate equation we have r k 1 = r k 3 r k 2 q k 1. Thus d can be written in the form m r k 2 +n r k 3, where m = q k 1 and n = 1. Substituting for r k 2 in terms of r k 3 and r k 4, we obtain d = m (r k 4 r k 3 q k 2 ) + n r k 3 which can be written in the form m r k 3 + n r k 4, with m = n m q k 2 and n = m. Continuing in this way we eventually obtain an expression for d in the required form. For example, from the calculation used to find the gcd of 2406 and 654 we obtain 6 = = ( 1) 18 = 24 + ( 1) ( ) = ( 1) = ( ) = ( 19) 210 = ( 19) ( ) = ( 19) = ( 19) ( ) = ( 103) 654. Thus the required expression d = ma + nb is 6 = ( 103) 654.

6 70 Divisibility and prime numbers Definition If gcd(a, b) = 1 then we say that a and b are coprime. In this case the Theorem asserts that there are integers m and n such that ma + nb = 1. This is a very useful fact. We shall use it in Section 8.6 to prove one of the most important theorems in the whole of mathematics. It also has simple consequences. Example You are given an unlimited supply of water, a large container, and two jugs whose capacities are 7 litres and 9 litres. How would you put one litre of water in the container? Solution The key is the fact that gcd(9, 7) = 1. It follows that there are integers m, n such that 9m + 7n = 1. In fact, we can take m = 4, n = 5. So, using the larger jug, we put four jugfuls of water in the container; then, using the smaller jug, we scoop out five jugfuls. Obviously, a similar method works whenever the capacities of the jugs are coprime. Exercises Find the gcd of 721 and 448 and express it in the form 721m + 448n with m, n Z. 2 Show that if there are integers m and n such that mu + nv = 1, then gcd(u, v) = 1. 3 Let a and b be positive integers and let d = gcd(a, b). Prove that there are integers x and y which satisfy the equation ax + by = c if and only if d c. 4 Find integers x and y satisfying 966x + 686y = Prime numbers Definition A positive integer p is a prime if p 2 and the only positive integers which divide p are 1 and p itself. We have already used this definition on several occasions. For example, the primes less than 100 are shown in Fig Note that, according to the definition 1 is not a prime number. If m 2 is not a prime then m = rs, where r and s are integers strictly between 1 and m; if this holds we say that m is composite. In elementary arithmetic a standard exercise is to factorize a given positive integer. For example, 825 = You may recall finding the prime factorization is not always as easy as this example might suggest. Even a relatively small number like 1807 presents some difficulty, and a number such as is really quite hard (Ex ). Some of the practical difficulties are illustrated in the Exercises below.

7 8.6 Existence and uniqueness of prime factorization 71 Exercises Find all the primes p in the range 100 p Show that is not a prime. In fact, there is a number N such that = 3 3 N. Find N and show that it is not a prime. 3 Show that if p and p are primes, and p p, then p = p. 8.6 Existence and uniqueness of prime factorization Given any natural number n > 1, there is a prime factorization of n. This is a consequence of the following general argument. It is based on a fundamental property of natural numbers (Section 4.7): if there is a natural number with a certain property, then there is a least one. Suppose there is a bad natural number (a number greater than 1 that cannot be expressed as a product of primes). Then there is a least one, m. Now m cannot be a prime p, because if so we have the trivial factorization m = p. So m = rs where 1 < r < m and 1 < s < m. Since m is the least bad number, both r and s do have factorizations. But in that case the equation m = rs yields an expression for m as a product of primes, contradicting the fact that m is bad. Hence there are no bad numbers. We now turn to the question of uniqueness. If we are asked to factorize 990, we might proceed as follows: 990 = = =.... On the other hand, we might start in a different way: 990 = = =.... You are probably confident that the answers will be the same, although possibly the order of the factors will differ. However, this fact must be proved. A good way to understand what might go wrong is to think in terms of larger numbers, such as the numbers x and y defined below: x = , y = Here x and y are products of prime numbers, and in this case they are close but not equal. But is it true that one product of primes can never be equal to another one? In this section we prove that there is a unique prime factorization for any integer greater than 1. The key step is the following result. Theorem If p is a prime and x 1, x 2,..., x n are any integers such that p x 1 x 2... x n then p x i for some x i (1 i n). Proof We use the principle of induction. The result is plainly true when n = 1 but, for reasons that will appear, it is convenient to start by proving the case n = 2.

8 72 Divisibility and prime numbers Suppose then that p x 1 x 2. We shall prove that if p does not divide x 1 then p must divide x 2. Now, if p does not divide x 1 then (since 1 and p are the only positive divisors of p) we must have gcd(p, x 1 ) = 1. From Theorem 8.4 there are integers r and s such that rp + sx 1 = 1. Hence x 2 = (rp + sx 1 )x 2 = (rx 2 )p + s(x 1 x 2 ). Since p divides both terms it follows that p x 2, as required. Suppose the result holds when n = k, and consider the case n = k + 1, that is, when p is a divisor of a product x 1 x 2... x k x k+1. Define X = x 1 x 2... x k, so that p Xx k+1. If p X then, by the induction hypothesis, p x i for some x i in the range 1 i k. On the other hand, if p does not divide X, then by the result for the case n = 2, we must have p x k+1. Thus the induction step is done, and the result holds for all n. A very common error is to assume that the theorem remains true when the prime p is replaced by any positive integer. But that is clearly absurd: for example 3 8 = 24 and 6 24 but 6 / 3 and 6 Examples such as this show that the theorem expresses a significant property of primes, not shared by non-primes. Indeed, this property plays a crucial part in our main result. Theorem (The Fundamental Theorem of Arithmetic) A positive integer n 2 has a unique prime factorization, apart from the order of the factors. Proof If there is a number for which the theorem is false, then there is a least one N. That is, N = p 1 p 2... p k and N = q 1 q 2... q l, where the p i (1 i k) are primes, not necessarily distinct, and the q j (1 j l) are primes, not necessarily distinct. Write / 8. N = p 1 N, where N = p 2... p k. Since p 1 N, and N = q 1 q 2... q l it follows from the previous theorem that p 1 divides one of these factors, say q j. In fact, since q j is a prime, p 1 = q j (Ex ). Thus we can cancel the equal terms p 1 and q j from the two expressions for N, obtaining N = p 2...p k = q 1 q 2...q j 1 q j+1...q l. So N has two prime factorizations. But N < N, so the factorizations must be the same, apart from the order of the factors. If we now re-introduce the (equal) factors p 1 and q j, we conclude that the original factorizations of N must be the same, apart from the order of the factors. This contradicts the definition of N. Hence there can be no such N, and the theorem is true for all n 2.

9 8.7 Miscellaneous Exercises 73 We often collect equal primes in the factorization of n and write n = p e 1 1 pe pe r r, where p 1, p 2,..., p r are distinct primes and e 1, e 2,..., e r are positive integers. For example, 7000 = Exercises Find the prime factorizations of 201, 1001, and Find the prime factorization of Show that if n 2 and n is not a prime then there is a prime p such that p n and p 2 n. Hence show that if 467 were not a prime then it would have a prime divisor p 19. Deduce that 467 is a prime. 4 Suppose that we wish to test whether the number is a prime, by checking all possible prime divisors up to a certain number X. On the basis of Ex. 3, what value of X (approximately) is sufficient? 5 Let H be the set {4n + 1 n N {0}} = {1, 5, 9, 13,... }. Show that H is closed under multiplication; in other words, that the product of two members of H is also in H. A member of H (other than 1) that is not the product of two members of H other than 1 and itself is called an H- prime. Find three distinct H-primes a, b and c such that 441 = ab = c 2. Is it true that every element of H has a factorization into H-primes? Is it true that every element of H has a unique factorization into H-primes? Explain why the proof that every integer has a unique prime factorization does not work in this situation. 8.7 Miscellaneous Exercises 1 Find the gcd of 1320 and 714, and express the result in the form 1320x + 714y (x, y Z). 2 Show that 725 and 441 are co-primes and hence find integers x and y such that 725x + 441y = 1. 3 Find a solution in integers to the equation 325x + 26y = Let gcd(a, b) = d and a = da, b = db. Show that gcd (a, b ) = 1. 5 The Fibonacci number f n is defined recursively by the equations f 1 = 1, f 2 = 1, f n+1 = f n + f n 1 (n 2). Prove that gcd(f n+1, f n ) = 1 for all n 1. 6 Show that gcd(f n+2, f n ) = 1, and { 2 if n 0 mod 3; gcd(f n+3, f n )) = 1 otherwise. { 3 if n 0 mod 4; gcd(f n+4, f n ) = 1 otherwise. 7 Is it true that the gcd of any two Fibonacci numbers is another Fibonacci number? 8 Let a and b be any two positive integers. Define the least common multiple of a and b to be the positive integer l that satisfies l gcd(a, b) = ab. Explain why this definition works and show that (i) a l and b l; (ii) if m is a positive integer such that a m and b m, then l m. 9 Establish the following properties of the gcd. (i) gcd(ma, mb) = m gcd(a, b). (ii) If gcd(a, x) = d, and gcd(b, x) = 1, then gcd(ab, x) = d. 10 By following the outline of the definition of gcd(a, b), frame a definition of the gcd of n integers a 1, a 2,..., a n. Prove that if d = gcd(a 1, a 2,..., a n ) then there are integers x 1, x 2,..., x n such that d = x 1 a 1 + x 2 a x n a n.

10 74 Divisibility and prime numbers 11 Define a relation R on the set of positive integers by the rule arb gcd(a, b) > 1. Is R reflexive? Is R symmetric? Is R transitive? 12 Prove that there are no integers x, y, z, t for which x 2 + y 2 3z 2 3t 2 = Prove that if gcd(x, y) = 1, and xy = z 2 for some integer z, then x = n 2 and y = m 2 for some integers m and n. 14 Show that if gcd(a, b) = 1 then gcd(a + b, a b) is either 1 or Suppose we have a set of n weights, with mass 1, 2, 4,..., 2 n 1 grams. Show that it is possible to balance any object whose mass is an integral number of grams in the range from 1 to 2 n 1 grams, and that no other set of n weights will do this. 16 Let n be a positive integer with the following properties: (i) the prime factorization of n has no repeated factors; (ii) for all primes p, p n if and only if (p 1) n. Prove that n = 1806.

Theorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that. a = bq + r and 0 r < b.

Theorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that a = bq + r and 0 r < b. We re dividing a by b: q is the quotient and r is the remainder,

CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

12 Greatest Common Divisors. The Euclidean Algorithm

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan 12 Greatest Common Divisors. The Euclidean Algorithm As mentioned at the end of the previous section, we would like to

4. Number Theory (Part 2)

4. Number Theory (Part 2) Terence Sim Mathematics is the queen of the sciences and number theory is the queen of mathematics. Reading Sections 4.8, 5.2 5.4 of Epp. Carl Friedrich Gauss, 1777 1855 4.3.

Section 4.2: The Division Algorithm and Greatest Common Divisors

Section 4.2: The Division Algorithm and Greatest Common Divisors The Division Algorithm The Division Algorithm is merely long division restated as an equation. For example, the division 29 r. 20 32 948

Elementary Number Theory We begin with a bit of elementary number theory, which is concerned

CONSTRUCTION OF THE FINITE FIELDS Z p S. R. DOTY Elementary Number Theory We begin with a bit of elementary number theory, which is concerned solely with questions about the set of integers Z = {0, ±1,

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

MTHSC 412 Section 2.4 Prime Factors and Greatest Common Divisor Greatest Common Divisor Definition Suppose that a, b Z. Then we say that d Z is a greatest common divisor (gcd) of a and b if the following

8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

Mathematical induction & Recursion

CS 441 Discrete Mathematics for CS Lecture 15 Mathematical induction & Recursion Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Proofs Basic proof methods: Direct, Indirect, Contradiction, By Cases,

Today s Topics. Primes & Greatest Common Divisors

Today s Topics Primes & Greatest Common Divisors Prime representations Important theorems about primality Greatest Common Divisors Least Common Multiples Euclid s algorithm Once and for all, what are prime

CLASS 3, GIVEN ON 9/27/2010, FOR MATH 25, FALL 2010

CLASS 3, GIVEN ON 9/27/2010, FOR MATH 25, FALL 2010 1. Greatest common divisor Suppose a, b are two integers. If another integer d satisfies d a, d b, we call d a common divisor of a, b. Notice that as

2 The Euclidean algorithm

2 The Euclidean algorithm Do you understand the number 5? 6? 7? At some point our level of comfort with individual numbers goes down as the numbers get large For some it may be at 43, for others, 4 In

Algebra for Digital Communication

EPFL - Section de Mathématiques Algebra for Digital Communication Fall semester 2008 Solutions for exercise sheet 1 Exercise 1. i) We will do a proof by contradiction. Suppose 2 a 2 but 2 a. We will obtain

1 Die hard, once and for all

ENGG 2440A: Discrete Mathematics for Engineers Lecture 4 The Chinese University of Hong Kong, Fall 2014 6 and 7 October 2014 Number theory is the branch of mathematics that studies properties of the integers.

Prime Numbers. Chapter Primes and Composites

Chapter 2 Prime Numbers The term factoring or factorization refers to the process of expressing an integer as the product of two or more integers in a nontrivial way, e.g., 42 = 6 7. Prime numbers are

Chapter 6. Number Theory. 6.1 The Division Algorithm

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

Further linear algebra. Chapter I. Integers.

Further linear algebra. Chapter I. Integers. Andrei Yafaev Number theory is the theory of Z = {0, ±1, ±2,...}. 1 Euclid s algorithm, Bézout s identity and the greatest common divisor. We say that a Z divides

a = bq + r where 0 r < b.

Lecture 5: Euclid s algorithm Introduction The fundamental arithmetic operations are addition, subtraction, multiplication and division. But there is a fifth operation which I would argue is just as fundamental

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

CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

Solutions to Homework Set 3 (Solutions to Homework Problems from Chapter 2)

Solutions to Homework Set 3 (Solutions to Homework Problems from Chapter 2) Problems from 21 211 Prove that a b (mod n) if and only if a and b leave the same remainder when divided by n Proof Suppose a

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

Induction. Mathematical Induction. Induction. Induction. Induction. Induction. 29 Sept 2015

Mathematical If we have a propositional function P(n), and we want to prove that P(n) is true for any natural number n, we do the following: Show that P(0) is true. (basis step) We could also start at

Course notes on Number Theory

Course notes on Number Theory In Number Theory, we make the decision to work entirely with whole numbers. There are many reasons for this besides just mathematical interest, not the least of which is that

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

The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,

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

CHAPTER 7 Proving Non-Conditional Statements The last three chapters introduced three major proof techniques: direct, contrapositive and contradiction. These three techniques are used to prove statements

Practice Problems for First Test

Mathematicians have tried in vain to this day to discover some order in the sequence of prime numbers, and we have reason to believe that it is a mystery into which the human mind will never penetrate.-

3. Applications of Number Theory

3. APPLICATIONS OF NUMBER THEORY 163 3. Applications of Number Theory 3.1. Representation of Integers. Theorem 3.1.1. Given an integer b > 1, every positive integer n can be expresses uniquely as n = a

GREATEST COMMON DIVISOR

DEFINITION: GREATEST COMMON DIVISOR The greatest common divisor (gcd) of a and b, denoted by (a, b), is the largest common divisor of integers a and b. THEOREM: If a and b are nonzero integers, then their

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

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 5 Modular Arithmetic One way to think of modular arithmetic is that it limits numbers to a predefined range {0,1,...,N

It is time to prove some theorems. There are various strategies for doing

CHAPTER 4 Direct Proof It is time to prove some theorems. There are various strategies for doing this; we now examine the most straightforward approach, a technique called direct proof. As we begin, it

MODULAR ARITHMETIC. a smallest member. It is equivalent to the Principle of Mathematical Induction.

MODULAR ARITHMETIC 1 Working With Integers The usual arithmetic operations of addition, subtraction and multiplication can be performed on integers, and the result is always another integer Division, on

This section demonstrates some different techniques of proving some general statements.

Section 4. Number Theory 4.. Introduction This section demonstrates some different techniques of proving some general statements. Examples: Prove that the sum of any two odd numbers is even. Firstly you

Definition 1 Let a and b be positive integers. A linear combination of a and b is any number n = ax + by, (1) where x and y are whole numbers.

Greatest Common Divisors and Linear Combinations Let a and b be positive integers The greatest common divisor of a and b ( gcd(a, b) ) has a close and very useful connection to things called linear combinations

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

Homework 5 Solutions

Homework 5 Solutions 4.2: 2: a. 321 = 256 + 64 + 1 = (01000001) 2 b. 1023 = 512 + 256 + 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = (1111111111) 2. Note that this is 1 less than the next power of 2, 1024, which

CHAPTER 5: MODULAR ARITHMETIC

CHAPTER 5: MODULAR ARITHMETIC LECTURE NOTES FOR MATH 378 (CSUSM, SPRING 2009). WAYNE AITKEN 1. Introduction In this chapter we will consider congruence modulo m, and explore the associated arithmetic called

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof. Harper Langston New York University

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof Harper Langston New York University Proof and Counterexample Discovery and proof Even and odd numbers number n from Z is called

MATH 289 PROBLEM SET 4: NUMBER THEORY

MATH 289 PROBLEM SET 4: NUMBER THEORY 1. The greatest common divisor If d and n are integers, then we say that d divides n if and only if there exists an integer q such that n = qd. Notice that if d divides

Induction and Recursion

Induction and Recursion Winter 2010 Mathematical Induction Mathematical Induction Principle (of Mathematical Induction) Suppose you want to prove that a statement about an integer n is true for every positive

MATH10040 Chapter 2: Prime and relatively prime numbers

MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive

Algebraic Systems, Fall 2013, September 1, 2013 Edition. Todd Cochrane

Algebraic Systems, Fall 2013, September 1, 2013 Edition Todd Cochrane Contents Notation 5 Chapter 0. Axioms for the set of Integers Z. 7 Chapter 1. Algebraic Properties of the Integers 9 1.1. Background

INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS

INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS STEVEN HEILMAN Contents 1. Homework 1 1 2. Homework 2 6 3. Homework 3 10 4. Homework 4 16 5. Homework 5 19 6. Homework 6 21 7. Homework 7 25 8. Homework 8 28

Mathematical Induction

Mathematical Induction Victor Adamchik Fall of 2005 Lecture 2 (out of three) Plan 1. Strong Induction 2. Faulty Inductions 3. Induction and the Least Element Principal Strong Induction Fibonacci Numbers

Chapter 6 Finite sets and infinite sets. Copyright 2013, 2005, 2001 Pearson Education, Inc. Section 3.1, Slide 1

Chapter 6 Finite sets and infinite sets Copyright 013, 005, 001 Pearson Education, Inc. Section 3.1, Slide 1 Section 6. PROPERTIES OF THE NATURE NUMBERS 013 Pearson Education, Inc.1 Slide Recall that denotes

b) Find smallest a > 0 such that 2 a 1 (mod 341). Solution: a) Use succesive squarings. We have 85 =

Problem 1. Prove that a b (mod c) if and only if a and b give the same remainders upon division by c. Solution: Let r a, r b be the remainders of a, b upon division by c respectively. Thus a r a (mod c)

Quotient Rings and Field Extensions

Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

26 Integers: Multiplication, Division, and Order

26 Integers: Multiplication, Division, and Order Integer multiplication and division are extensions of whole number multiplication and division. In multiplying and dividing integers, the one new issue

Problem Set 5. AABB = 11k = (10 + 1)k = (10 + 1)XY Z = XY Z0 + XY Z XYZ0 + XYZ AABB

Problem Set 5 1. (a) Four-digit number S = aabb is a square. Find it; (hint: 11 is a factor of S) (b) If n is a sum of two square, so is 2n. (Frank) Solution: (a) Since (A + B) (A + B) = 0, and 11 0, 11

APPLICATIONS OF THE ORDER FUNCTION

APPLICATIONS OF THE ORDER FUNCTION LECTURE NOTES: MATH 432, CSUSM, SPRING 2009. PROF. WAYNE AITKEN In this lecture we will explore several applications of order functions including formulas for GCDs and

Mathematical Induction

Mathematical S 0 S 1 S 2 S 3 S 4 S 5 S 6 S 7 S 8 S 9 S 10 Like dominoes! Mathematical S 0 S 1 S 2 S 3 S4 S 5 S 6 S 7 S 8 S 9 S 10 Like dominoes! S 4 Mathematical S 0 S 1 S 2 S 3 S5 S 6 S 7 S 8 S 9 S 10

CONTENTS 1. Peter Kahn. Spring 2007

CONTENTS 1 MATH 304: CONSTRUCTING THE REAL NUMBERS Peter Kahn Spring 2007 Contents 2 The Integers 1 2.1 The basic construction.......................... 1 2.2 Adding integers..............................

Intermediate Math Circles March 7, 2012 Linear Diophantine Equations II

Intermediate Math Circles March 7, 2012 Linear Diophantine Equations II Last week: How to find one solution to a linear Diophantine equation This week: How to find all solutions to a linear Diophantine

3. Mathematical Induction

3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

SUM OF TWO SQUARES JAHNAVI BHASKAR

SUM OF TWO SQUARES JAHNAVI BHASKAR Abstract. I will investigate which numbers can be written as the sum of two squares and in how many ways, providing enough basic number theory so even the unacquainted

Handout NUMBER THEORY

Handout of NUMBER THEORY by Kus Prihantoso Krisnawan MATHEMATICS DEPARTMENT FACULTY OF MATHEMATICS AND NATURAL SCIENCES YOGYAKARTA STATE UNIVERSITY 2012 Contents Contents i 1 Some Preliminary Considerations

Homework until Test #2

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

9. The Pails of Water Problem

9. The Pails of Water Problem You have a 5 and a 7 quart pail. How can you measure exactly 1 quart of water, by pouring water back and forth between the two pails? You are allowed to fill and empty each

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

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

Chapter Two. Number Theory

Chapter Two Number Theory 2.1 INTRODUCTION Number theory is that area of mathematics dealing with the properties of the integers under the ordinary operations of addition, subtraction, multiplication and

Subsets of Euclidean domains possessing a unique division algorithm

Subsets of Euclidean domains possessing a unique division algorithm Andrew D. Lewis 2009/03/16 Abstract Subsets of a Euclidean domain are characterised with the following objectives: (1) ensuring uniqueness

3. Recurrence Recursive Definitions. To construct a recursively defined function:

3. RECURRENCE 10 3. Recurrence 3.1. Recursive Definitions. To construct a recursively defined function: 1. Initial Condition(s) (or basis): Prescribe initial value(s) of the function.. Recursion: Use a

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

10 k + pm pm. 10 n p q = 2n 5 n p 2 a 5 b q = p

Week 7 Summary Lecture 13 Suppose that p and q are integers with gcd(p, q) = 1 (so that the fraction p/q is in its lowest terms) and 0 < p < q (so that 0 < p/q < 1), and suppose that q is not divisible

The Laws of Cryptography Cryptographers Favorite Algorithms

2 The Laws of Cryptography Cryptographers Favorite Algorithms 2.1 The Extended Euclidean Algorithm. The previous section introduced the field known as the integers mod p, denoted or. Most of the field

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. We begin by defining the ring of polynomials with coefficients in a ring R. After some preliminary results, we specialize

Course Notes for Math 320: Fundamentals of Mathematics Chapter 3: Induction.

Course Notes for Math 320: Fundamentals of Mathematics Chapter 3: Induction. February 21, 2006 1 Proof by Induction Definition 1.1. A subset S of the natural numbers is said to be inductive if n S we have

Mathematics of Cryptography

CHAPTER 2 Mathematics of Cryptography Part I: Modular Arithmetic, Congruence, and Matrices Objectives This chapter is intended to prepare the reader for the next few chapters in cryptography. The chapter

Elementary Number Theory

Elementary Number Theory A revision by Jim Hefferon, St Michael s College, 2003-Dec of notes by W. Edwin Clark, University of South Florida, 2002-Dec L A TEX source compiled on January 5, 2004 by Jim Hefferon,

Introduction to mathematical arguments

Introduction to mathematical arguments (background handout for courses requiring proofs) by Michael Hutchings A mathematical proof is an argument which convinces other people that something is true. Math

CHAPTER 3 Numbers and Numeral Systems

CHAPTER 3 Numbers and Numeral Systems Numbers play an important role in almost all areas of mathematics, not least in calculus. Virtually all calculus books contain a thorough description of the natural,

3. QUADRATIC CONGRUENCES 3.1. Quadratics Over a Finite Field We re all familiar with the quadratic equation in the context of real or complex numbers. The formula for the solutions to ax + bx + c = 0 (where

Notes on Chapter 1, Section 2 Arithmetic and Divisibility

Notes on Chapter 1, Section 2 Arithmetic and Divisibility August 16, 2006 1 Arithmetic Properties of the Integers Recall that the set of integers is the set Z = f0; 1; 1; 2; 2; 3; 3; : : :g. The integers

Integers and division

CS 441 Discrete Mathematics for CS Lecture 12 Integers and division Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Symmetric matrix Definition: A square matrix A is called symmetric if A = A T.

Settling a Question about Pythagorean Triples

Settling a Question about Pythagorean Triples TOM VERHOEFF Department of Mathematics and Computing Science Eindhoven University of Technology P.O. Box 513, 5600 MB Eindhoven, The Netherlands E-Mail address:

GROUPS SUBGROUPS. Definition 1: An operation on a set G is a function : G G G.

Definition 1: GROUPS An operation on a set G is a function : G G G. Definition 2: A group is a set G which is equipped with an operation and a special element e G, called the identity, such that (i) the

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

GCDs and Relatively Prime Numbers! CSCI 2824, Fall 2014!!! Challenge Problem 2 (Mastermind) due Fri. 9/26 Find a fourth guess whose scoring will allow you to determine the secret code (repetitions are

Review for Final Exam

Review for Final Exam Note: Warning, this is probably not exhaustive and probably does contain typos (which I d like to hear about), but represents a review of most of the material covered in Chapters

Chapter 3: Elementary Number Theory and Methods of Proof. January 31, 2010

Chapter 3: Elementary Number Theory and Methods of Proof January 31, 2010 3.4 - Direct Proof and Counterexample IV: Division into Cases and the Quotient-Remainder Theorem Quotient-Remainder Theorem Given

Handout #1: Mathematical Reasoning

Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

The Division Algorithm for Polynomials Handout Monday March 5, 2012

The Division Algorithm for Polynomials Handout Monday March 5, 0 Let F be a field (such as R, Q, C, or F p for some prime p. This will allow us to divide by any nonzero scalar. (For some of the following,

Chapter 11 Number Theory

Chapter 11 Number Theory Number theory is one of the oldest branches of mathematics. For many years people who studied number theory delighted in its pure nature because there were few practical applications

15 Prime and Composite Numbers

15 Prime and Composite Numbers Divides, Divisors, Factors, Multiples In section 13, we considered the division algorithm: If a and b are whole numbers with b 0 then there exist unique numbers q and r such

The Euclidean Algorithm

The Euclidean Algorithm A METHOD FOR FINDING THE GREATEST COMMON DIVISOR FOR TWO LARGE NUMBERS To be successful using this method you have got to know how to divide. If this is something that you have

MTH 382 Number Theory Spring 2003 Practice Problems for the Final

MTH 382 Number Theory Spring 2003 Practice Problems for the Final (1) Find the quotient and remainder in the Division Algorithm, (a) with divisor 16 and dividend 95, (b) with divisor 16 and dividend -95,

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Discrete Mathematics, Chapter 4: Number Theory and Cryptography Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 4 1 / 35 Outline 1 Divisibility

11 Ideals. 11.1 Revisiting Z

11 Ideals The presentation here is somewhat different than the text. In particular, the sections do not match up. We have seen issues with the failure of unique factorization already, e.g., Z[ 5] = O Q(

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

MATHEMATICAL INDUCTION MIGUEL A LERMA (Last updated: February 8, 003) Mathematical Induction This is a powerful method to prove properties of positive integers Principle of Mathematical Induction Let P

Real Roots of Univariate Polynomials with Real Coefficients

Real Roots of Univariate Polynomials with Real Coefficients mostly written by Christina Hewitt March 22, 2012 1 Introduction Polynomial equations are used throughout mathematics. When solving polynomials

1.3 Induction and Other Proof Techniques

4CHAPTER 1. INTRODUCTORY MATERIAL: SETS, FUNCTIONS AND MATHEMATICAL INDU 1.3 Induction and Other Proof Techniques The purpose of this section is to study the proof technique known as mathematical induction.

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

CONTINUED FRACTIONS AND PELL S EQUATION SEUNG HYUN YANG Abstract. In this REU paper, I will use some important characteristics of continued fractions to give the complete set of solutions to Pell s equation.

6.2 Permutations continued

6.2 Permutations continued Theorem A permutation on a finite set A is either a cycle or can be expressed as a product (composition of disjoint cycles. Proof is by (strong induction on the number, r, of

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

Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

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

MATH 22 Lecture R: 10/30/2003 THE FUNDAMENTAL THEOREM of ARITHMETIC You must remember this, A kiss is still a kiss, A sigh is just a sigh; The fundamental things apply, As time goes by. Herman Hupfeld

Finite Sets. Theorem 5.1. Two non-empty finite sets have the same cardinality if and only if they are equivalent.

MATH 337 Cardinality Dr. Neal, WKU We now shall prove that the rational numbers are a countable set while R is uncountable. This result shows that there are two different magnitudes of infinity. But we

Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p.

Page 331, 38.2 Assignment #11 Solutions Factor the following positive integers into primes. a. 25 = 5 2. b. 4200 = 2 3 3 5 2 7. c. 10 10 = 2 10 5 10. d. 19 = 19. e. 1 = 1. Page 331, 38.4 Suppose a is a

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

Mathematical Induction

Mathematical Induction Victor Adamchik Fall of 2005 Lecture 1 (out of three) Plan 1. The Principle of Mathematical Induction 2. Induction Examples The Principle of Mathematical Induction Suppose we have