Elementary Number Theory and Methods of Proof
Elementary Number Theory and Methods of Proof
Example 1
For any real number x, the floor of x, ⌊x⌋, is the largest integer that is less than
or equal to x. Thus, ⌊2.3⌋ = 2; ⌊12.99999⌋ = 12; ⌊−1.5⌋ = −2
o ⌊2.0−1.1⌋ = ⌊0.9⌋ = 0
o ⌊2.0⌋ − ⌊1.1⌋ = 2 − 1 = 1
In this section, we assume the three properties of equality which are for all
objects A, B, and C;
(1)𝐴 = 𝐴,
(2)if 𝐴 = 𝐵, then 𝐵 = 𝐴, and (3) if 𝐴 = 𝐵 and 𝐵 = 𝐶, then 𝐴 = 𝐶 .
1
products of integers are integers. This is not the case in division operation
because the quotient of two integers is most of the time not an integer.
Finally, the laws of basic algebra are assumed to be familiar to the student,
which are listed in Appendix A.
From the definition of even numbers, that if you are doing a problem in which you
happen to know that a certain integer is even, you can deduce that it has the form
2×(some integer). Conversely, if you know in some situation that a particular
integer equals 2×(some integer), then you can deduce that the integer is even.
Example 2:
Use the definitions of even and odd to justify the following questions.
a. Is 0 even?
b. Is −301 odd?
c. If 𝑎 and 𝑏 are integers, is 6𝑎2 𝑏 even?
d. If 𝑎 and 𝑏 are integers, is 10𝑎 + 8𝑏 + 1 odd?
Solution:
a. Yes, 0 = 2 × 0.
2
b. Yes, −301 = 2(−151) + 1.
c. Yes, 6𝑎^2 𝑏 − 2(3𝑎^2 𝑏), and since 𝑎 and 𝑏 are integers, so is 3𝑎2 𝑏 (being a
product of integers).
d. Yes, 10𝑎 + 8𝑏 + 1 = 2(5𝑎 + 4𝑏) + 1, and since 𝑎 and 𝑏 are integers, so is 5𝑎 +
4𝑏𝑛 (being a sum of products of integers).
• An integer 𝑛 is prime if, and only if, 𝑛 > 1 and for all
positive integers r and s, if 𝑛 = 𝑟 × 𝑠, then 𝑟 = 1 or 𝑠 =
1.
• An integer 𝑛 is composite if, and only if, 𝑛 > 1 and 𝑛 =
𝑟 × 𝑠 for some positive integers 𝑟 and 𝑠 with 𝑟 ≠ 1 and 𝑠 ≠
1.
• Symbolically, if 𝑛 is an integer that is greater than 1, then,
• 𝑛 is prime ⟺ ∀ positive integers 𝑟 and 𝑠, if 𝑛 = 𝑟 ×
𝑠, then 𝑟 = 1 or 𝑠 = 1.
• 𝑛 is composite ⟺ ∃ positive integers 𝑟 and 𝑠 such that
𝑛 = 𝑟 × 𝑠 and 𝑟 ≠ 1 and 𝑠 ≠ 1.
Example 3
a. Is 1 prime?
b. Is it true that every integer greater than 1 is either prime or composite?
c. Write the first six prime numbers.
d. Write the first six composite numbers.
Solution
a. No. A prime number is required to be greater than 1.
b. Yes. For any integer greater than 1, the two definitions are negations of each
other.
c. 2,3,5,7, 11, 13
d. 4,6,8,9,10,12
3
2.2.1 PROOF OF EXISTENTIAL STATEMENTS
Solution
Solution
Example 6:
Disprove the following statement by finding a counterexample;
4
Solution
To disprove this statement, you need to find real numbers a and b such
that 𝑎2 = 𝑏 2 and 𝑎 ≠ 𝑏 . If you flip through some possibilities in your
mind, you will quickly see that 1 and −1 will work (or 2 and −2, and so
forth).
Counterexample: Let 𝑎 = 1 and 𝑏 = −1 . Then 𝑎2 = 12 = 1 and 𝑏 2 =
(−1)2 = 1,
and so 𝑎2 = 𝑏 2 . But 𝑎 ≠ 𝑏 since 1 ≠ −1. ∎
• Exhaustion Method:
Example 7
Solution 4 = 2 + 2, 6 = 3 + 3, 8 = 3 + 5, 10 = 5 + 5
12 = 5 + 7, 14 = 11 + 3, 16 = 5 + 11, 18 = 7 + 11
20 = 7 + 13, 22 = 5 + 17 and 24 = 5 + 19
5
• Direct Method:
The most powerful technique for proving a universal statement is one
that works regardless of the size of the domain over which the statement
is quantified. It is called the method of generalizing from the generic
particular.
Method of Direct Proof
1: Express the statement to be proved in the form "∀𝑥 ∈ 𝐷 , if 𝑃(𝑥)
then 𝑄(𝑥)." (This step is often done mentally.)
2: Start the proof by supposing 𝑥 is a particular but arbitrarily chosen
element of 𝐷 for which the hypothesis 𝑃(𝑥) is true. (This step is
often abbreviated "Suppose 𝑥 ∈ 𝐷 and 𝑃(𝑥).")
3: Show that the conclusion 𝑄(𝑥) is true by using definitions,
previously established results, and the rules for logical inference
(Lecture 1).
Example 7
Solution
To prove this statement in general, you need to show that no matter what
even integers are given, their sum is even. But given any two even
integers, it is possible to represent them as 2𝑟 and 2𝑠 for some integers
𝑟 and 𝑠. And by the distributive law of algebra,
6
Formal Restatement: ∀ integers 𝑚 and 𝑛, if 𝑚 and 𝑛 are even then 𝑚 +
𝑛 is even.
𝑚 = 2𝑟, for some integer 𝑟 and 𝑛 = 2𝑠, for some integer 𝑠.Then 𝑚 +
𝑛 = 2𝑟 + 2𝑠. Your goal is to show that 𝑚 + 𝑛 is even.
First, because of the distributive law from algebra, which says that 2𝑟 +
2𝑠 = 2(𝑟 + 𝑠), and, second, because the sum of any two integers is an
integer
Theorem 2.2.1
Proof
7
2.2.3.1 C OMMON MISTAKES
1. Arguing from examples: it is true because it’s true in one particular case.
2. Using the same letter to mean two different things.
3. Jumping to a conclusion.
4. Circular reasoning: 𝑥 is true because 𝑦 is true since 𝑥 is true.
5. Confusion between what is known (Premises, axioms and proved
theorems) and what is still to be shown:
6. Use of any rather than some
7. Misuse of if
Example 8
Solution
Proof:
8
2.3 RATIONAL NUMBERS (DEFINITIONS AND METHODS OF PROOF II)
Sums, differences, and products of integers are integers. But most
quotients of integers are not integers. Quotients of integers are, however,
important; they are known as rational numbers.
In this section, we will learn about rational numbers and use the methods
of proof to prove some of their properties.
Rational Numbers
• A real number 𝑟 is rational if, and only if, it can be
expressed as a quotient of two integers with a nonzero
denominator.
• 𝑟 is rational ↔ integers a and b such that 𝑟 = 𝑎 / 𝑏 and
𝑏 ≠ 0.
Example 9
Example 10
Theorem 2.3.1
10
Example 11
Prove:
if 𝑎 is any even integer and 𝑏 is any odd integer, then (𝑎2 + 𝑏 2 + 1)/2 is an
integer. Using the properties:
1. The sum, product, and difference of any two even integers are even.
2. The sum and difference of any two odd integers are even.
3. The product of any two odd integers is odd.
4. The product of any even integer and any odd integer is even.
5. The sum of any odd integer and any even integer is odd.
6. The difference of any odd integer minus any even integer is odd.
7. The difference of any even integer minus any odd integer is odd.
Solution
Suppose 𝑎 is any even integer and 𝑏 is any odd integer.
• By property 3, 𝑏 is odd.
• By property 1, 𝑎2 is even.
• By property 5, 𝑎2 + 𝑏2 is odd.
• By property 2, 𝑎2 + 𝑏2 + 1 is even.
• By definition of even, there exists an integer 𝑘 such that 𝑎2 + 𝑏2 + 1 =
2𝑘
• Thus, (a2+b2+1)/2 = k, which is an integer.
Example 12
Solution
Proof:
11
2.4 DIVISIBILITY (DEFINITIONS AND METHODS OF PROOF III)
In this section, some properties related to the division operation will be
visited. Divisibility will be defined and some of its properties will be
proved using methods of proof.
Divisibility
• If 𝑛 and 𝑑 are integers and 𝑑 ≠ 0 then 𝑛 is divisible by 𝑑
if,and only if, 𝑛 equals 𝑑 times some integer k
• 𝑑 | 𝑛 ↔an integer 𝑘 such that 𝑛 = 𝑑𝑘
• 𝑛 is a multiple of 𝑑
• 𝑑 is a factor of 𝑛
• 𝑑 is a divisor of 𝑛
• 𝑑 divides 𝑛
• Symbolically; 𝑑|𝑛 ↔ ∃ integer 𝑘 such that 𝑛 = 𝑑𝑘
Remark!
The notation 𝑎 | 𝑏 stands for the sentence "a divides b," on the hand the
𝑎
notation 𝑎 / 𝑏 stands for the fractional number which may or may not be
𝑏
an integer.
Example 13
12
• Any nonzero integer k divides 0 as 0 = k × 0.
Example 14
Solution
Yes. To say that 𝑎 | 𝑏 means that 𝑏 = 𝑘𝑎 for some integer k. Now k must
be a positive integer because both 𝑎 and b are positive. It follows that
1 ≤𝑘
𝑎 ≤ 𝑘𝑎 = 𝑏 ∎
Example 15
Solution
Also, it has been mentioned in section 4.3.2 that in order to prove that a
universal statement is wrong, a counterexample is needed.
13
Example 16
Solution
𝑐 = 𝑏𝑠 by equation 2.4.2
𝑐 = 𝑎(𝑟𝑠). ∎
14
Theorem 2.4.1
Proof
𝑐 = 𝑎𝑘 where 𝑘 is an integer.
Example 17
Solution
Let 𝑎 = 2 and 𝑏 = −2
Then, 𝑎|𝑏since2|(−2) and b|a since (−2)|2,
but a ≠ b since 2 ≠ −2
Therefore, the statement is false.
15
The search for a proof will frequently help you discover counterexample
(provided the statement you are trying to prove is, in fact, false).
Conversely, in trying to find a counterexample for a statement, you may
come to realize the reason why it is true (if it is, in fact, true).
Theorem 2.4.2
(8 .7.6 .5 .4 .3 .2 𝑚 ) = 17.16.15.14.13.12.11.10
Does 17|𝑚?
Solution
Since 17 is one of the prime factors of the right-hand side of the equation,
it is also a prime factor of the left-hand side (by the unique factorization
theorem). But 17 does not equal any prime factor of 8, 7, 6, 5, 4, 3, or 2 .
Hence 17 must occur as one of the prime factors of 𝑚, and so 17|𝑚.
16
2.5 REPRESENTATION OF INTEGERS (DEFINITIONS AND METHODS OF PROOF IV)
Theorem 2.5.1
Example 19
• 54 = 52 + 2 = 4 · 13 + 2;
Hence 𝑞 = 13 and 𝑟 = 2
17
Mod and Div
Example 20
Solution
Example 21
Suppose today is Tuesday, and neither this year nor next year is a leap
year. What day of the week will it be 1 year from today?
Solution
There are 365 days in a year that is not a leap year, and each week has 7
days. Now 365 𝒅𝒊𝒗 7 = 52 and 365 𝒎𝒐𝒅 7 = 1.
18
2.5.1 DIVISION INTO CASES
The division into cases in a proof is like the transfer of control for an if-
then-else statement in a computer program. If m is even, control transfers
to case 1; if not, control transfers to case 2. For any given integer, only
one of the cases will apply. You must consider both cases, however, to
obtain a proof that is valid for an arbitrarily given integer whether even
or not.
Example 22
Prove that given any two consecutive integers, one is even and the other
is odd.
Solution
Two integers are called consecutive if, and only if, one is one more than
the other. So, if one integer is m, the next consecutive integer is m + 1.
To prove the given statement, start by supposing that you have two
particulars but arbitrarily chosen consecutive integers. If the smaller is
m, then the larger will be m + 1. How do you know for sure that one of
these is even and the other is odd? You might imagine some examples: 4,
5; 12, 13; 1,073, 1,074. In the first two examples, the smaller of the two
integers is even and the larger is odd; in the last example, it is the reverse.
19
These observations suggest dividing the analysis into two cases.
In the second case, when m is odd, it appears that the next consecutive
integer is even.
Theorem 2.5.1
Suppose that two consecutive integers are given; call them 𝑚 and 𝑚 +
1. [We must show that one of 𝑚 and 𝑚 + 1 is even and that the other
is odd.]
Case I (𝑚 is even): In this case, 𝑚 = 2𝑘 for some integer 𝑘 , and so
𝑚 + 1 = 2𝑘 + 1,
which is odd [by definition]. Hence in this case, one of 𝑚 and 𝑚 + 1 is
even and the other is odd.
Case 2 (23
Example 𝑚 is odd): In this case, 𝑚 = 2𝑘 + 1 for some integer k, and
so 𝑚 + 1 = (2𝑘 + 1) + 1 = 2𝑘 + 2 = 2(𝑘 + 1) . But 𝑘 + 1 is
an integer
Example 24because it is a sum of two integers. Therefore, 𝑚 + 1 equals
twice some integer, and thus 𝑚 + 1 is even.
Hence in this case also, one of m and m + 1 is even and the other is odd.
It follows that regardless of which case actually occurs for the
particular m and 𝑚 + 1 that are chosen, one of 𝑚 and 𝑚 + 1 is even
and the other is odd.∎ 20
Example 23
Show that any integer can be written in one of the four forms;
𝑛 = 4𝑞 𝑜𝑟 𝑛 = 4𝑞 + 1 𝑜𝑟 𝑛 = 4𝑞 + 2 𝑜𝑟 𝑛 = 4𝑞 + 3
Solution
𝑛 = 4𝑞 + 𝑟 and 0 ≤ 𝑟 < 4.
But the only nonnegative remainders 𝑟 that are less than 4 are 0, 1, 2, and
3. Hence, 𝑛 = 4𝑞 or 𝑛 = 4𝑞 + 1 or 𝑛 = 4𝑞 + 2 or 𝑛 = 4𝑞 + 3
Example 24
Prove that the square of any odd integer has the form 8𝑚 + 1 for some
integer 𝑚.
Solution
Formal Restatement: ∀ odd integers 𝑛, ∃ an integer 𝑚 such that 𝑛2 =
8𝑚 + 1.
21
Yet another possibility is to use the result of Example 23. That example
showed that any integer can be written in one of the four forms 𝑛 = 4𝑞 or
𝑛 = 4𝑞 + 1 or 𝑛 = 4𝑞 + 2 or 𝑛 = 4𝑞 + 3. Two of these, 4𝑞 + 1 and 4𝑞 + 3,
are odd. Thus, any odd integer can be written in the form 𝑛 = 4𝑞 + 1 or
𝑛 = 4𝑞 + 3 for some integer 𝑞. You could try breaking into cases based on
these two different forms. It turns out that this last possibility works! In
each of the two cases, the conclusion follows readily by direct calculation.
The details are shown in the following formal proof:
Theorem 2.5.2
• The square of any odd integer has the form 8m + 1 for
some integer m.
Proof
Suppose n is an odd integer. By the quotient-remainder theorem, n can be written
in one of the forms 4𝑞 or 4 𝑞 + 1 or 4𝑞 + 2 or 4𝑞 + 3 for some integer 𝑞. In fact,
since 𝑛 is odd and 4𝑞 𝑎𝑛𝑑 4𝑞 + 2 are even, n must have one of the forms 4𝑞 +
1 or 4𝑞 + 3.
Case 1 (𝑛 = 4𝑞 + 1 for some integer q): [find an integer 𝑚 such that 𝑛2 = 8𝑚 + 1.]
Since 𝑛 = 4𝑞 + 1,
𝑛2 = (4𝑞 + 1)2 by substitution
= (4𝑞 + 1) (4𝑞 + 1) by definition of square
= 16𝑞 2 + 8𝑞 + 1
= 8(2𝑞 2 + 𝑞) + 1 by the laws of algebra.
2
Let 𝑚 = 2𝑞 + 𝑞. Then 𝑚 is an integer since 2 𝑎𝑛𝑑 𝑞 are integers and sums and
products of integers are integers. Thus, substituting, 𝑛2 = 8𝑚 + 1 where 𝑚 is
an integer.
Case 2 (𝑛 = 4𝑞 + 3 for some integer q): [find an integer 𝑚 such that 𝑛2 = 8𝑚 + 3.]
Since 𝑛 = 4𝑞 + 3,
𝑛2 = (4𝑞 + 3)2 by substitution
= (4𝑞 + 3) (4𝑞 + 3) by definition of square
= 16𝑞 2 + 24𝑞 + 9
= 8(2𝑞 2 + 3𝑞) + 8 + 1
= 8(2𝑞 2 + 3𝑞 + 1) + 1 by the laws of algebra.
22
2.6 FLOOR AND CEILING (DEFINITIONS AND METHODS OF PROOF V)
The floor and ceiling of the number are the integers to the immediate left
and to the immediate right of the number (unless the number is, itself, an
integer, in which case its floor and ceiling both equal the number itself).
Many computer languages have built-in functions that compute floor and
ceiling automatically. These functions are very convenient to use when
writing certain kinds of computer programs. In addition, the concepts of
floor and ceiling are important in analyzing the efficiency of many
computer algorithms.
Floor
Ceiling
• The ceiling of a real number 𝑥 , 𝑥 , is a unique integer 𝑛
such that 𝑛 − 1 < 𝑥 ≤ 𝑛: 𝑥 = 𝑛 ⟷ 𝑛 − 1 < 𝑥 ≤ 𝑛
Example 25
• 25/4 = 6.25, where 6 < 6.25 < 7. Then ⌊25/4⌋ = 6 and ⌈25/4⌉ = 7
• 0.999, where 0 < 0.999 < 1. Then ⌊0.999⌋ = 0 and ⌈0.999⌉ = 1
• −2.01, since −3 < −2.01 < −2. Then ⌊−2.01⌋ = −3 and ⌈−2.01⌉ = −2
23
Example 26
The 1,370 students at a college are given the opportunity to take buses to an
out-of-town game. Each bus holds a maximum of 40 passengers.
a. For reasons of economy, the athletic director will send only full buses.
What is the maximum number of buses the athletic director will send?
b. If the athletic director is willing to send one partially filled bus, how
many buses will be needed to allow all the students to take the trip?
Solution
Example 27
Solution
Solution
24
This double inequality enables you to compute the value of ⌊𝑥 + 𝑚⌋ in
terms of 𝑛 by adding m to all sides:
𝑛 + 𝑚 ≤ 𝑥 + 𝑚 < 𝑛 + 𝑚 + 1.
⌊𝑥 + 𝑚⌋ = 𝑛 + 𝑚.
On the other hand, since 𝑛 = ⌊𝑥⌋, the right-hand side of the equation to
be shown is ⌊𝑥⌋ + 𝑚 = 𝑛 + 𝑚 also. Thus, ⌊𝑥 + 𝑚⌋ = ⌊𝑥⌋ + 𝑚 . This
discussion is summarized as follows:
Theorem 2.6.1
Proof
Thus, ⌊𝑥 + 𝑚⌋ = ⌊𝑥⌋ + 𝑚. ∎
25
Example 29 Proving a property of floor by using Division into Cases
𝑛
𝑛
𝑛 𝑒𝑣𝑒𝑛
Prove that for any integer 𝑛, ⌊ ⌋ = { 2𝑛−1
2
𝑛 𝑜𝑑𝑑
2
Solution
Theorem 2.6.2
𝑛Τ 𝑛 𝑒𝑣𝑒𝑛
𝑛 2
• for any integer n, = { (𝑛−1)
2 ൗ2 𝑛 𝑜𝑑𝑑
Proof
26
Example 30 Disproving a property by counterexample
Solution
so is 𝑥 = ⌊ 𝑥⌋ + fractional part of x
where the term fractional part is understood here to mean the part of the
number to the right of the decimal point when the number is written in decimal
notation. Thus, if 𝑥 𝑎𝑛𝑑 𝑦 are positive,
But also
These equations show that if there exist numbers x and y such that the sum of
the fractional parts of 𝑥 𝑎𝑛𝑑 𝑦 is at least 1, then a counterexample can be found.
27
2.7 CLASSICAL THEOREMS (DEFINITIONS AND METHODS OF PROOF VI)
This section contains proofs of two of the most famous theorems in
mathematics: The first one is that √2 is irrational (discovered by the Greek)
and the second one is that there are infinitely many prime numbers (discovered
by Euclid). Both proofs are examples of indirect arguments and were well
known more than 2,000 years ago, but they remain models of mathematical
argument to this day.
Solution For the proof, the “certain property” is the property of being the
greatest integer. To prove that there is no object with this property, begin
by supposing the negation: that there is an object with the property.
28
Theorem 2.7.1.1
Proof
[We take the negation of the theorem and suppose it to be true.]
Suppose not. That is, suppose there is a greatest integer N. [We must
deduce a contradiction.] Then N ≥ n for every integer n. Let M = N + 1.
Now M is an integer since it is a sum of integers. Also, M > N since M =
N + 1. Thus, M is an integer that is greater than N. So N is the greatest
integer and N is not the greatest integer, which is a contradiction. [This
contradiction shows that the supposition is false and hence, that the
theorem is true.].∎
Theorem 2.7.1.2
Solution
Theorem 2.7.1.3
Proof
[We take the negation of the theorem and suppose it to be true.]
Suppose not. That is, suppose there is a rational number r and an
irrational number s such that r + s is rational. [We must deduce a
contradiction.] By definition of rational, r = a/b and r + s = c/d for
some integers a, b, c, and d with b ≠ 0 and d ≠ 0. By substitution,
𝑎 𝑐
+𝑠 =
𝑏 𝑑
and so,
𝑐 𝑎 𝑎
𝑠 = − by subtracting from both sides
Example 32 𝑑 𝑏 𝑏
𝑐𝑏−𝑎𝑑
= by the laws of algebra.
𝑏𝑑
Now bc − ad and bd are both integers [since a, b, c, and d are integers
and since products and differences of integers are integers], and bd ≠
0 [by the zero-product property].
Hence s is a quotient of the two integers bc − ad and bd with bd ≠ 0.
Thus, by definition of rational, s is rational, which contradicts the
supposition that s is irrational.
[Hence the supposition is false and the theorem is true.]∎
30
Example 33 Classical Theorem 1:
√2 is irrational.
Solution
Theorem 2.7.1.4
• 2 is irrational.
Proof
[We take the negation of the theorem and suppose it to be true.]
Suppose not. Then √2 is equal to a fraction a/b. Without loss of
generality, assume a/b is in lowest terms (otherwise reduce the
fraction). So,
2 = a2 Τ𝑏 2
And,
2𝑏 2 = a2
𝑏 2 =2𝑘 2
31
Example 34 Classical Theorem 2:
Solution
Theorem 2.7.1.4
Proof
[We take the negation of the theorem and suppose it to be true.]
Suppose not. That is, suppose the set of prime numbers is finite.
[We must deduce a contradiction.] Then some prime number p is
the largest of all the prime numbers,
2, 3, 5, 7, 11, . . ., p.
N = (2·3·5·7·11· · ·p) + 1
Example 32
N is not divisible by any of the prime numbers in the list
32
2.7.2 PROOF BY CONTRAPOSITION
Example 35
Solution
Try something else: write the contrapositive of the statement. We get, for
all integers 𝑛, if 𝑛 is odd then 𝑛2 is odd. This looks much more promising.
33
Theorem 2.7.2.1
Proof
[We take the negation of the theorem and suppose it to be true.]
Let n be an arbitrary integer. Suppose that n is not even, and thus odd.
Then,
n=2k+1 for some integer k.
Now,
n2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1
Example 36 Prove: for all integers a and b, if a+b is odd, then a is odd
or b is odd.
Solution
The contrapositive of the statement we are trying to prove is: for all
integers a and b, if a and b are even (De Morgan’s Law of union),
then a+b is even. Thus, our proof will have the following format:
Let a and b be integers. Assume that a and b are both even (not odd).
Therefore a+b is even (not odd).
34
Let a and b be integers. Assume that a and b are even. Then, a=2k
and b=2l for some integers k and l.
Solution
35