Top Banner
CHAPTER 5 Number Theory 5.1. Primes, Composites, and Tests for Divisibility Definition. A counting number with exactly two dierent factors is called a prime number or a prime . A counting number with more than two factors is called a composite number , or a composite . The Sieve of Eratosthenes is a tool used to find primes. Start by circling 2 and then crossing out every second number. Then circle 3 and cross out every third number. Do the same for 5, 7, etc. The circled numbers are primes and the crossed out numbers are composites. Note. The number 1 is neither prime nor composite. Factor trees can be used to express a composite as a product of smaller numbers and even as a product of primes. 75
14

Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

Jul 03, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

CHAPTER 5

Number Theory

5.1. Primes, Composites, and Tests for Divisibility

Definition. A counting number with exactly two di↵erent factors is calleda prime number or a prime. A counting number with more than two factors iscalled a composite number, or a composite.

The Sieve of Eratosthenes is a tool used to find primes.

Start by circling 2 and then crossing out every second number. Then circle3 and cross out every third number. Do the same for 5, 7, etc. The circlednumbers are primes and the crossed out numbers are composites.

Note. The number 1 is neither prime nor composite.

Factor trees can be used to express a composite as a product of smaller numbersand even as a product of primes.

75

Page 2: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

76 5. NUMBER THEORY

We see that each of the four cases above give the same prime factorizasion.This is an example of the following theorem:

Theorem (Fundamental Theorem of Arithmetic). Each composite num-ber can be expressed as the product of primes is exactly one way (exceptfor the order of the factors).

Example.

(1)

192 = 2 · 96 = 2 · 12 · 8 = 2 · 4 · 3 · 2 · 4 = 2 · 2 · 2 · 3 · 2 · 2 · 2 = 26 · 3

(2)360 = 9 · 40 = 32 · 8 · 5 = 32 · 23 · 5

Page 3: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

5.1. PRIMES, COMPOSITES, AND TESTS FOR DIVISIBILITY 77

Definition. Let a and b be whole numbers with a 6= 0. We say that adivides b, and write a | b, if and only if there is a whole number x such thatax = b. The symbol a - b means tha a does not divide b.

In other words, a | b if and only if a is a factor of b. When a | b, we say that ais a divisor of b, a is a factor of b, b is a multiple of a, and b is divisible by a.

Example.

(1) 21 | 210 since 21 · 10 = 210.

(2) 2 | (22 · 5 · 7) since 2 · (2 · 5 · 7) = (22 · 5 · 7).

Tests for Divisibility

Theorem (Tests for Divisibility by 2, 5, and 10).

A number is divisible by 2 if and only if its ones digit is 0, 2, 4, 6, or 8.

A number is divisible by 5 if and only if its ones digit is 0 or 5.

A number is divisible by 10 if and only if its ones digit is 0.

We will prove the first part of this below.

Example. 4 | 36 and 4 | 24. But we also have then that 4 | (36 + 24) and4 | (36� 24).

This suggests the following theorem.

Theorem. Let a, m, n, and k be whole numbers with a 6= 0.

(a) If a | m and a | n, then a | (m + n).

(b) If a | m and a | n, then a | (m� n) for m � n.

(c) If a | m, then a | km.

Page 4: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

78 5. NUMBER THEORY

Proof. (of (b))

a | m =) ax = m for some whole number x.

a | n =) ay = n for some whole number y.

m � n =) m� n is a whole number. Then

ax� ay = m� n =)a(x� y) = m� n and x� y is a whole number =)a | (m� n). ⇤

We now can look at the proof of the test for divisibility by 2 for an arbitrary3-digit number. The same idea used in this proof works for any number ofdigits.

Proof.

Let r = a · 102 + b · 10 + c be any 3-digit number (a, b, and c are the digitsfrom L to R).

Note a · 102 + b · 10 = 10(a · 10 + b).

Since 2 | 10, 2 | 10(a · 10 + b) =)2 | (a · 102 + b · 10) for any digits a and b.

Thus if 2 | c, then 2 | [10(a · 10 + b) + c], so

2 | (a · 102 + b · 10 + c), or 2 | r.

[Thus 2 | c =) 2 | r.]

Now suppose 2 | r or 2 | (a · 102 + b · 10 + c).

Since 2 | (a · 102 + b · 10),

2 | [(a · 102 + b · 10 + c)� (a · 102 + b · 10)] or 2 | c.

[Thus 2 | r =) 2 | c.]

We have shown that 2 | r if and only if 2 | c. ⇤

Page 5: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

5.1. PRIMES, COMPOSITES, AND TESTS FOR DIVISIBILITY 79

Theorem (Tests for Divisibility by 4 and 8).

A number is divisible by 4 if and only if the number represented by the lasttwo digits is divisible by 4.

A number is divisible by 8 if and only if the number represented by the lastthree digits is divisible by 8.

Example.

2536 is divisible by 4 since 36 is.

4 - 239 since 4 - 39.

8 | 53192 since 8 | 192.

