Chapter 4 Number Theory

Chapter 4 Number Theory

Chapter 4 Number theory Number theory is one of the oldest branches of mathematics, and this chapter is intended to be just an introduction to a vast subject. I start by proving that essentially every integer can be written as a product of powers of primes, a result known as the fundamental theorem of arithmetic. This shows that the primes are the building blocks, or atoms, from which all integers are constructed. The primes are still the subject of intensive research and the source of many unanswered questions. It is ironic that the numbers we learn about first as children are the source of some of mathematics most difficult and interesting questions. 4.1 Greatest common divisors The ideas in this section are simple but their ramifications substantial. We begin by stating a basic result that you may assume as an axiom but which I shall also set as a proof in one of the exercises. Lemma 4.1.1 (Remainder Theorem). Let a and b be integers where b > 0. Then there are unique integers q and r such that a = bq + r where 0 r < b. ≤ The number q is called the quotient and the number r is called the re- mainder. For example, if we consider the pair of natural numbers 14 and 3 then 14 = 3 4 + 2 · 81 82 CHAPTER 4. NUMBER THEORY where 4 is the quotient and 2 is the remainder. Your first reaction to this result should probably be that it looks obvious. You might conclude from this that it is therefore uninteresting. But this would be wrong. It is certainly not hard to understand but despite that it is important. The reason is that whenever we have a question that involves divisibility, it is very likely going to require the use of this result. Example 4.1.2. From the remainder theorem, we know that every natural number n can be written as n = 10q + r where 0 r 9. The integer r is nothing other than the units digit in the usual base≤ 10≤ representation of n. Thus, for example, 42 = 10 4 + 2. Similarly, it is the remainder theorem that tells us that odd numbers× are precisely those that leave remainder 1 when divided by 2. Let a and b be integers. We say that a divides b or that b is divisible by a if there is a q such that b = aq. In other words, there is no remainder. We also say that a is a divisor or factor of b. We write a b to mean the same thing as ‘a divides b’. It is very important to remember| that a b does not a | mean the same thing as b . The latter is a number, the former is a statement about two numbers. Let a, b N. A number d which divides both a and b is called a common divisor of a∈and b. The largest number which divides both a and b is called the greatest common divisor of a and b and is denoted by gcd(a, b). A pair of natural numbers a and b is said to be coprime if gcd(a, b) = 1. For us gcd(0, 0) is undefined but if a = 0 then gcd(a, 0) = a. 6 Example 4.1.3. Consider the numbers 12 and 16. The set of divisors of 12 is 1, 2, 3, 4, 6, 12 . The set of divisors of 16 is 1, 2, 4, 8, 16 . The set of common{ divisors is the} set of numbers that belong{ to both of these} two sets: namely, 1, 2, 4 . The greatest common divisor of 12 and 16 is therefore 4. Thus gcd(12{ , 16)} = 4. One application of greatest common divisors is in simplifying fractions. 12 3 For example, the fraction 16 is equal to the fraction 4 because we can divide out by the common divisor of numerator and denominator. The fraction which results cannot be simplified further and is in its lowest terms. a b Lemma 4.1.4. Let d = gcd(a, b). Then gcd( d , d ) = 1. 4.1. GREATEST COMMON DIVISORS 83 Proof. Because d divides both a and b we may write a = a0d and b = b0d for some natural numbers a0 and b0. We therefore need to prove that gcd(a0, b0) = 1. Suppose that e a0 and e b0. Then a0 = ex and b0 = ey for some natural numbers x and y. Thus| a = exd| and b = eyd. Observe that ed a and ed b and so ed is a common divisor of both a and b. But d is the greatest| common| divisor and so e = 1, as required. Let me paraphrase what the result above says since it is not surprising. If I divide two numbers by their greatest common divisor then the numbers that remain are coprime. This seems intuitively plausible and the proof ensures that our intuition is correct. Example 4.1.5. Greatest common divisors arise naturally in solving lin- ear equations where we require the solutions to be integers. Consider, for example, the linear equation 12x + 16y = 5. If we want our solutions (x, y) to have real number co-ordinates, then it is of course easy to solve this equation and find infinitely many solutions since the solutions form a line in the plane. But suppose now that we require (x, y) Z2; that is, we want the solutions to be integers. In other words, we want to∈ know whether the line contains any points with integer co-ordinates. We can see immediately that this is impossible. We have calculated that gcd(12, 16) = 4. Thus if x and y are integers, the number 4 divides the lefthand side of our equation. But clearly, 4 does not divide the righthand side of our equation. Thus the set (x, y):(x, y) Z2and 12x + 16y = 5 { ∈ } is empty. If the numbers a and b are large, then calculating their gcd in the way I did above would be time-consuming and error-prone. We want to find an efficient method of calculating the greatest common divisor. The following lemma is the basis of just such a method. Lemma 4.1.6. Let a, b N, where b = 0, and let a = bq+r where 0 r < b. Then ∈ 6 ≤ gcd(a, b) = gcd(b, r). 84 CHAPTER 4. NUMBER THEORY Proof. Let d be a common divisor of a and b. Since a = bq + r we have that a bq = r so that d is also a divisor of r. It follows that any divisor of a and b −is also a divisor of b and r. Now let d be a common divisor of b and r. Since a = bq + r we have that d divides a. Thus any divisor of b and r is a divisor of a and b. It follows that the set of common divisors of a and b is the same as the set of common divisors of b and r. Thus gcd(a, b) = gcd(b, r). The point of the above result is that b < a and r < b. So calculat- ing gcd(b, r) will be easier than calculating gcd(a, b) because the numbers involved are smaller. Compare a = b q + r with z }| { a = bq + r . The above result is the basis of an efficient algorithm for computing greatest common divisors. It was described in| {z Propositions} 1 and 2 of Book VII of Euclid. Algorithm 4.1.7 (Euclid’s algorithm). Input: a, b N such that a b and b = 0. Output: gcd(∈ a, b). ≥ 6 Procedure: write a = bq + r where 0 r < b. Then gcd(a, b) = gcd(b, r). If r = 0 then repeat this procedure with≤b and r and so on. The last non-zero remainder6 is gcd(a, b) Example 4.1.8. Let’s calculate gcd(19, 7) using Euclid’s algorithm. I have highlighted the numbers that are involved at each stage. 19 = 7 2 + 5 · 7 = 5 1 + 2 · 5 = 2 2 + 1 · ∗ 2 = 1 2 + 0 · By Lemma 1.3.3 we have that gcd(19, 7) = gcd(7, 5) = gcd(5, 2) = gcd(2, 1) = gcd(1, 0). The last non-zero remainder is 1 and so gcd(19, 7) = 1 and, in this case, the numbers are coprime. 4.1. GREATEST COMMON DIVISORS 85 There are occasions when we need to extract more information from Eu- clid’s algorithm as we shall discover later when we come to deal with prime numbers. The following provides what we need. Theorem 4.1.9 (B´ezout’stheorem). Let a and b be natural numbers. Then there are integers x and y such that gcd(a, b) = xa + yb. I shall prove this theorem by describing an algorithm that will compute the integers x and y above. This is achieved by running Euclid’s algorithm in reverse and is called the extended Euclidean algorithm. The procedure for doing so is outlined below but the details are explained in the example that follows it. Algorithm 4.1.10 (Extended Euclidean algorithm). Input: a, b N where a b and b = 0. ∈ ≥ 6 Output: numbers x, y Z such that gcd(a, b) = xa + yb. Procedure: apply Euclid’s∈ algorithm to a and b; working from bottom to top rewrite each remainder in turn. Example 4.1.11. This is a little involved so I have split the process up into steps. I shall apply the extended Euclidean algorithm to the example I calculated above.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    46 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us