Elementary Number Theory
Elementary Number Theory
Elementary Number Theory
Kenneth H. Rosen
Chapter 1
The Integers
1.1
In this section, we discuss several important tools that are useful for proving
theorems. We begin by stating an important axiom, the well-ordering property.
The Well-Ordering Theorem. Every nonempty set of positive integers has
a least element.
The principle of mathematical induction is a valuable tool for proving results about the integers. We now state this principle, and show how to prove it
using the well-ordering property. Afterwards, we give an example to demonstrate the use of the principle of mathematical induction. In our study of
number theory, we will use both the well-ordering property and the principle
of mathematical induction many times.
The Principal of Mathematical Induction A set of positive integers that
contains the integer 1 and the integer n + 1 whenever it contains n must be
the set of all positive integers.
Proof. Let S be a set of positive integers containing the integer 1 and the
integer n + 1 whenever it contains n. Assume 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, since the set of positive integers not
contained in S is nonempty, there is a least positive integer n which is not in
S. Note that n 6= 1, since 1 is in S. Now since n > l, the integer n 1 is a
positive integer smaller than n, and hence must be in S. But since S contains
n 1, it must also contain (n 1) + 1 = n, which is a contradiction, since n
is supposedly the smallest positive integer not in S. This shows that S must
be the set of all positive integers.
ak = a1 + a2 + ... + an .
k=1
We note that the letter k, the index of summation, is a dummy variable and
can be replaced by any letter, so that
n
X
k=1
ak =
n
X
j=1
aj =
n
X
ai ,
i=1
and so forth.
Example. We see that
5
X
j = 1 + 2 + 3 + 4 + 5 = 15,
j=1
5
X
2 = 2 + 2 + 2 + 2 + 2 = 10,
j=1
and
5
X
j=1
2j = 2 + 22 + 23 + 24 + 25 = 62.
ak = am + am+1 + ... + an .
k=m
k 2 = 32 + 42 + 52 = 50,
k=3
2
X
3k = 30 + 31 + 32 = 13,
k=0
and
1
X
k 3 = (2)3 + (1)3 + 03 + 13 = 8.
k=2
j=0
arn+1 a
.
r1
(1.1)
Proof. To prove that the formula for the sum of terms of a geometric progression is valid, we must first show that it holds for n = 1. Then, we must show
that if the formula is valid for the positive integer n, it must also be true for
the positive integer n 1.
To start things off, let n = 1. Then, the left side of (1.1) is a + ar, while on
the right side of (1.1) we have
ar2 a
a(r2 1)
a(r + 1)(r 1)
=
=
= a(r + 1) = a + ar.
r1
r1
r1
ar(n+1)+1 a
arn+2 a
=
.
r1
r1
(1.3)
To show that (1.3) is valid, we add arn+1 to both sides of (1.2), to obtain
(a + ar + ar2 + ... + arn ) + arn+1 =
arn+1 a
+ arn+1 .
r1
(1.4)
The left side of (1.4) is identical to that of (1.3). To show that the right sides
are equal, we note that
arn+1 arn+1 (r 1)
arn+1 a
+ arn+1 =
+
r1
r1
r1
arn+1 a + arn+2 arn+1
=
r1
arn+2 a
=
.
r1
Since we have shown that (1.2) implies (1.3), we can conclude that (1.1) holds
for all positive integers n.
Example. Let n be a positive integer. To find the sum
n
X
2k = 1 + 2 + 22 + ... + 2n ,
k=0
A slight variant of the principle of mathematical induction is also sometimes useful in proofs.
The Second Principle of Mathematical Induction. A set of positive
integers which contains the integer 1, and which has the property that if it
contains all the positive integers 1, 2, ..., k , then it also contains the integer
k + l, must be the set of all positive integers.
Proof. Let T be a set of integers containing 1 and containing k + 1 if it contains 1, 2, ..., k. Let S be the set of all positive integers n such that all the
positive integers less than or equal to n are in Z. Then 1 is in S, and by the
hypotheses, we see that if k is in S, then k + 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.
The principle of mathematical induction provides a method for defining
the values of functions at positive integers.
Definition. We say the function f is defined recursively if the value of f at
1 is specified and if a rule is provided for determining f (n + 1) from f (n).
If a function is defined recursively, one can use the principles of mathematical induction to show it is defined uniquely at each positive integer. (See
problem 12 at the end of this section.)
We now give an example of a function defined recursively. We define the
factorial function f (n) = n!. First, we specify that
f (1) = 1,
and then we give the rile for finding f (n + 1) from f (n), namely
f (n + 1) = (n + 1) f (n).
These two statements uniquely define n!.
To find the value of f (6) = 6! from the recursive definition of f (n) = n!,
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).
We now use the first statement of the definition to replace f (1) by its stated
value to 1, to conclude that
6! = 6 5 4 3 2 1 = 720.
In general, by successively using the recursive definition, we see that n! is the
product of the first n positive integers, i.e.
n! = 1 2 3...n.
For convenience, and future use, we specify that 0! = 1.
j = 1 2 3 4 5 = 120.
j=1
5
Y
2 = 2 2 2 2 2 = 32.
j=1
5
Y
2j = 2 22 23 24 25 = 215 .
j=1
n
Y
j.
j=1
(i)
(ii)
10
n = 2:
n = 3:
n = 4:
1
1
1
2
3
4
1
3
We see that the exterior numbers in the triangle are all 1. To find an
interior number,we simply add the two numbers in the positions above and
to either side, of the position being filled. From Theorem1.2, this yields the
correct integer.
Binomial coefficients occur in the expansions of powers of sums. Exactly
how they occur is described by the binomial theorem.
The Binomial Theorem. Let x and y be variables and n a positive integer.
Then
n n
n n1
n n2 2
n
(x + y) =
x +
x
y+
x
y + ...
0
1
2
n
n
n n
2 n2
n1
+
x y
+
xy
+
y ,
n2
n1
n
11
j=0
We must not verify that the corresponding formula holds with n replaced by
n + 1, assuming the result holds for n. Hence, we have
(x + y)n+1 = (x + y)n (x + y)
" n
#
X n
nj j
=
x y (x + y)
j
j=0
n
n
X
n nj+1 j X n nj j+1
=
x
y +
x y .
j
j
j=0
j=0
We see that by removing terms from the sums and consequently shifting indices, that
n
n
X
X
n nj+1 j
n nj+1 j
n+1
x
y =x
+
x
y
j
j
j=0
j=1
and
n
n1
X
n nj j+1 X n nj j+1
x y
=
x y
+ y n+1
j
j
j=0
j=0
n
X
n
=
xnj+1 y j + y n+1 .
j1
j=1
12
"
#
n
X
n
n
= xn+1 +
+
xnj+1 y j + y n+1 .
j
j1
j=1
n
X
n+1
j=1
xnj+1 y j + y n+1
n+1
X
j=0
n + 1 n+1j j
x
y .
j
j=0
This formula shows that if we add all elements of the (n + 1)th row of Pascals
triangle, we get 2n . For instance, for the first row, we find that
4
4
4
4
4
+
+
+
+
= 1 + 4 + 6 + 4 + 1 = 16 = 24 .
0
1
2
3
4
1.1 Problems
1. Find the values of the following sums
a)
10
X
c)
j=1
b)
10
X
j=1
10
X
j2
j=1
d)
10
X
j=1
2j .
13
a)
5
Y
c)
j=1
b)
5
Y
5
Y
j2
j=1
d)
j=1
5
Y
2j .
j=1
n
X
j = 1 + 2 + 3 + ... + n =
j=1
b)
n
X
n(n + 1)
n
j 2 = 12 + 22 + 32 + ... + n2 =
j=1
c)
n
X
j=1
n(n + 1)(2n + 1)
6
"
n(n + 1)
j = 1 + 2 + 3 + ... + n =
2
3
n
Y
#2
2j .
j=1
14
n
X
n
k=0
= 2n , to find
n
n
n
+
+
+ ...
0
2
4
and
n
n
n
+
+
+ ...
3
5
1
c) Find the sum1 2 + 22 23 + ... + 2100 .
15. Show by mathematical induction that if n is a positive integer, then
(2n)! < 22n (n!)2 .
x
16. The binomial coefficients
, where x is a variable, and n is a posin
x
tive integer, can be defined recursively by the equations
= x and
1
x
xn x
=
.
n+1
n+1 n
x
x!
a) Show that if x is a positive integer, then
=
, where
k
k!(x k)!
k is an integer with 1 k x.
x
x
x+1
b) Show that
+
=
, whenever n is a positive
n
n+1
n+1
integer.
15
17. In this problem, we develop the principle of inclusion - exclusion. Suppose that S is a set with n elements and let P1 , P2 , ..., Pt be t different
properties that an element of S may have. Show that the number of
elements of S possessing none of the t properties is
n [n(P1 ) + n(P2 ) + ... + n(Pt )]
+ [n(P1 , P2 ) + n(P1 , P3 ) + ... + n(Pt1 , Pt )]
[n(P1 , P2 , P3 ) + n(P1 , P2 , P4 ) + ... + n(Pt2 , Pt1 , Pt )]
+ ... + (1)t n(P1 , P2 , ..., Pt ),
where n(Pi1 , Pi2 , ..., Pit ) is the number of elements of S possessing all of
the properties Pi1 , Pi2 , ..., Pit . The first expression in brackets contains a
term for each property, the second expression in brackets contains terms
for all combinations of two properties, the third expression contains
terms for all combinations of three properties, and so forth. (Hint: For
each element of S determine the number of times it is counted in the
above
expression.
If an elementhas
k of the properties, show it is counted
k
k
k
1
+
... + (1)k
times. This equals zero by problem
1
2
k
14(a).)
18. The tower of Hanoi was a popular puzzle of the late nineteenth century.
The puzzle includes three pegs and eight rings of different sizes placed
in order of size,with the largest on the bottom, on one of the pegs. The
goal of the puzzle is to move all the rings, one at a time without ever
placing a larger ring on top of a smaller ring, from the first peg to the
second, using the third peg as an auxiliary peg.
a) Use mathematical induction to show that the minimum number of
moves to transfer n rings, with the rules we have described, from
one peg to another is 2n 1.
b) An ancient legend tells of the monks in a tower with 64 gold rings
and 3 diamond pegs. They started moving the rings, one move per
second, when the world was created. When they finish transferring
the rings to the second peg, the world ends. How long will the
world last?
19. Without multiplying all the terms, show that
a) 6! 7! = 10!
c) 16! = 14! 5! 2!
b) 10! = 7! 5! 3!
d) 9! = 7! 3! 3! 2!.
16
1.2
Divisibility
1.2. DIVISIBILITY
17
For the proof of the division algorithm and for subsequent numerical computations,we need to define a new function.
18
Example. We have the following values for the greatest integer in x : [2.2] =
2, [3] = 3, and [1.5] = 2.
The proposition below follows directly from the definition of the greatest
integer function.
Proposition 1.5. If x is a real number, then x 1 < [x] x.
We can now prove the division algorithm. Note that in the proof we
give explicit formulae for the quotient and remainder in terms of the greatest
integer function.
Proof. Let q = [a/b] and r = a b[a/b]. Clearly a = bq + r. To show that the
remainder r satisfies the appropriate inequality, note that from Proposition
1.5, it follows that
(a/b) 1 < [a/b] a/b.
We multiply this inequality by b, to obtain
a b < b[a/b] a.
Multiplying by -1, and reversing the inequality, we find that
a b[a/b] < b a.
By adding a, we see that
0 r = a b[a/b] < b.
To show that the quotient and the remainder r are unique, assume that we
have two equations a = bq1 + r1 and bq2 + r2 , with 0 r1 < b and 0 r2 < b.
By subtracting the second of these from the first, we find that
0 = b(q1 q2 ) + (r1 r2 ).
Hence, we see that
r2 r1 = b(q1 q2 ).
This tells us that b divides r1 r2 . Since 0 r1 < b and 0 r2 < b, we have
b < r2 r1 < b. This shows that b can divide r2 r1 only if r2 r1 = 0, or,
in other words, if r1 = r2 . Since bq1 + r1 = bq2 + r2 and r1 = r2 we also see
that q1 = q2 . This shows that the quotient q and the remainder r are unique.