Number Theory Week 1 - 4
Number Theory Week 1 - 4
I. INTEGERS
Numbers
The integers are the numbers in the set {..., -3, -2, -1, 0, 1, 2, 3, ...}. The integers play center stage
in the study of number theory. One property of the positive integers deserves special mention.
The Well-Ordering Property. Every nonempty set of positive integers has a least element.
The well-ordering property can be taken as one of the axioms defining the set of positive integers
or it may be derived from a set of axioms in which it is not included. We say that the set of positive integers
is well ordered. However, the set of all integers (positive, negative, and zero) is not well ordered, as there
are sets of integers without a smallest element, such as the set of negative integers, the set of even integers
less than 100, and the set of all integers itself.
Another important class of numbers in the study of number theory is the set of numbers that can
be written as a ratio of integers.
Definition. The real number r is rational if there are integers p and q, with q ≠ 0, such that r = p / q. If r is
not rational, it is said to be irrational.
Example 1.1. The numbers -22/7, 0 = 0/1, 2/17, and 1111/41 are rational numbers.
Note that every integer n is a rational number, because n = n / 1. Examples of irrational numbers are
√2, 𝜋, and 𝑒.
The sets of integers, positive integers, rational numbers, and real numbers are traditionally denoted
+
by Z, Z , Q, and R, respectively. Also, we write x∈S to indicate that x belongs to the set S. Such notation
will be used occasionally in this book.
Definition. A number α is algebraic if it is the root of a polynomial with integer coefficients; that is, α is
algebraic if there exist integers 𝑎_0, 𝑎_(1, …,) 𝑎_𝑛 , such that 𝑎_𝑛 𝛼^𝑛+𝑎_(𝑛−1) 𝛼^(𝑛−1)+ ∙∙∙+𝑎_0=0.
The number α is called transcendental if it is not algebraic.
Example 1.2. The irrational number √2 is algebraic, because it is a root of the polynomial 𝑥 2 - 2.
Note that every rational number is algebraic. This follows from the fact that the number a/b, where a and
b are integers and b ≠0, is the root of bx - a.
Sequences
A sequence {𝑎𝑛 } is a list of numbers 𝑎1 , 𝑎2, 𝑎3 ... We will consider many particular integer sequences in
our study of number theory. We introduce several useful sequences in the following examples.
Example 1.6. The sequence {an}, where an= n2, begins with the terms 1, 4, 9, 16, 25, 36, 49, 64, .... This
is the sequence of the squares of integers. The sequence{b n}, where bn = 2n, begins with the terms 2, 4, 8,
16, 32, 64, 128, 256, .... This is the sequence of powers of 2. The sequence {cn}, where cn = 0 if n is odd
and cn = 1 if n is even, begins with the terms 0, 1, 0, 1, 0, 1, 0, 1, . . ..
Definition. A geometric progression is a sequence of the form a, ar, ar2, ar3, ..., ark, ..., where a, the initial
term, and r, the common ratio, are real numbers.
Example 1.7. The sequence {an}, where an= 3 · 5n, n = 0, 1, 2, ..., is a geometric sequence with initial
term 3 and common ratio 5. (Note that we have started the sequence with the term a0. We can start the
index of the terms of a sequence with 0 or any other integer that we choose.)
Example 1.8. Conjecture a formula for an, where the first eight terms of {a n} are 4, 11, 18, 25, 32, 39, 46,
53. We note that each term, starting with the second, is obtained by adding 7 to the previous term.
Consequently, the nth term could be the initial term plus 7(n - 1). A reasonable conjecture is that an= 4 +
7(n - 1) = 7n - 3.
Definition. An arithmetic progression is a sequence of the form a, a + d, a + 2d, ..., a + nd, ..., where a,
the initial term, and d, the common difference, are real numbers.
Example 1.9. Conjecture a formula for an, where the first eight terms of the sequence {a n} are 5, 11, 29,
83, 245, 731, 2189, 6563. We note that each term is approximately 3 times the previous term, suggesting
a formula for an in terms of 3n. The integers 3n for n = 1, 2, 3, ... are 3, 9, 27, 81, 243, 729, 2187, 6561.
Looking at these two sequences together, we find that the formula a n = 3n + 2 produces these terms.
Example 1.10. Conjecture a formula for an, where the first ten terms of the sequence {an} are 1, 1, 2, 3, 5,
8, 13, 21, 34, 55. After examining this sequence from different perspectives, we notice that each term of
this sequence, after the first two terms, is the sum of the two preceding terms. That is, we see that a n= an-l
+ an-2 for 3≤ n≤ 10. This is an example of a recursive definition of a sequence. The terms listed in this
example are the initial terms of the Fibonacci sequence.
Definition. A set is countable if it is finite or it is infinite and there exists a one-to-one correspondence
between the set of positive integers and the set. A set that is not countable is called uncountable.
Theorem 1.4. The set of rational numbers is countable.
∑ 𝑎𝑘 = 𝑎1 + 𝑎2 + ⋯ + 𝑎𝑛 .
𝑘=1
The letter k, the index of summation, is a "dummy variable" and can be replaced by any letter. For instance,
𝑛 𝑛 𝑛
∑ 𝑎𝑘 = ∑ 𝑎𝑗 = ∑ 𝑎𝑖 , and so forth.
𝑘=1 𝑗=1 𝑖=1
because the terms in the sum are all those for which j is an integer not exceeding 10 that is a perfect square.
Three Properties for Summations
(1.1)
𝑛 𝑛
∑ 𝑐𝑎𝑗 = 𝑐 ∑ 𝑎𝑗
𝑗=𝑚 𝑗=𝑚
(1.2)
𝑛 𝑛 𝑛
∑ (𝑎𝑗 + 𝑏𝑗 ) = ∑ 𝑎𝑗 + ∑ 𝑏𝑗
𝑗=𝑚 𝑗=𝑚 𝑗=𝑚
(1.3)
𝑛 𝑞 𝑛 𝑞 𝑞 𝑛
∑ ∑ 𝑎𝑖 𝑏𝑗 = (∑ 𝑎𝑗 ) (∑ 𝑏𝑗 ) = ∑ ∑ 𝑎𝑖 𝑏𝑗
𝑖=𝑚 𝑗=𝑝 𝑖=𝑚 𝑗=𝑝 𝑗=𝑝 𝑖=𝑚
To evaluate the sums of consecutive terms of a geometric series, we use the formula:
𝑎𝑟 𝑛+1 −𝑎
𝑆= , where r ≠ 1.
𝑟−1
Example 1.13. Let n be a positive integer. To find the sum
𝑛
∑ 2𝑘 = 1 + 2 + 22 + ⋯ + 2𝑛
𝑘=0
2𝑛+1 − 1
1 + 2 + 22 + ⋯ + 2𝑛 = = 2𝑛+1 − 1
2−1
We also define a notation for products, analogous to that for summations. The product of the numbers a1,
a2, ..., an is denoted by
𝑛
∏ 𝑎𝑗 = 𝑎1 𝑎2 … 𝑎𝑛
𝑗=1
The letter j above is a "dummy variable," and can be replaced arbitrarily.
Example 1.14. To illustrate the notation for products, we have
5
∏ 𝑗 = 1 ∙ 2 ∙ 3 ∙ 4 ∙ 5 = 120
𝑗=1
5
∏ 2 = 2 ∙ 2 ∙ 2 ∙ 2 ∙ 2 = 25 = 32
𝑗=1
5
∏ 2𝑗 = 21 ∙ 22 ∙ 23 ∙ 24 ∙ 25 = 215
𝑗=1
∑(2𝑗 − 1) = 1 + 3 + · · · + 2𝑛 − 1 = 𝑛2
𝑗=1
for every positive integer n. (By the way, if our conjecture for the value of this sum was incorrect,
mathematical induction would fail to produce a proof!)
We begin with the basis step, which follows because
1
∑(2𝑗 − 1) = 2 ∙ 1 − 1 = 1 = 12
𝑗=1
For the inductive step, we assume the inductive hypothesis that the formula holds for n; that is, we assume
that ∑𝑛𝑗=1 (2𝑗 − 1) = 𝑛2 . Using the inductive hypothesis, we have
𝑛+1 𝑛
= 𝑛2 + 2(𝑛 + 1) − 1
= 𝑛2 + 2𝑛 + 1
= (𝑛 + 1)2
Because both the basis and the inductive steps have been completed, we know that the result holds. Next,
we prove an inequality via mathematical induction.
Example 1.17. We can show by mathematical induction that n! ≤ nn for every positive integer n. The basis
step, namely, the case where n = l, holds because 1! = 1 ≤ 11 = 1. Now, assume that n! ≤ nn ; this is the
inductive hypothesis. To complete the proof, we must show, under the assumption that the inductive
hypothesis is true, that (n + 1)! ≤ (n + l)n+l. Using the inductive hypothesis, we have
(n + 1)! = (n + l) . n!
≤ (n + 1)nn
≤ (n + 1)(n+1)n
≤ (n + 1)n+1
This completes both the inductive step and the proof. We now show that the principle of mathematical
induction follows from the well-ordering principle.
Proof. Let S be a set of positive integers containing the integer 1, and the integer n + 1 whenever it contains
n. Assume (for the sake of contradiction) that S is not the set of all positive integers. Therefore, there are
some positive integers not contained in S. By the well-ordering property, because the set of positive
integers not contained in S is nonempty, there is a least positive integer n that is not in S. Note that n≠1,
because 1 is in S.
Now, because n > 1 (as there is no positive integer n with n < 1), the integer n - 1 is a positive integer
smaller than n, and hence must be in S. But because S contains n - 1, it must also contain (n - 1) + 1 = n,
which is a contradiction, as n is supposedly the smallest positive integer not in S. This shows that S must
be the set of all positive integers. •
A slight variant of the principle of mathematical induction is also sometimes useful in proofs.
Theorem 1.6. The Second Principle of Mathematical Induction. A set of positive integers that contains
the integer 1, and that has the property that, for every positive integer n, if it contains all the positive
integers 1, 2, ..., n, then it also contains the integer n + 1, must be the set of all positive integers.
The second principle of mathematical induction is sometimes called strong induction to distinguish it from
the principle of mathematical induction, which is also called weak induction.
Example 1.18. We will show that any amount of postage more than one cent can be formed using just two-
cent and three-cent stamps. For the basis step, note that postage of two cents can be formed using one two-
cent stamp and postage of three cents can be formed using one three-cent stamp.
For the inductive step, assume that every amount of postage not exceeding n cents, n ≥ 3, can be formed
using two-cent and three-cent stamps. Then a postage amount of n + 1 cents can be formed by taking
stamps of n - 1 cents together with a two-cent stamp. This completes the proof.
Proof. Let T be a set of integers containing 1 and such that for every positive integer n, if it contains 1, 2,
..., n, it also contains n + 1. Let S be the set of all positive integers n such that all the positive integers less
than or equal to n are in T. Then 1 is in S, and by the hypotheses, we see that if n is in S, then n + 1 is in
S. Hence, by the principle of mathematical induction, S must be the set of all positive integers, so clearly
T is also the set of all positive integers, because S is a subset of T.
Recursive Definitions. The principle of mathematical induction provides a method for defining the values
of functions at positive integers. Instead of explicitly specifying the value of the function at n, we give the
value of the function at 1 and give a rule for finding, for each positive integer n, the value of the function
at n + 1 from the value of the function at n.
Definition. We say that the function f is defined recursively if the value off at 1 is specified and if for each
positive integer n a rule is provided for determining f (n + 1) from f(n).
The principle of mathematical induction can be used to show that a function that is defined recursively is
defined uniquely at each positive integer. We illustrate how to define a function recursively with the
following definition.
Example 1.19. We will recursively define the factorial function f (n) = n!. First, we specify that f (1) = 1.
Then we give a rule for finding f (n + 1) from f (n) for each positive integer, namely,
f (n + 1) = (n + 1) · f (n).
These two statements uniquely define n! for the set of positive integers.
To find the value of f (6) = 6! from the recursive definition, use the second property successively, as
follows:
f (6) = 6∙ f (5) = 6∙ 5∙ f (4) = 6∙ 5∙ 4∙ f (3) = 6∙5∙4∙3∙ f (2) = 6∙5∙4∙ 3∙2∙ f (1).
Then use the first statement of the definition to replace f (1) by its stated value 1, to conclude that
6! = 6 ∙5∙4 ∙3∙2∙1 = 720.
The second principle of mathematical induction also serves as a basis for recursive definitions. We can
define a function whose domain is the set of positive integers by specifying its value at 1 and giving a
rule, for each positive integer n, for finding f (n) from the values f (j) for each integer j with 1 ≤ j ≤ n - 1.
This will be the basis for the definition of the sequence of Fibonacci numbers.
∑ 𝑓𝑘 = 𝑓𝑛+2 − 1
𝑘=1
1.5. Divisibility
The concept of the divisibility of one integer by another is central in number theory.
Definition. If a and b are integers with a ≠0, we say that a divides b if there is an integer c such that b =
ac. If a divides b, we also say that a is a divisor or factor of b and that b is a multiple of a.
If a divides b we write a∣b, and if a does not divide b we write a∤b. (Be careful not to confuse the notations
a∣b, which denotes that a divides b, and a/b, which is the quotient obtained when a is divided by b.)
Example 1.22. The following statements illustrate the concept of the divisibility of integers: 13∣182, -5∣30,
17∣289, 6∤44, 7∤50, -3∣33, and 17∣0.
Example 1.23. The divisors of 6 are ± 1, ±2, ±3, ±6. The divisors of 17 are ± 1, ± 17. The divisors of 100
are ±1, ±2, ±4, ±5, ±10, ±20, ±25, ±50, ±100.
Theorem 1.8. If a, b, and c are integers with a ∣ b and b ∣ c, then a ∣ c.
Proof. Because a ∣ b and b ∣ c, there are integers e and f such that ae =b and bf= c. Hence, c =bf= (ae)f =
a(ef), and we conclude that a ∣ c.
Example 1.24. Because 11∣66 and 66∣198, Theorem 1.8 tells us that 11∣198.
Theorem 1.9. If a, b, m, and n are integers, and if c ∣ a and c ∣ b, then c ∣ (ma + nb).
Proof. Because c ∣ a and c ∣ b, there are integers e and f such that a= ce and b =cf. Hence, ma + nb = mce
+ ncf = c(me + nf). Consequently, we see that c ∣ (ma + nb )
Example 1.25. As 3∣21 and 3 ∣ 33, Theorem 1.9 tells us that 3 divides 5 ∙ 21- 3 ∙ 33 = 105 - 99 = 6.
Theorem 1.10. The Division Algorithm. If a and b are integers such that b > 0, then there are unique
integers q and r such that a = bq + r with 0 ≤ r < b.
Example 1.26. If a= 133 and b = 21, then q = 6 and r = 7, because 133 = 21·6 + 7 and 0 ≤ 7 < 21. Likewise,
if a= -50 and b = 8, then q = -7 and r = 6, because -50 = 8(-7) + 6 and 0 ≤ 6 < 8.
Example 1.27. Let a= 1028 and b = 34. Then a= bq + r with 0 ≤ r < b, where q = [1028/34] = 30 and r =
1028 - [1028/34] · 34 = 1028 - 30 · 34 = 8.
Example 1.28. Let a= - 380 and b = 75. Then a= bq + r with 0 ≤ r < b, where q = [-380/75] = -6 and r = -
380 - [-380/75] · 75 = - 380 - (-6)75 = 70.
Definition. If the remainder when n is divided by 2 is 0, then n = 2k for some integer k, and we say that n
is even, whereas if the remainder when n is divided by 2 is 1, then n = 2k + 1 for some integer k, and we
say that n is odd.
Greatest Common Divisors
If a and b are integers, not both 0, then the set of common divisors of a and b is a finite set of integers,
always containing the integers + 1 and -1. We are interested in the largest integer among the common
divisors of the two integers.
Definition. The greatest common divisor of two integers a and b, which are not both 0, is the largest
integer that divides both a and b.
Example 1.29. The common divisors of 24 and 84 are ±1, ±2, ±3, ±4, ±6, and ±12. Hence, (24, 84) = 12.
Similarly, looking at sets of common divisors, we find that (15, 81) = 3, (100, 5) = 5, (17, 25) = 1, (0, 44)
= 44, (-6, -15) = 3, and ( -17, 289) = 17.
Definition. The integers a and b, with a =j=. 0 and b =j=. 0, are relatively prime if a and b have greatest
common divisor (a, b) = 1.
Example 1.30. Because (25, 42) = 1, 25 and 42 are relatively prime.