D-Math-W05-Ch5

# D-Math-W05-Ch5 - SHEN'S CLASS NOTES-191 Chapter Five...

This preview shows pages 1–6. Sign up to view the full content.

SHEN’S CLASS NOTES-191 1 Chapter Five Introduction to Number Theory Number Theory is the branch of mathematics concerned with the integers. 5.1 Divisors Definition 5.1.1 Let n and d be two integers, d 0. We say that d divides n if there exists an integer q satisfying n = dq . Moreover, we call q the quotient, and d a divisor (or factor) of n . If d divides n , we write d | n . If d does not divides n , we write d n . Example 5.1.2 3 is a divisor of 21, 3 | 21. 6 is not a divisor of 21, 6 21.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
SHEN’S CLASS NOTES-191 2 Theorem 5.1.3 Let m , n , d be integers. (a) If d | m and d | n , then d | ( m + n ). (b) If d | m and d | n , then d | ( m n ). (c) If d | m , then d | mn . Proof. (a) Because d | m and d | n , we have m = dq 1 , n = dq 2 . Therefore, ( m + n ) = dq 1 + dq 2 = d ( q + q 2 ). Therefore, d | ( m + n ). (b) Similar to (a). ( m n ) = dq 1 dq 2 = d ( q q 2 ). Therefore, d | ( m n ) (c) Because d | m , m = dq . So, mn = dqn = d ( qn ). So, d | mn . Definition 5.1.4 A positive integer p is called prime if p > 1 and its only positive divisors are itself and 1. Otherwise, it is called composite .
SHEN’S CLASS NOTES-191 3 Example 5.1.5 2, 3, 5, 7, 11, 13, 17, 19, 23 are prime numbers. 34 is a composite number. How to tell an integer n is prime A straightforward way is try integers 2, 3, …, n -1 to see any one of them divides n . If none of them divides n , then it is prime. Example 5.1.6 43 is a prime number because any number in 2, 3, 4, …, 42 can divides 43. Actually, we need not test all these numbers from 2 to n -1. Theorem 5.1.7 A positive integer n > 1 is composite if and only if n has a divisor d such that 2 d n . Proof. We prove the “if” part first. If n has a divisor d such that 2 d n , then n = dq . Because d n < n , d 1 and d n . So, n is composite.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
SHEN’S CLASS NOTES-191 4 Now, we prove the “only if” part. Suppose n is composite. Then n has a divisor c such that 2 c n -1. So, there is an integer q such that n = cq . So, q is a divisor also. Moreover, because 2 c n -1, q 1 and d n . So, 2 q n -1. We claim that either c n or q n . This is because, otherwise, n = cq > n n = n , which is a contradiction. Therefore, n has a divisor d such that 2 d n . Based on Theorem 5.1.7, we have the following algorithm to test if an integer is prime or not. Algorithm 5.1.8 Input: n Output: d Is_prime ( n ) 1 for d = 2 to n 2 if n mod d = 0 3 then return d 4 return 0
SHEN’S CLASS NOTES-191 5 5 End Example 5.1.9 To check the number 43, we need only to test the following numbers: 2, 3, 4, 5, 6. (6 = 43 ). An interesting fact is that if Algorithm 5.1.8 returns a number d 0, then d must be a prime. Suppose not,

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 37

D-Math-W05-Ch5 - SHEN'S CLASS NOTES-191 Chapter Five...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online