8 - 2357 since 8 - 357.

Theorem (Tests for Divisibility by 3 and 9).

A number is divisible by 3 if and only if the the sum of its digits is divisibleby 3.

A number is divisible by 9 if and only if the the sum of its digits is divisibleby 9.

Example.

3 | 43812 and 9 | 43812 since 4 + 3 + 8 + 1 + 2 = 18, 3 | 18, and 9 | 18.

3 - 454 and 9 - 454 since 4 + 5 + 4 = 13, 3 - 13, and 9 - 13.

Theorem (Test for Divisibility by 11).

A number is divisible by 11 if and only if 11 divides the di↵erence of thesum of the digits whose place values are odd powers of 10 and the sum ofthe digits whose place values are even powers of 10, with the smaller sumsubtracted from the larger.

Page 6: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

80 5. NUMBER THEORY

Example.

11 | 89969 since 8 + 9 + 9 = 26, 9 + 6 = 15, 26� 15 = 11, and 11 | 11.

11 | 3421 since 4 + 1 = 5, 3 + 2 = 5, 5� 5 = 0, and 11 | 0.

11 - 8732 since 7 + 2 = 9, 8 + 3 = 11, 11� 9 = 2, and 11 - 2.

Theorem (Test for Divisibility by 6).

A number is divisible by 6 if and only if it is divisible by both 2 and 3.

Theorem.

A number is divisible by the product ab of two nonzero whole numbers aand b if it is divisible by both a and b, and a and b have only 1 as a commonwhole number factor.

Example. Is 557 prime?

Theorem (Prime Factor Test).

To test for prime factors of a number n, one need only search for primefactors p where p2 n or p

pn.

Example.

By calculator,p

557 ⇡ 23.6, 232 = 529 and 242 = 576. Thus we need checkonly whether 2, 3, 5, 7, 11, 13, 17, 19, or 23 divide 557.

Since none of these primes divide 557, 557 is prime.

Page 7: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

5.1. PRIMES, COMPOSITES, AND TESTS FOR DIVISIBILITY 81

Example. Factor 5889 into primes.

2 - 5889.

5 + 8 + 8 + 9 = 30, 3 | 30 but 9 - 30, so 5889 = 3 · 1963 .

5 - 1963, 7 - 1963,

11 - (12� 7), so 11 - 1963.

13 | 1963, so 5889 = 3 · 13 · 151 .

12 <p

151 < 13, so 151 is prime since we have already tried each prime factorless than 12.

Example. Ink is spilled on a bill for 36 sweatshirts. If only the first and lastdigits were covered, and the other three digits were, in order, 839 as in ?83.9?,how much did each cost?

Solution.

Strategy 10 – Use properties of numbers.

36 | bill.

Since 9 ·4 = 36 and 9 and 4 have only 1 as a common factor, 4 | bill and 9 | bill.

Thus 4 | 9?, so

? is 2 or 6 since 4 | 92 and 4 | 96.

Suppose we have ?83.92.

Since 9 | sum of the digits and 8 + 3 + 9 + 2 = 22, the first digit is 5.

Thus the bill is $583.92 and the cost of each sweatshirt is 583.92/36= $16.22 .Now suppose we have ?83.96.

Since 9 | sum of the digits and 8 + 3 + 9 + 6 = 26, the first digit is 1.

Thus the bill is $183.96 and the cost of each sweatshirt is 183.92/36 = $5.11 .But this cost is unrealistic, so the cost per sweatshirt is $16.22. ⇤

Page 8: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

82 5. NUMBER THEORY

5.2. Counting Factors, Greatest Common Factor, and LeastCommon Multiple

Counting Factors

Example. How many factors (or divisors) does 10,800 have?

First, 10, 800 = 24 · 33 · 52 as a product of primes.

Then a divisor of 10,800 can only have 2, 3, and 5 as prime factors, with nomore than 4 twos, no more than 3 threes, and no more than 2 fives.

There are five possibilities for the number of twos to include: 0, 1, 2, 3, 4.

There are four possibilities for the number of threes to include: 0, 1, 2, 3.

There are three possibilities for the number of fives to include: 0, 1, 2.

Thus there are 5 · 4 · 3 = 60 di↵erent factors of 10,800.

Theorem. Suppose that a counting number n is expressed as a productof distinct primes with their respective exponents, say

n = (pn11 )(pn2

2 ) · · · (pnmm ).

Then the number of factors of n is the product

(n1 + 1)(n2 + 1) · · · (nm + 1).

Greatest Common Factor

Definition (Greatest Common Factor).

The greatest common factor (GCF) of two (or more) nonzero whole numbersis the largest whole number that is a factor of both (all) of the numbers. TheGCF of a and b is written GCF(a, b).

Page 9: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

5.2. COUNTING FACTORS, GREATEST COMMON FACTOR, AND LEAST COMMON MULTIPLE 83

Set Intersection Method

Example. Find GCF(36, 48).

