This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 171 Lecture Outline January 13, 2011 Example. Prove that for all positive integers n , n is even 7 n + 4 is even Solution. Let n be a particular but arbitrarily chosen integer. Proof for n is even 7 n + 4 is even. Since n is even, n = 2 k for some integer k . Then, 7 n + 4 = 7(2 k ) + 4 = 2(7 k + 2) Hence, 7 n + 4 is even. Proof for 7 n + 4 is even n is even. Since 7 n + 4 is even, 7 n + 4 = 2 l for some integer l . Then, 7 n = 2 l 4 = 2( l 2) Clearly, 7 n is even. Combining the fact that 7 is odd with the result of the Example 1, we conclude that n is even. We can also prove the latter by proving its contrapositive, i.e., we can prove if n is odd then 7 n + 4 is odd. Since n is odd we have n = 2 k + 1 , for some integer k . Thus we have 7 n + 4 = 7(2 k + 1) + 4 = 14 k + 10 + 1 = 2(7 k + 5) + 1 = 2 k + 1 , where k = 7 k + 5 is an integer. Example. Prove that there are infinitely many prime numbers. Solution. Assume, for the sake of contradiction, that there are only finitely many primes. Let p be the largest prime number. Then all the prime numbers can be listed as 2 , 3 , 5 , 7 , 11 , 13 , ... ,p Consider an integer n that is formed by multiplying all the prime numbers and then adding 1. That is, n = (2 3 5 7 p ) + 1 2 Lecture Outline January 13, 2011 Clearly, n > p . Since p is the largest prime number, n cannot be a prime number. In other words, n is composite. Let q be any prime number. Because of the way n is constructed, when n is divided by q the remainder is 1. That is, n is not a multiple of q . This contradicts the Fundamental Theorem of Arithmetic. Alternate Proof by Filip Saidak. Let n be an arbitrary positive integer greater than 1. Since n and n + 1 are consecutive integers, they must be relatively prime. Hence, the number N 2 = n ( n + 1) must have at least two different prime factors. Similarly, since the integers n ( n + 1) and n ( n + 1) + 1 are consecutive, and therefore relatively prime, the number N 3 = n ( n + 1)[ n ( n + 1) + 1] must have at least three different prime factors. This process can be continued indefinitely, so the number of primes must be infinite. Example. Prove that the sum of the first n positive odd numbers is n 2 . Solution. We want to prove that positive integers n,P ( n ) where P ( n ) is the following property. n 1 summationdisplay i =0 2 i + 1 = n 2 Base Case: We want to show that P (1) is true. This is clearly true as summationdisplay i =0 2 i + 1 = 1 = 1 2 Induction Hypothesis: Assume P ( k ) is true for some k 1. Induction Step: We want to show that P ( k + 1) is true, i.e., we want to show that k summationdisplay i =0 2 i + 1 = ( k + 1) 2 We can do this as follows....
View Full
Document
 Winter '10
 RajivSir

Click to edit the document details