CIS 1600 Lecture 5
CIS 1600 Lecture 5
Lecture Outline
September 10, 2024
The unique factorization theorem states that every positive number can be uniquely repre-
sented as a product of primes. More formally, it can be stated as follows.
Given any integer n > 1, there exist a positive integer k, distinct prime numbers
p1 , p2 , . . . , pk , and positive integers e1 , e2 , . . . , ek such that
a2
2 =
b2
a2 = 2b2
√
Note that since 1 < 2 < 2, we can assume that a > 1 and b > 1. Let S(m) be the sum
of the number of times each prime factor occurs in the unique factorization of m. Note
that S(a2 ) and S(b2 ) is even. Why? Because the number of times that each prime factor
appears in the prime factorization of a2 and b2 is exactly twice the number of times that
it appears in the prime factorization of a and b. Then, S(2b2 ) = 1 + S(b2 ) must be odd.
This is a contradiction as S(a2 ) is even and the prime factorization of a positive integer is
unique.
Example. Prove or disprove that the sum of two irrational numbers is irrational.
√
Solution.
√ The above statement is false. Consider the two irrational numbers, 2 and
− 2. Their sum is 0 = 0/1, a rational number.
Example. Show that there exist irrational numbers x and y such that xy is rational.
2 Lecture Outline September 10, 2024
√
√ √ 2
Solution. We know that 2 is an irrational number. Consider 2 .
√ √2
Case I: 2 is rational. √
In this case we are done by setting x = y = 2.
√
√ 2
Case II: 2 is irrational.
√ √2
√ √2 √ y
√ 2 √
In this case, let x = 2 and let y = 2. Then, x = 2 = ( 2)2 = 2, which is
an integer and hence rational.
n is even ↔ 7n + 4 is even
7n + 4 = 7(2k) + 4 = 2(7k + 2)
Hence, 7n + 4 is even.
Proof for 7n + 4 is even → n is even. Since 7n + 4 is even and n is a positive integer, let
7n + 4 = 2l for some integer l ≥ 6. Then,
7n = 2l − 4 = 2(l − 2)
Clearly, 7n 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
Since n is a positive odd integer, we have n = 2k + 1, for some integerk ≥ 0. Thus we have
7n + 4 = 7(2k + 1) + 4
= 14k + 10 + 1
= 2(7k + 5) + 1
= 2k 0 + 1, where k 0 = 7k + 5 is an integer.
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
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 N2 = 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
N3 = 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.
Mathematical Induction
Example. Prove that for all integers n ≥ 1,
n
X n(n + 1)
i=
2
i=1
Base Case: n = 1. The claim is true for n = 1 as both sides of the equation equal to 1.
Induction step: To prove that the claim is true when n = k + 1. That is, we want to show
that
k+1
X (k + 1)(k + 2)
=
2
i=1
4 Lecture Outline September 10, 2024
Example. Prove that the sum of the first n positive odd numbers is n2 .
Solution. We want to prove that ∀ positive integers n, P (n) where P (n) is the following
property.
n−1
X
2i + 1 = n2
i=0
Base Case: We want to show that P (1) is true. This is clearly true as
0
X
2i + 1 = 1 = 12
i=0
Solution. Let r be any real number that is not equal to 1. We want to prove that ∀
integers n, P (n), where P (n) is given by
n
X a(rn+1 − 1)
ari =
r−1
i=0
Solution. By setting a = 1, r = 2 in the result of the previous problem, the claim follows.
20 − 1 = 0 = 3 · 0.
Induction Hypothesis: Assume that P (x) is true for some integer x ≥ 0, i.e., 22x − 1 = 3 · k 0 ,
for some k 0 ≥ 0.
Induction Step: We want to prove that P (x + 1) is true, i.e., we want to show that
L.H.S. = 22(x+1) − 1
= 22x+2 − 1
= 22x · 22 − 1
= 22x · 4 − 1
= 22x · (3 + 1) − 1
= 3 · 22x + 22x − 1
= 3 · 22x + 3 · k 0 (using induction hypothesis)
2x 0
= 3(2 +k)
= 3l, where l = 22x + k 0
n! = 1 × 2 × 3 × · · · × n
< n × n × n × ··· × n
= nn
We now give a proof using induction. Let P (n) denote the following property.
n! < nn
Induction Hypothesis: Assume that P (k) is true for some integer k > 1.
Base Case: We want to prove P (2). P (2) is the proposition that 2! < 22 , or 2 < 4, which
is true.
Induction Step: We want to prove P (k +1), i.e., we want to prove that (k +1)! < (k +1)k+1 .
L.H.S. = (k + 1)!
= k! × (k + 1)
< k k × (k + 1) (using induction hypothesis)
k
< (k + 1) × (k + 1) (since k > 1)
= (k + 1)k+1