A = {x|x is a factor of 36} = {1, 2, 3, 4, 6, 9, 12, 18, 36}B = {x|x is a factor of 48} = {1, 2, 3, 4, 6, 8, 12, 16, 24, 48}A \B = {x|x is a factor of 36 and 48} = {1, 2, 3, 4, 6, 12}

Thus GCF(36, 48) = 12, the largest element in A \B.

Prime Factorization Method

Example. Find GCF(36, 60).

(1) Factor each number into primes.

36 = 22 · 32

60 = 22 · 3 · 5

(2) For the GCF, take each factor the fewest number of times it is used in anyone number.

GCF(36, 60) = 22 · 3 = 12.

Euclidean Algorithm Method

Suppose a and b are whole numbers with a � b.

If c | a and c | b, c | a� b, so c is a common factor of b and a� b.

Also, if c | b and c | a� b, c | [(a� b) + b)], so c | a and c is a common factorof a and b.

We have proven the following theorem:

Page 10: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

84 5. NUMBER THEORY

Theorem. If a and b are whole numbers with a � b, then

GCF(a, b) = GCF(a� b, b).

Example.

GCF(98, 28) = GCF(70, 28)

= GCF(42, 28)

= GCF(14, 28)

= GCF(28, 14)

= GCF(14, 14) = 14

Recalling that division can be viewed as repeated subtraction, and that

we can shorten the above to

GCF(98, 28) = GCF(14, 28) = 14

since 14 | 28.

In general,

Page 11: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

5.2. COUNTING FACTORS, GREATEST COMMON FACTOR, AND LEAST COMMON MULTIPLE 85

Theorem (Euclidean Algoritm Method).

If a and b are whole numbers with a � b and a = bq + r where r < b, then

GCF(a, b) = GCF(r, b).

Example. Find GCF(399, 102).

The final divisor that leads to a remainder of 0 is the GCF. This is theEuclidean Algorithm method.

Page 12: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

86 5. NUMBER THEORY

Least Common Multiple

Definition (Least Common Multiple).

The least common multiple (LCM) of two (or more) nonzero whole numbersis the smallest nonzero whole number that is a multiple of each (all) of thenumbers. The LCM of a and b is written LCM(a, b).

Set Intersection Method

Example. Find LCM(36, 48).

A = {x|x is a multiple of 36}= {36, 72, 108, 144, 180, 216, 252, 288, 324, 360, . . . }.

B = {x|x is a multiple of 48}= {48, 96, 144, 192, 240, 288, 336, 384, . . . }.

A \B = {x|x is a multiple of 36 and 48}= {144, 288, . . . }.

LCM(36, 48) = 144, the smallest number in A \B.

Prime Factorization Method

Example. Find GCF(36, 60).

(1) Factor each number into primes.

36 = 22 · 32

60 = 22 · 3 · 5

(2) For the GCF, take each factor the most number of times it is used in anyone number.

GCF(36, 60) = 22 · 32 · 5 = 4 · 9 · 5 = 180.

Page 13: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

5.2. COUNTING FACTORS, GREATEST COMMON FACTOR, AND LEAST COMMON MULTIPLE 87

Build-Up Method

Example. Find LCM(36, 60).

(1) Factor each number into primes.

36 = 22 · 32

60 = 22 · 3 · 5

(2) Start with one number’s prime factorization, say 36, and compare its primefactorization to the prime factorization of the other number, 60 in this case.We begin with

22 · 32.

Comparing with the prime factors of 60, there is no need to increase the expo-nents of 2 or 3. We simply need to add a factor of 5.

LCM(36, 60) = 22 ·2 ·5 = 180.

Example. Find GCF(90, 36, 54) and LCM(90, 36, 54).

90 = 2 · 32 · 5

36 = 22 · 32

54 = 2 · 33

GCF(90, 36, 54) = 2 · 32 = 18

LCM(90, 36, 54) = 22 · 33 · 5 = 4 · 27 · 5 = 540

Note.

GCF(36, 60) = 12 and LCM(36, 60) = 180.

12 · 180 = 2160 and 36 · 60 = 2160.

This is an instance of

Theorem. Let a and b be any two whole numbers. Then

GCF(a, b)⇥ LCM(a, b) = ab.

Page 14: Number Theory - Christian Brothers Universityfacstaff.cbu.edu › wschrein › media › M151 Notes › M151-52C5.pdfNumber Theory 5.1. Primes, Composites, and Tests for Divisibility

88 5. NUMBER THEORY

How many prime numbers are there?

Theorem. There is an infinite number of primes.

Proof. We us indirect reasoning.

Suppose there is a finite number of primes, say

2, 3, 5, 7, 11, . . . , p,

where p is the greatest prime. Let

N = 2 · 3 · 5 · 7 · 11 · · · p + 1.

N > 1 and N is greater than any prime.

But when N is divided by any prime, the remainder is always 1.

So N is not 1, is not prime, and is not a composite, which is impossible.

Thus there must be infinitely many primes. ⇤