Preface
This text was written with two goals in mind. It provides a
rigorous foundation for the theory of numbers and polynomials, and
it is an introduction to abstract algebra for upper-year math
majors. We hope to show through this book how the first can lead
naturally to the second.
We start with the Peano theory of the natural numbers N, based on
only two simple axioms and the principle of induction. Addition and
multiplication are defined inductively and we prove everything
straight through to the Fundamental Theorem of Arithmetic. As
always this chapter serves two purposes. You should go through it
thoroughly, because it is designed to sharpen your aptitude with
understanding and writing proofs, in the context of material that
handles a familiar subject in an abstract way. In addition, this
chapter serves as a paradigm for more abstract addition and
multiplication systems that will come later.
In Chapter 2 we construct the integers Z, the rational numbers Q,
and the modular arithmetic. This is done through a treatment on
equivalence classes, one of the most important fundamentals
throughout mathematics. We include some meanderings on the real
numbers R, which should be considered a work in progress. This
chapter is more about understanding the big picture of equivalence
classes than in the little pictures of checking properties like
associativity, although the mechanics of equivalence are
straightforward to learn.
Abstract Algebra finally begins in Chapter 3. We begin with a
standard introduc- tion to ring theory. The section on Abstract
Linear Algebra gives a proof-based theory of matrix multiplication
over a ring, and is encyclopedic in nature. The sec- tion on
polynomials presents a “Peano-like” approach to polynomial
multiplication, which is defined inductively. Next comes one of the
great analogies in mathematics: between integers and polynomials
(over a field). We hope you will appreciate how closely the
factorization theory of polynomials mimics that of integers from
Chapter 1. The last sections in this chapter touch a little on
field theory, and develop the theory of “modding” out in a general
ring. In particular we construct the complex numbers C from
R.
Chapter 4 is a work in progress. Even when it is finished, it is
meant more as a reference than something which would fit neatly
into a course. You can see the beginnings of a treatment of the
real numbers here, as well as a well-intended introduction to the
“p-adic numbers”, which are rings mainly of interest to number
theorists.
Chapter 5 explores the relationships between different rings;
namely homomor- phisms. The theory of bijections, also fundamental
throughout mathematics, is developed here.
Chapter 6 can be thought of as an application of many of the
previous ideas in the course, a close study of irreducible
polynomials over R and Q. Later I intend to add a section on
partial fractions.
4
The seventh chapter is a rapid introduction to group theory and may
not have enough material to serve your course. The chapter is
streamlined to give an im- mediate application of some simple group
theory ideas to the problem of finding orders of elements, an
application of which is Fermat’s Little Theorem.
The problems throughout the text are a compilation from old
homework, exam, and bonus problems, although I have stripped away
hints and demands for rigor. I feel that it is the instructor’s
place to adapt the problems to the class. However the self-studying
student should be warned that many of the problems are difficult,
and should not get hung up on the toughies, which I place at the
end of the chapters.
Much thanks are due to Ben Walter for teaching out of an earlier
version of the text, and for several of the problems.
If you find errata please e-mail them to me and I will thank you
and try to update the notes appropriately.
Steven Spallone
Preface 3
Chapter 1. Arithmetic 7 1. Introduction 8 2. Induction 8 3. The
Natural Numbers N 16 4. Divisibility 22 5. The Euclidean Algorithm
29 6. The Fundamental Theorem of Arithmetic 37 7. Rubric for
Chapter 1 42 8. Toughies 43
Chapter 2. Menschenwerk 45 1. Prelude: Angles 46 2. Equivalence 51
3. Modular Arithmetic I 56 4. The Positive Rationals Q+ 61 5. The
Integers Z 64 6. The Rational Numbers Q 69 7. Modular Arithmetic II
73 8. Rubric for Chapter 2 78 9. Toughies 78
Chapter 3. Rings 79 1. Abstract Algebra 80 2. Rings 81 3. Abstract
Linear Algebra 89 4. Polynomials 95 5. Polynomials over a Field 101
6. Extensions of Rings 113 7. Quotients of Rings 115 8. Rubric for
Chapter 3 118 9. Toughies 118
Chapter 4. Completion 119 1. Constructing R 120 2. Order 120 3.
Decimal Expansions 122 4. Dedekind Cuts 125 5. P-adic numbers Qp
133
5
6 CONTENTS
Chapter 5. Homomorphisms 135 1. Introduction 136 2. Homomorphisms:
A First Glance 136 3. Bijections 139 4. Isomorphisms of Rings 143
5. Homomorphisms from Quotient Rings 146 6. Rubric for Chapter 4
149 7. Toughies 149
Chapter 6. Irreducibile Polynomials 151 1. Irreducibility in C[x]
151 2. Irreducibility in R[x] 151 3. Irreducibility in Q[x] 152 4.
Z[x] 154
Chapter 7. Groups 157 1. Introduction 158 2. Definition and First
Examples 158 3. Orders 161 4. Rubric for Chapter 5 164
Bibliography 165
CHAPTER 1
1. Introduction
In this chapter we will develop the basic properties of arithmetic,
using as few assumptions as possible.
One of the assumptions is, essentially, the ability to use
induction. Induction is a basic tool of proof and we learn about
this in Section 2. I generally think of induction as a way to clean
up proofs by eliminating the phrase “and so on”.
In Section 3 we lay down the three “Peano Axioms”, and prove from
them the rules of addition and multiplication.
Arithmetic starts getting really interesting when we get to the
idea of division with remainder. In Section 4 we develop this
concept and the related idea of a place-value system.
In Section 4 we work out the theory of greatest common divisors. In
particular we deal with the idea of the “greatest” and “least”
element of a set. An important tool in understanding gcds is the
Euclidean Algorithm, and along the way we upgrade our induction
toolkit by learning Strong Induction.
By Section 5 we are ready to treat the theory of prime numbers, and
the Fundamen- tal Theorem of Arithmetic. The FTA says that every
number can be given unique “coordinates”, with one component for
each prime number. These coordinates completely determine the
multiplicative role of a number.
2. Induction
2.1. Standard Induction. We would like to spend an informal section
talk- ing about the idea of induction before getting into the full
rigor of the text. This section is therefore independent of those
following.
The method of induction is suggested by problems of the following
type. You want to prove a proposition P (n) which involves a
parameter n which is a natural number. As n varies, you get
infinitely many different propositions P (1), P (2), P (3), . . ..
Imagine that P (n) is easy when n is small but gets progressively
more complex as n grows. Then a reasonable idea is to try to prove
the smaller ones first, and work your way up to the bigger
ones.
Let’s recall something from basic logic. Suppose we have three
propositions P,Q, and R. [In this section, by “proposition”, I mean
a mathematical statement which may be true or false. In later
sections I will mean a “small theorem”.] From logic we know that if
P implies Q (written P ⇒ Q) and Q implies R, then P implies
R.
More generally, suppose we have a sequence of propositions P (1), .
. . , P (n), and for every k from 1 to n−1, we can show that P (k)
implies P (k+1). Then by iterating the above idea we get that P (1)
implies P (n):
P (1) ⇒ P (2) ⇒ P (3) ⇒ · · · ⇒ P (n− 1) ⇒ P (n)
2. INDUCTION 9
This is the basic form of induction. (The word “induction” suggests
an electrical analogy. Think of each P (k) as being connected to P
(k+1) by a wire. Then if you “charge up” P (1) with veracity, the
charge will eventually get to P (n).)
Thus in practice, if you want to prove P (n) for all integers n ≥ 1
by induction, then you must prove:
(1) P (1) is true. (2) For all k ∈ N, if P (k) is true, then P (k +
1) is true.
Step 2 has some logical complexity to it, and is often
misinterpreted. You do not prove that P (k) is true. You show that
if it were true, then P (k+1) would also be true.
Step 2 is usually the hardest. It’s not going to work unless you
see a relationship between the various P (k). You need to see a way
to make the step from each one to the next. Warning: it is *not*
always manageable to prove a proposition P (n) with induction, as
there may not be any tractable relationship present. Moreover, one
can often prove a proposition directly and more simply without
induction. So don’t get too carried away with this.
Let’s do some examples.
Proposition 1.1. For all n ∈ N, 1 + · · ·+ n = n(n+1) 2 .
Let us call the proposition P (n). It is healthy to always try
writing out explicitly a few of the smaller P (n)’s. For
instance
P (1) : 1 = 1(2) 2 ,
P (2) : 1 + 2 = 2(3) 2 ,
P (3) : 1 + 2 + 3 = 3(4) 2 .
All these are easily verified; this suggests that we have correctly
interpreted the problem. Warning: P (n) is not a number! Do not
say, for example, that P (2) = 3. The P (n) are always mathematical
statements, never numbers. In this case they are equations.
Now there is an obvious relationship between the P (k)’s as k
grows. The left hand side of P (k + 1) is obtained from the left
hand side of P (k) by adding k + 1.
So step 2 goes like this:
Suppose P (k) is true. Thus
1 + 2 + · · ·+ k = k(k + 1)
2 .
2 + (k + 1)
10 1. ARITHMETIC
is true.
We do some algebra to the right hand side and deduce that
1 + 2 + · · ·+ k + (k + 1) = (k + 1)(k + 2)
2 is true.
But this equation is exactly P (k + 1).
So that’s it. We have checked that P (1) is true, and proven Step
2. Finish by writing something like “Thus by standard induction P
(n) is true.”
I’d like to remark that this proof is a little unsatisfying, in
that it never really explains the formula. (Although it serves as a
good example of induction.) There are many proofs of this important
result; here is an easy one:
Write S for the sum of the first n numbers. Then
S = 1 + 2 + · · ·+ n,
Adding these equations yields
which yields the desired formula.
Our next example of induction I find much more satisfying. Let us
prove the power rule of calculus, that is
Proposition 1.2. If n ∈ N then d dx (xn) = nxn−1.
We will assume only the product rule for derivatives and the rule
dx dx = 1.
Proof. As before we write P (n) : “ d dx (xn) = nxn−1”. It is good
to fo-
cus first on a few small cases. P (1) is the rule dx dx = 1, which
we have al-
ready assumed. P (2) is the rule d dx (x2) = 2x. Why is this true?
Typically
one writes out limh→0 (x+h)2−x2
h , does some algebra and limit-logic to get P (2). But we want to
connect P (2) to P (1) and so will instead use the product rule: d
dx (x2) = d
dx (x · x) = x d dx (x) + x d
dx (x) = 2x d dx (x) = 2x. Note that the last equal-
ity uses P (1). Can we make this connection more generally? You
bet; using the product rule:
d
dx (x) + x
dx (xk).
We finish this off by applying P (1) and P (k):
= xk + x(kxk−1) = (k + 1)xk.
Combining all the equalities yields P (k + 1) : d dx (xk+1) = (k +
1)xk. Thus P (n) is
true by induction.
2. INDUCTION 11
2.2. Inductive Definitions. A related idea to proof by induction,
is that of “inductive definition”. For example n! may be familiar
to you as “the product of all numbers from one to n,” or n(n− 1) ·
· · 2 · 1. The inductive definition is:
Definition.
n! =
{ 1 if n = 1, n · (n− 1)! if n > 1.
For example if we want to know what 3! is, the definition says it
is 3 · 2!. This forces us to use the definition again to determine
that 2! = 2 · 1!, and we need to look once more at the definition
to find that 1! = 1. We put this all together to get 3! = 3 · 2 · 1
= 6. The reader should believe that given any positive integer n,
one can in principle use this definition to compute n!.
As another example, consider the nth derivative of a function f ,
dn
dxn (f), which may be familiar as “what you get when you
differentiate f n times”. The inductive definition is
Definition. dnf
{ df dx if n = 1, dn−1
dxn−1 df dx if n > 1.
The advantage of using inductive definitions is that it does not
require readers to use their imagination about doing something n
times. There are no “· · · ”s, for example; all the logic is laid
out for you. This is particularly nice when these concepts gang up
on you. Here is a small example.
Proposition 1.3. dn
dxn (xn) = n!
Proof. Induction on n. The statement for n = 1 is dx dx = 1, a
familiar fact.
Suppose the proposition is true for k. Then
dk+1
using the inductive definition of dn
dxn and Proposition 1.2. One factors out the k+1 and uses the
inductive hypothesis:
= (k + 1) · d k
dxk (xk) = (k + 1) · k!.
Finally, using the inductive definition of n! this is equal to (k +
1)!. We are done by induction.
I hope you can see in the above example that inductive definitions
mesh well with proofs by induction. The resulting proof is clean,
and does not ask the reader to visualize, for example, “a sequence
of exponents coming down and being multiplied, exactly as many
times as the power of x, until we simultaneously have x0 multiplied
the product of integers from 1 to n.” The latter, with some
examples, is fine if you’re talking to someone and can’t write
things down. The inductive proof is clearer and easier to
check.
12 1. ARITHMETIC
Here are a couple more inductive definitions. Let a1, a2, . . . ,
an, . . . be a sequence of numbers. Then
n∑ i=1
i=1 ai
Also commonly used is the notation n∏
i=1
i=1 ai
For example, ∑n
∏n i=1 i = n!.
2.3. Induction Schemes. I’d like to codify the logic of induction
from the previous section as (P (1), P (k) ⇒ P (k + 1)) ⇒ P (n) for
all n. The first ⇒ is the one that you need to use, and the second
⇒ is the statement of induction. Thus if you can manage to prove
the items in parenthesis, you have obtained the items on the right
of the second ⇒.
Sometimes you want to tweak the rules of induction. Consider the
following prob- lem. We have an intuitive understanding that
factorials grow much faster than polynomials, and want to prove
that n! > n2. Unfortunately this isn’t true for some small
values of n. In fact for n = 2 and 3, the quantity n2 is bigger
than n!. For n = 4, we finally have 4! = 24 > 16 = 42.
If we therefore try to literally apply standard induction, as
presented in the previous section, to the proposition P (n) : “n!
> n2” we will fail because it is not true for P (1). So the
scheme of our proof cannot be (P (1), P (k) ⇒ P (k + 1)) ⇒ P (n)
for all n. We will instead settle for (P (4), P (k) ⇒ P (k + 1) for
k ≥ 4) ⇒ P (n) for all n ≥ 4.
Thus we will use the proposition for n = 4, and also prove that if
P (k) is true for k ≥ 4, then P (k + 1) is true.
So we will get
P (4) ⇒ P (5) ⇒ P (6) ⇒ · · · ⇒ P (n− 1) ⇒ P (n).
Proposition 1.4. If n is an integer greater or equal to 4, then n!
> n2.
Proof. We proceed by the induction scheme (P (4), P (k) ⇒ P (k + 1)
for k ≥ 4) ⇒ P (n) for all n ≥ 4. The statement P (4) is true since
4! = 24 > 16 = 42. Let’s get to work on the induction step. We
need to find a relationship between P (k) and P (k+ 1) which will
allow us to derive one from the other. The left hand sides seem to
be easiest to relate, since the LHS (left hand side) of P (k + 1)
is k + 1 times the LHS of P (k). If P (k) is true, then by
multiplying both sides by k+ 1 we see that (k + 1)! > k2(k + 1).
This is not P (k + 1), since the RHS is not exactly
2. INDUCTION 13
(k + 1)2. However if we can prove that k2(k + 1) is greater than (k
+ 1)2, then we can combine the inequalities a la (k+1)! >
k2(k+1) > (k+1)2 to obtain P (k+1). The inequality k2(k + 1)
> (k + 1)2 reduces to k2 > k + 1. Bear in mind that we only
need to prove this for k ≥ 4. This proof can be done in any number
of ways; I prefer k2 > 2k > k + 1. The first inequality is
true since k > 2 and the second since k > 1. We are done by
our induction scheme.
Here is another kind of problem. Suppose you want to convince
yourself that you can integrate any power of sin(x). We’ll make P
(n) the somewhat imprecise “I have a formula for an antiderivative
of sinn(x).” This will be true for, say, n ≥ 0. (Is it true for
negative n?) Let’s do a couple. An antiderivative of sin0(x) = 1 is
given by x, and an antiderivative of sin(x) is given by − cos(x).
What about sin2(x)? Here’s one approach:∫
sin2(x)dx = ∫
cos2(x)dx.
Now integrate by parts, with u = cos(x) and dv = cos(x)dx. The
latter integral becomes ∫
cos2(x)dx = sin(x) cos(x) + ∫
sin2(x)dx.
The devout calculus student will recall that we put this all
together to get:∫ sin2(x)dx = x−
( sin(x) cos(x) +
x− sin(x) cos(x) 2
.
This same basic method works to write higher powers of sin in terms
of lower powers:∫
sink(x)dx = ∫
sink−2(x) cos2(x)dx.
Let u = cos(x) and dv = sink−2(x) cos(x)dx. The latter integral
becomes∫ sink−2(x) cos2(x)dx =
1 k − 1
∫ sink−2(x)dx−
1 k − 1
sink(x)dx:∫ sink(x)dx =
k sink−1(x) cos(x).
Okay. So I hope that was a pleasant review of integration by parts.
Where are we? We have shown that if P (k − 2) is true, then so is P
(k), since we can write a formula for
∫ sink(x)dx in terms of
∫ sink−2 dx. If we want the integral for sin6(x),
for example, we can use the above to reduce to sin4(x) which
reduces to sin2(x), and then to 1, which we know. If we wanted the
integral for sin7(x), we can use
14 1. ARITHMETIC
the above to eventually reduce to sin(x), whose antiderivative has
also been noted. This suggests a new induction scheme. If we’ve
proven P (0) and P (1) and also proven that P (k) implies P (k +
2), then P (n) is true for all integers n ≥ 0. I will codify this
as:
(P (0), P (1), P (k) ⇒ P (k + 2) for k ≥ 0) ⇒ (P (n) for all n ≥
0)
Here are some other useful induction schemes:
(P (a) for a ≥ 1 odd, P (k) ⇒ P (2k) for k ≥ 1) ⇒ (P (n) for all n
≥ 1)
(P (p) for p prime, P (k)&P (`) ⇒ P (k`) for k, ` ≥ 2) ⇒ (P (n)
for all n ≥ 2)
Of course, not everything is an induction scheme. For example, the
scheme
(P (1), P (k) ⇒ P (k + 2) for k ≥ 1) ⇒ (P (n) for all n ≥ 1)
is certainly not valid, because at no point do we obtain P (2), or
P (n) for any even number n.
Which schemes are valid? For now, use your common sense. Later we
will give proofs for the validity of other induction schemes based
on the original one.
The mother of them all, though, is Strong Induction. This is the
scheme
(P (a), (P (k) for all a ≤ k < n) ⇒ P (n)) ⇒ (P (n) for all n ≥
a).
You are probably a little tired of induction now so we will
postpone the discussion of Strong Induction until later.
2.4. Exercises.
Standard Induction
(1) Prove that if x ≥ −1 and n ∈ N, then
(1 + x)n ≥ 1 + nx.
(2) We have seen that the nth triangular number tn = ∑n
i=1 i is given by tn = n(n+1)
2 . The nth tetrahedral number Tn is defined by Tn = ∑n
i=1 ti. For example, T3 = 1+3+6 = 10. Prove that the nth
tetrahedral number is 1
6n(n+ 1)(n+ 2). (3) Prove that n! = 1+
∑n−1 i=0 i(i!) for n ≥ 1. (The convention is that 0! = 1.)
(4) The nth Fermat number Fn is given by the formula 22n
+1. For example, F0 = 3 and F1 = 5. Prove the following.
F0 · F1 · · ·Fn = Fn+1 − 2.
(5) Suppose that A is a convex subset of the plane. This means
that, whenever two points P,Q are in A, and λ is a real number
between 0 and 1, then the point
λ · P + (1− λ) ·Q
2. INDUCTION 15
is also in A. (These points fill out the line segment joining P and
Q.) Prove that if P1, P2, . . . , Pn are n points in A, then the
“centroid”
1 n
(P1 + P2 + · · ·+ Pn)
is also in A. (6) Use the inductive definition of summation to
prove that if x 6= 1, then
n∑ i=1
.
Induction Schemes (7) Write fk for the k-th Fibonacci number,
starting with f1 = f2 = 1. Thus,
fk+2 = fk + fk+1 for k ≥ 1. Let φ = 1+ √
5 2 and φ = 1−
√ 5
2 . Use the induction scheme
(P (1), P (2), P (k)&P (k + 1) ⇒ P (k + 2) for k ≥ 1) ⇒ P (n)
for all n ≥ 1
to prove that
fn = φn − φ
.
In other words, check the formula is correct for n = 1 and 2, and
prove that if the formula is correct for n = k and n = k + 1, then
it is true for n = k + 2. (Algebra tip: Show that φ2 = φ+ 1 and
φ
2 = φ+ 1.)
(8) Prove that for all a, b ∈ N, fa+b = fa+1fb + fafb−1.
(Suggestion: Use the same induction scheme; you’re not meant to use
the φ-formula from the previous problem.)
(9) Use a scheme mentioned in the text to prove that any positive
fraction a b
can be reduced to a fraction in which the numerator and denominator
are not both even.
(10) Xuande has a pile of 4- and 5-cent postage stamps. What are
all the postages he can pay? Give a proof. (Suggestion: After you
figure out the answer, come up with an appropriate induction
scheme.)
(11) Which of the following are valid induction schemes? Explain.
(a) (P (1), P (k) ⇒ P (k − 1) for k ≥ 2) ⇒ P (n) for all n ≥ 1. (b)
(P (1), P (k) ⇒ (P (2k)&P (2k + 1)) for k ≥ 1) ⇒ P (n) for all
n ≥ 1. (c) (P (0), P (1), P (k)&P (`) ⇒ P (k − `) for k ∈ Z) ⇒
P (n) for all n ∈ Z. (d) (P (1), P (k)&P (k + 1) ⇒ P (k + 2)
for k ≥ 1) ⇒ P (n) for all n ≥ 1.
16 1. ARITHMETIC
3. The Natural Numbers N
Admittedly we will not actually be able to construct the natural
numbers N, since we need a spark of life to get going. This spark
takes the form of the existence of an infinite set, which we assume
has been organized into a certain “linear” shape.
Assuming the presence of this shape, we will be able to define the
basic operations of arithmetic and derive their basic properties.
Moreover we will be able to construct the other sets out of
N.
Note: Until Section 4.2, we will always use the word “number” to
mean “natural number”.
3.1. Peano’s Axioms. Children believe that there is a counting
process to get to all numbers, starting with 1, in which every
number is succeeded by another number. The rules are designed so
that different numbers have different successors, and you never get
back to 1.
Let us codify this into mathematics.
Definition. The natural numbers N is a set with a “successor func-
tion” N → N written n 7→ n′, and an “initial element” 1 ∈ N
satisfying the following three properties: (INJ) If m,n ∈ N with m′
= n′, then m = n. (INF) For all n ∈ N, n′ 6= 1.
The third axiom requires a quick definition.
Definition. Let S be a subset of N. Call S inductive if whenever n
∈ S, then n′ ∈ S.
For example, the set of odd numbers is not inductive, since 1 is
odd but 1′ is not. The set of numbers greater than 100 is
inductive.
Now we complete our definition of N.
(IND) If S is an inductive subset of N, and 1 ∈ S, then S =
N.
The reason this last axiom is called (IND) is that it actually
allows us to use induction when proving things about N. Here’s why.
Let P (n) for n ∈ N be a sequence of propositions as in the
previous section. Write S = {n ∈ N|P (n) is true}. Suppose we know
that P (1) is true. Then 1 ∈ S. Suppose that we know that, for all
k, P (k) ⇒ P (k′). Then S is inductive. By (IND), we deduce that
all natural numbers are in S. This means that P (n) is true for all
n, as desired.
Later we will deduce other induction schemes from (IND).
Until we have enough arithmetic to develop a place-value system, we
will use Roman numerals (except often for 1 itself) for elements of
N. They are well-suited for Peano arithmetic anyway. Thus the first
few natural numbers {1, 1′, 1′′, 1′′′, 1′′′′, . . .} will be
denoted as {I, II, III, IV,V, . . .}. In other words,
3. THE NATURAL NUMBERS N 17
Definition.
I = 1, II = I′, III = II′, IV = III′,V = IV′,
VI = V′,VII = VI′,VIII = VII′, IX = VIII′,X = IX′ .
We will also have occasion to use larger Roman numberals without
comment but they will be no larger than M = XIII.
Remark: There is not a consensus in the mathematical community
about whether 0 should be considered a natural number, and so other
books may have the convention that 0 ∈ N. However it is an
important issue, and you will need to know that we are excluding 0
in this course.
Definition. The operation of addition in N is defined inductively
via
a+ n =
Example:
II + III = (II + II)′ = ((II + I)′)′ = ((II′)′)′ = V .
Please note that in particular, (a+m)′ = a+m′ for all a,m ∈
N.
Let’s take a moment to appreciate how Peano’s Axioms allow us to
make this, and other, inductive definitions. The quantity a+n is
defined if either n = 1 or n = m′. These possibilities are mutually
exclusive by (INF). Next, note that m cannot be the successor of
two different numbers by (INJ). Therefore the definition does not
give more than one answer.
Does it give an answer for all n? Given a ∈ N, let S be the set of
numbers n so that a + n can be computed by the above definition.
Note that 1 ∈ S by the first part of the definition, and S is
inductive by the second part. Therefore by (IND), we see that S =
N. Thus we have defined addition for all numbers.
Remark: This same reasoning proves that if n ∈ N then either n = 1
or n = m′ for some m ∈ N. This also follows from Lemma 1.11
below.
3.2. Properties of Addition.
Theorem 1.5. For all numbers a, b, c, we have (a+ b) + c = a+ (b+
c).
Proof. We fix a and b and use induction on c. If c = 1, the theorem
says (a+b)+1 = a+(b+1). By definition of adding 1, this is the same
as (a+b)′ = a+b′, which is the very definition of a+ b′.
Suppose the theorem is true for some c. Taking successors of both
sides yields
[(a+ b) + c]′ = [a+ (b+ c)]′.
18 1. ARITHMETIC
The definition of addition lets us move the prime within the sums
on both sides of the equation:
(a+ b) + c′ = a+ (b+ c)′ = a+ (b+ c′).
Thus the theorem is then true for c′.
Lemma 1.6. For all numbers n, we have n+ 1 = 1 + n.
Proof. Exercise.
Theorem 1.7. For all numbers a, b, we have a+ b = b+ a.
Proof. We fix a and use induction on b. If b = 1 this is the lemma.
Suppose a+ k = k + a. Taking successors gives (a+ k)′ = (k + a)′.
Then we have
a+ k′ = (a+ k)′ = (k + a)′ = (k + a) + 1 = k + (a+ 1) = k + (1 + a)
= k′ + a.
The fourth and sixth equality used associativity, and the fifth
used the lemma. The rest follows from the definition of addition
and the inductive hypothesis. Thus we are done by induction.
Theorem 1.8. (Cancellation Law of Addition) If a+ n = b+ n, then a
= b.
Proof. Induction on n. (INJ) is the case n = 1. Suppose the theorem
is true for some k. Then, suppose a+k′ = b+k′. This can be
rewritten as (a+k)′ = (b+k)′. Through (INJ) this implies that a + k
= b + k, which by the inductive hypothesis implies that a =
b.
Thus the theorem is true for all n.
Definition. Let a and b be numbers. Then a<b if there is a
number x so that a+ x = b.
Note that a < a′ always; in this case x = 1.
Proposition 1.9. If a < b and b < c, then a < c.
Proof. The hypotheses imply that there are numbers x and y so that
a+x = b and b+ y = c. Then we compute that a+ (x+ y) = (a+ x) + y =
b+ y = c, thus a < c.
Proposition 1.10. If a < b then a+ x < b+ x.
Proof. Exercise.
Definition. Let a and b be numbers. The expression “a > b” means
b < a.
Note this makes sense since we have defined “<” earlier.
Definition. Let a and b be numbers. Then a≤b if either a < b or
a = b.
3. THE NATURAL NUMBERS N 19
Lemma 1.11. For all n, 1 ≤ n.
Proof. Write P (n) for the statement of the lemma, we will induct
on n. If n = 1 then P (1) is clear. Suppose 1 ≤ k. Then either 1 =
k or 1 < k. If 1 = k then P (k′) is true since 1 < 1′. If 1
< k then we combine this with k < k′ to get 1 < k′. So P
(k′) holds in this case as well.
Note that by this lemma, any number n is either 1 or m′ for some
m.
Lemma 1.12. (Creeping Lemma) If a < b, then a′ ≤ b.
Proof: Exercise. Use the previous lemma.
Theorem 1.13. (Weak Trichotomy) Let a, b ∈ N. Then either a < b,
a > b, or a = b.
Proof. Fix b, and write P (a) for the statement of the lemma. We
will induct on a, holding b constant. Lemma 1.11 gives us P (1).
Now suppose P (k) is true, giving three possible cases. We will
show that each of these cases leads to a case of P (k′), which will
prove the theorem. If k < b then by the Creeping Lemma k′ ≤ b.
Thus k′ = b or k′ < b. If k > b then since k′ > k we
conclude k′ > b. If k = b then k′ > b.
To prove that no more than one of these possibilities can hold, we
need the following proposition.
Proposition 1.14. For all numbers a, n, we have a+ n 6= n.
Proof. Induction on n. (INF) says the proposition is true for n =
1. Suppose the proposition were not true for the successor k′ of
some k. Then a+k′ = k′. But then by (INJ) we would have a+ k = k,
which means the proposition would not be true for k. This is the
contrapositive of P (k) ⇒ P (k′). Thus P (k) ⇒ P (k′), and we are
done by induction.
Theorem 1.15. (Strong Trichotomy) Let a, b ∈ N. Then exactly one of
a < b, a > b, or a = b holds.
Proof. Suppose a < b and a = b. Then a < a, thus there is an
n so that a+n = a, contradicting the above proposition. Suppose a
< b and b < a. Then by transitivity we have again a < a.
The case a = b, a > b is similar.
Definition. If a < b, then b− a is the number x so that a+ x =
b.
Thus a+ (b− a) = b = (b− a) + a by definition.
Note that this number is uniquely determined, by the Cancellation
Law of Addition.
Here’s a little something for later:
Lemma 1.16. Let x, y, z be numbers. If x > y then (z + x)− y = z
+ (x− y).
20 1. ARITHMETIC
Proof. The calculation
[z + (x− y)] + y = z + [(x− y) + y] = z + x,
shows that z + (x− y) is (z + x)− y.
3.3. Properties of Multiplication. That is as far as we will go
with just addition. At this point we will freely use the
associative and commutative rules of addition without
comment.
We turn to multiplication, which is of course “repeated
addition”.
Definition. The operation of multiplication in N is defined
inductively via
a·n =
{ a if n = 1, a ·m+ a if n = m′.
Example:
II · III = II · II + II = (II · I + II) + II = (II + II) + II = IV
+ II = VI .
Theorem 1.17. If a, b, n ∈ N, then we have (a+ b) · n = a · n+ b ·
n.
Proof. Induction on n. Since a · 1 = a by the definition of
multiplication, the case n = 1 reduces to a+ b = a+ b on both
sides. Now suppose the theorem is true for k, so that (a+ b) · k =
a · k + b · k. Adding a+ b to both sides gives
(a+ b) · k + (a+ b) = a · k + b · k + a+ b = (a · k + a) + (b · k +
b).
By the definition of multiplication, this equation reads
(a+ b) · k′ = a · k′ + b · k′. Thus the theorem is true for n = k′
and we are done by induction.
Theorem 1.18. If a, b ∈ N, then a · b = b · a.
Proof. Exercise.
Corollary 1.19. If a, b, y ∈ N, then y · (a+ b) = y · a+ y ·
b.
Theorem 1.20. If a, b, n ∈ N, then we have (a · b) · n = a · (b ·
n).
Proof. Induction on n. If n = 1 then both sides are a·b. Suppose
the theorem is true for n = k. Thus (a · b) · k = a · (b · k).
Adding a · b to both sides and using distribution gives
(a · b) · k + (a · b) = a · (b · k) + a · b = a · [(b · k) +
b].
By the definition of multiplication, this is now
(a · b) · k′ = a · (b · k′). Thus the theorem is true for n = k′
and we are done by induction.
These are the elementary properties of addition and
multiplication.
3. THE NATURAL NUMBERS N 21
Proposition 1.21. If a < b, then na < nb. Moreover n(b− a) =
nb− na.
Proof. There is a number x = b− a so that a+ x = b. Multiplying
this by n yields na+ nx = nb; thus nb > na and nx = nb− na as
desired.
Proposition 1.22. (Cancellation Law of Multiplication) If na = nb,
then a = b.
Proof. By contradiction and Strong Trichotomy. If a < b, the
previous propo- sition and S.T. shows that na 6= nb. Similarly if a
> b.
3.4. Exercises.
(1) Lemma 1.6, Proposition 1.10, the Creeping Lemma, and Theorem
1.18. (2) If a < b prove that a < b+ x. (3) If a < b prove
that a2 < b2. (4) If a < b prove that a2 − b2 = (a+ b)(a− b).
(5) If a > b+ c prove that a− (b+ c) = (a− b)− c. (6) If b >
c and a+ c > b prove that a− (b− c) = (a+ c)− b. (7) State an
inductive definition of ab for a, b ∈ N, agreeing with the
usual
sense. Use your definition to prove that for a, b, c ∈ N,
ab · ac = ab+c.
(8) Prove that abc = (ab)c. (9) Prove that if b > 1, and r <
s, then br < bs.
(10) Prove that if be = ce, then b = c. (11) (Associativity for
Exponentiation) For which a, b, c ∈ N is it true that
a(bc) = (ab)c?
a ∧ ∧b =
Put the following numbers in order from least to greatest:
I∧ ∧V, II∧ ∧ IV, III∧ ∧ III, IV∧ ∧ II,V∧ ∧ I, and II∧ ∧V .
22 1. ARITHMETIC
4. Divisibility
4.1. Definition.
Definition. Let a, b ∈ N. We say a divides b, or b is a multiple of
a, or “a|b” if there is a number x so that ax = b.
Here are some basic properties of divisibility, which the reader
should verify. Let a, b, c, x, y be numbers.
Proposition 1.23. • 1|a. • If a|b and b|c, then a|c. • If a|b, then
ac|bc, and conversely. • If a|b, then a|bx. • If a|b and a|c, then
a|b+ c. • If a|b,a|c, and b > c, then a|b− c.
Proposition 1.24. If a|b then a ≤ b.
Proof. The hypothesis says that b = ac for some c. Since 1 ≤ c by
Lemma 1.11, the proposition follows from Proposition 1.21.
Definition. If a|b, then b÷ a is the number q so that qa = b.
Note that this number is uniquely determined, by the Cancellation
Law of Multi- plication.
For example n÷ 1 = n for all n.
Here is a typical proposition and proof involving this
definition.
Proposition 1.25. If a|b and c|d then ac|bd and bd÷ ac = (b÷ a) ·
(d÷ c).
By popular demand, we give two proofs, one straightforward and
another concep- tual. First, the straightforward and unimaginative
one.
Proof. Let’s just write out all the divisibility definitions. Say
aq = b, cp = d. Then aqcp = bd, so by definition (b÷ a) · (d÷ c) =
qp = bd÷ ac.
Next, for the student with a crisp sense of the definitions.
Proof. It is enough to show that (b÷ a)(d÷ c) satisfies the
defining property of bd÷ ac:
(ac)((b÷ a) · (d÷ c)) = (a(b÷ a)) · (c(d÷ c)) = b · c.
Definition. Write Div(a) for the set of divisors of a.
For example, Div(XV) = {I,III,V,XV}.
4. DIVISIBILITY 23
This will be an important definition; here are some translations of
Proposition 1.23:
• {1, a} ⊆ Div(a). • If a ∈ Div(b) and b ∈ Div(c), then a ∈ Div(c).
• If a ∈ Div(b) then a ∈ Div(bx).
4.2. Including Zero. This is a good time to include the number ‘0’
into our system.
Definition. The set of whole numbers N is defined by appending a
new element, 0, to N.
Thus if n ∈ N, n is either 0 or in N. Now that we have two sets of
numbers, we must be careful to specify whether a variable ‘n’ is in
N or N.
We can extend our operations in N to N.
Definition. The operation of addition in N is defined via
m+ n =
the old m+ n if m,n ∈ N, m if n = 0, n if m = 0.
Note that this is consistent if m = n = 0.
We need to be a little careful when defining inequality in N, since
now we can have a + x = a when x = 0. So we just say a < b if
there is a number x ∈ N so that a+ x = b. For example 0 <
1.
The reader should be able to verify at a glance that this addition
rule still is associative, commutative, and satisfies Trichotomy
and the cancellation law. For example consider a+ b = b+ a. If both
a, b ∈ N this is still true, since our addition was an extension of
that in N. If a = 0 then the definition above says both sides must
be equal to b, and similarly for b = 0.
Obviously Lemma 1.11 fails and should be replaced with 0 ≤ n for
all n ∈ N. Again, the proof is just by two cases: either n ∈ N or n
= 0.
Subtraction should now be extended to m − n for m,n ∈ N satisfying
m ≥ n. As before m− n should be defined as the number x so that n+
x = m. Since we now have n+ 0 = n, this gives n− n = 0. Also note
that x− 0 = x by the same token.
Multiplication should give no surprise:
Definition. The operation of multiplication in N is defined
via
m · n =
0 if m or n = 0.
24 1. ARITHMETIC
Commutativity, Associativity, and Distributivity, and Proposition
1.24 are all easy to check.
Unfortunately we must give up the general Cancellation Law for
Multiplication, since 0 · 0 = 0 · 1, for example. A subtle
ramification of this is that although the equation 0 · x = 0 has
solutions, it does not have a unique solution, so we do not define
the expression 0÷ 0. We do have 0÷ n = 0 for n ∈ N.
Before we forget let us treat exponentiation, which might give a
mild surprise:
Definition. The operation of exponentiation in N is defined
via
mn =
the old mn if m,n ∈ N,
1 if n = 0, 0 if m = 0 and n ∈ N.
Note that this means 0x = 0 except at x = 0.
One can check that this definition satisfies the usual
exponentiation rules.
Remark: One reason for the definition 00 = 1 is for the facility of
power series. For example, ex =
∑∞ i=0
i! evaluated at x = 0 gives 1 = 00
0! , which suggests that we define both 00 and 0! to be 1.
4.3. The Division Algorithm. Here is a very important theorem about
in- tegers which lies at the heart of arithmetic.
Theorem 1.26. (Division Algorithm, Weak Form) Let a ∈ N and b ∈ N.
Then there are numbers q, r ∈ N so that b = qa+ r and r <
a.
Proof. Fix a; we want to induct on b. Write P (b) for the statement
of the theorem.
If b = 0 put q = r = 0.
Suppose P (k) is true.
Then k = qa + r, with r < a. Then we have k′ = qa + r′. By the
Creeping Lemma, r′ ≤ a. If r′ < a, then we are done. If r′ = a,
then by the definition of multiplication, k′ = q′a = q′a+ 0
Thus P (k′) is true, so we are done.
Remark: We have used the induction scheme (P (0), P (k) ⇒ P (k′)) ⇒
(P (n) for all n ∈ N). This relates to Standard Induction as
follows. If P (0) is true, then by the hy- pothesis, so is P (1).
Then together with P (k) ⇒ P (k′) we recover the hypotheses of
Standard Induction, thus get P (n) for all n ∈ N. We also have P
(0), so we do get P (n) for all n ∈ N.
We can say more if we do a little more work.
4. DIVISIBILITY 25
Theorem 1.27. (Division Algorithm, Strong Form) In the above
situation, the numbers q and r are uniquely determined.
Proof. The idea is simple enough, but working it out carefully is a
good benchmark for our Peano Theory. Suppose b is equal to both
q1a+ r1 and q2a+ r2, with r1 and r2 both less than a. Then q1a+r1 =
q2a+r2. Consider Trichotomy for r1 and r2. If they are not equal
then one is greater than the other. Say r1 < r2. By definition
of subtraction, this means that q1a = (q2a + r2) − r1. By Lemma
1.16, q1a = q2a+ (r2 − r1). This shows that q1a > q2a, and
indeed q1a− q2a = r2 − r1. By Proposition 1.21, we have a(q1 − q2)
= r2 − r1. The left hand side is plainly a nonzero multiple of a,
thus by Proposition 1.24
a ≤ r2 − r1 < r2 < a,
4.4. Decimal Expansions. Decimal expansions are inseparable from
our un- derstanding of numbers. Someone may ask, for example, “What
is 7 cubed?”, when what they really mean is “What is the base 10
expansion of 73?”. While it would be fair to answer the original
question with “It is the successor of the successor of the
successor of...of 1”, that is probably not what they had in
mind.
The number 0 came along when Hindu mathematicians needed a
placeholder for their decimal positional notation. [explain more,
about large numbers and so on]. Ten (= X) is a conveniently sized
number but let us formulate “positional notation” with a general
bases b.
Proposition 1.28. Fix a number b > 1, and let N ∈ N. Then there
is a number m ∈ N and digits d0, . . . , dm with di ∈ N, di < b
so that
N = m∑
i=0
dib i.
We defer the proof to the section on Strong Induction.
Today we primarily use b = X (ten) and opt to use the familiar
Hindu-Arabic numerals {1, 2, 3, 4, 5, 6, 7, 8, 9} in place of {I,
II, III, IV,V,VI,VII,VIII, IX}. Thus the definition of 2 is 1′, the
definition of 3 is 2′, etc. In the world of computer science,
however, II and powers of II are commonly used as bases.
Once some base b positional notation is in place, there are simple
algorithms for doing arithmetic based on the digits of numbers.
Readers are surely familiar with base ten arithmetic, and can
probably hold their own in other bases without much instruction.
For sanity’s sake we neglect the task of putting whole number
arith- metic on rigorous footing. However we will recommend some
simple activities for the reader to practice arithmetic with other
bases.
26 1. ARITHMETIC
For example let us say the base b = 7. With this convention, we
have for instance 234 = 2 · b2 + 3 · b+ 4, which is CXXIII using
our “neutral” Roman numerals.
Remark: Sometimes one writes “2347” to distinguish this from the
base ten expres- sion, which would be 23410 =CCXXXIV. But too much
notation can be a headache, so we will rely on context.
4.5. Practice with binary arithmetic. In this section we will
compute the sum
1000∑ n=1
n!
with base b = II, thus in binary. Binary arithmetic is simpler than
decimal in the sense that rather than needing two nine-by-nine
tables of addition and subtraction, we only need to know that 1+1 =
10 and 1·1 = 1. (The rules for 0 being universal.) The sum is equal
to
1! + 10! + 11! + 100! + 101! + 110! + 111! + 1000!.
The exercise here is to try not to convert these into decimal, do
the operation and convert back, but to do the entire computation in
binary. We have of course 1! = 1 and 10! = 10. The next term is 11!
= 11 · 10 · 1 = 11 · 10. We use “long multiplication”:
11 × 10
00 + 110
110
It should be clear from this that the rule for multiplying by 10 is
to simply append a zero to the end of your digits. Similarly the
rule for multiplying by 100 is to append two zeros to the end. Thus
100! = 100 · 110 = 11000. Next we use again “long multiplication”
to compute 101! = 101 · 11000:
11000 × 101
11000 1100000
+ 1111000
The next calculation, 110! = 110 · 1111000, is a little more
interesting, since we have some carrying of addition:
1111000 × 110
11110000 + 111100000
1011010000
Did you catch that? We used 1 + 1 = 10 in the sixth place, and 1 +
1 + 1 = 11 in places seven through nine, carrying the ‘1’ each
time. Similarly with 111! =
4. DIVISIBILITY 27
111 · 1011010000: 1011010000
1 10
110 11000
1111000 1011010000
1001110110000 + 1001110110000000
as the reader should verify.
Strictly speaking, this was just an illustration of basic binary
arithmetic. But I’d like to point something out. Suppose we were to
continue this computation, adding on successively higher
factorials. All higher factorials N ! with N ≥ 1000 end in at least
seven zeros, since they are divisible by 1000!. Therefore the last
seven digits of the sum
∑N n=1 n! for N ≥ 1000 is 0011001. Moreover, as n increases, n!
ends in
more and more zeros. Thus more and more ending digits of the sum
will stabilize. For example, 10000! ends in fifteen zeros, so we
conclude that the last fifteen digits of ∑N
n=1 n! for N ≥ 10000 will be the same. (In fact, they are
111101000011001.)
This process gives us an infinite binary expansion going to the
left. Does it even- tually repeat? No one knows.
4.6. Exercises.
(1) Prove the two cancellation laws for division: (a) If a, b, n ∈
N with n|a and n|b and a÷ n = b÷ n, then a = b. (b) If a, b, n ∈ N
with a|n and b|n and n÷ a = n÷ b, then a = b.
(2) Suppose b|a and d|c. Prove (a÷ b) + (c÷ d) = (ad+ bc)÷ (bd).
(3) Let a,m, n ∈ N with m ≤ n. Prove that an−m = an ÷ am. (4) Let
(fn) denote the Fibonacci sequence. Prove that if d|n then
fd|fn.
(Use Exercise 8 in Section 2.4.) (5) Suppose a, b1, b2 ∈ N satisfy
a ≤ b1 + b2. Prove that there are a1, a2 ∈ N
so that a = a1 + a2, a1 ≤ b1, and a2 ≤ b2. (6) Consider the set N =
N ∪ {∞}, with addition and multiplication defined
via
m+ n =
{ the old m+ n if m,n ∈ N, ∞ if m or n = ∞,
28 1. ARITHMETIC
m · n =
{ the old m · n if m,n ∈ N, ∞ if m or n = ∞,
Which of the following properties does addition/multiplication in N
not satisfy? Commutativity, Associativity, Distributivity,
Cancellation. Just give counterexamples for any failing
properties.
Suppose we wanted to extend N further to include 0, and extending
the rules of N. Clearly 0 +∞ should be ∞. Are there any values we
can give 0 ·∞ so that no further properties (other than ones you’ve
discarded in the previous paragraph) fail?
(7) In base b = III, perform long division to divide 21110210 by
21. (8) Let a ≥ 2 and b ∈ N. Prove that there are numbers q, r, e ∈
N so that
b = qae + r and 0 < q < a and 0 ≤ r < ae.
(Follow the proof of the Division Algorithm.) (9) For n ∈ N write
Sn for the sum of the digits (base X) of n. Prove that if
a, b ∈ N then 9|(Sa + Sb − Sa+b). Is the analogous statement true
in any base b?
(10) Prove that, if n > 2 there is no solution to nx + ny = nz
with x, y, z ∈ N. (Suggestion: First think about n =X. Then think
about the problem in a general base n.)
(11) Let a, b ∈ N and suppose r is the remainder when you divide b
by a. Show that 2r − 1 is the remainder when you divide 2b − 1 by
2a − 1. (Hint: binary long division)
(12) Compute the sum 100∑ n=1
n!
in the base b = III. (Note that 100 = IX.) Show all of your work;
you should start by writing out the little addition/multiplication
tables base III.
(13) Write each of the numbers CDLIII, DCLXXVII, and CMXI in the
three bases b = II,IV,and VIII. What is an easy way to convert a
binary expan- sion into a base IV expansion and a base VIII
expansion? (If you don’t see the pattern, make more
examples.)
(14) Base ten long division, as taught in elementary school, is a
very mysterious- looking algorithm. Explain the math behind it. In
particular explain why it gives the correct quotient and remainder
of the Division Algorithm. Please note: I’m not just asking you to
articulate the algorithm. The problem is to explain “why”, not
“how”.
(15) Let x, y ∈ N. Say that x⊥y if there is an n ∈ N so that xn =
y. Determine whether ⊥ is transitive. In other words, if a⊥b and
b⊥c, is it necessarily true that a⊥c?
(16) Let x, y ∈ N. Say that x>y if there is an n ∈ N so that nx
= y. Determine whether > is transitive. In other words, if
a>b and b>c, is it necessarily true that a>c?
5. THE EUCLIDEAN ALGORITHM 29
5. The Euclidean Algorithm
5.1. Gcds and Lcms. We will next discuss greatest common divisors
and least common divisors. These concepts are based on the idea of
the “greatest” and “least” member of a set of numbers.
First, some terminology.
Definition. Let S ⊂ N be a subset of N. A number ` ∈ N is a lower
bound of S if for all s ∈ S, ` ≤ s. A number u ∈ N is an upper
bound of S if for all s ∈ S, u ≥ s.
For example, if S is the set of positive even numbers, then 1 and 2
are the only natural numbers which are lower bounds of S, and S has
no upper bounds.
If you have taken a course in analysis, you know that the ideas of
a greatest lower bound and a least upper bound are very important.
For example, if S ⊂ R is the set of positive real numbers, then 0
is the greatest lower bound of S. In this case, the greatest lower
bound is not an element of S, since 0 is not positive. Things are
much simpler with integers (they are “discrete”); the greatest
lower bound of a set of integers S will be itself an element of S.
We will therefore simply call it the minimum of S.
Remark: If S is the “empty set”, then pure logic dictates that
every number is both an upper and lower bound of N. This idea is
not important.
Theorem 1.29. (Well-Ordering, Min Form) Let S ⊆ N be a nonempty
subset of N. Then there is an element m ∈ S which is a lower bound
of S.
Proof. This will be a proof by contradiction. Suppose that the
theorem is false. This means that no lower bounds of S are
themselves elements of S.
Let T be the set of lower bounds of S. That is, T = {n ∈ N|n is a
lower bound of S}. By Lemma 1.11, we know that 1 ∈ T . We will
prove that T is inductive. Let n ∈ T . This means that n ≤ s for
every s ∈ S. Since we are supposing the theorem is false, we cannot
have n ∈ S. Therefore n 6= s, so n < s. By the Creeping Lemma,
we know that for all s ∈ S, n′ ≤ s. Therefore n′ ∈ T . This
reasoning shows that T is inductive.
By (IND) we conclude that T = N, and therefore there cannot be any
numbers in S. This is the contradiction, which finishes the
proof.
Definition. The number m in the above theorem is called the minimum
of S, or minS.
Theorem 1.30. (Well-Ordering, Max Form) Let S ⊂ N be a nonempty
subset of N which has an upper bound of S. Then there is an element
M ∈ S which is an upper bound of S.
Exercise; apply the Min Form to the set of upper bounds for
S.
30 1. ARITHMETIC
Definition. The number M in the above theorem is called the maxi-
mum of S, or maxS.
Write Div(a, b) for the set of common divisors of a and b. In other
words, Div(a, b) = Div(a) ∩Div(b), the intersection of the two
sets.
This set is bounded above by a, and 1 ∈ Div(a, b) so it is not
empty. Therefore it has a maximum element, called the greatest
common divisor of a and b.
Definition. Let gcd(a, b) = maxDiv(a, b); it is called the greatest
common divisor of a and b.
Example: Div(42) = {1, 2, 3, 6, 7, 14, 21, 42} and Div(24) = {1, 2,
3, 4, 6, 8, 12, 24}, so Div(42, 24) = {1, 2, 3, 6}. It is easy to
see now that gcd(42, 24) = 6.
Similarly write Mult(a, b) for the set of common multiples of a and
b. Since ab ∈ Mult(a, b) this is nonempty; thus it has a minimum
element.
Definition. Let lcm(a, b) = minMult(a, b); it is called the least
com- mon multiple of a and b.
Example: Mult(42) = {42, 84, 126, 168, 210, . . .} and Mult(24) =
{24, 48, 72, 96, 120, 144, 168, 192, . . .}, so Mult(42, 24) =
{168, . . .}. Therefore lcm(42, 24) = 168.
More generally, let a1, . . . , an be any finite set of numbers.
Write Div(a1, . . . , an) for the set of numbers dividing each of
a1, . . . , an, and Mult(a1, . . . , an) for the set of numbers
divisible by each of a1, . . . , an. As above we may let gcd(a1, .
. . , an) = max Div(a1, . . . , an) and lcm(a1, . . . , an) =
minMult(a1, . . . , an).
5.2. Antenaresis. If you are like most students, you have an old
habit of thinking about the gcd of two numbers as follows. You take
your two numbers, factor them, and then for each prime note the
smaller exponent that occurs in the factorizations of both numbers.
The exponents of primes appearing in the factorization of the gcd
will be these smaller exponents.
While we will eventually derive this characterization of the gcd,
you should forget about it for a while for two reasons. One, it is
usually inefficient to factor large numbers. Two, at this point in
the course we are trying to train you to under- stand the logic of
the definition of mins and maxes, as well as digest the theory of
divisibility.
Try to work through the following two lemmas, to break yourself
from the afore- mentioned habits.
Lemma 1.31. If b = qa+ r,then gcd(a, b) = gcd(a, r).
Proof. This follows from the fact that Div(a, b) = Div(a, r), which
the reader should prove.
Lemma 1.32. If a|b, then gcd(a, b) = a.
5. THE EUCLIDEAN ALGORITHM 31
Proof. This is a good exercise for you to do right now. Use the
definition of gcd!
These two lemmas allow us to compute the gcd of any two natural
numbers. Con- sider, for example, a = 51 and b = 36. Applying the
division algorithm yields
51 = 1 · 36 + 15.
By the first lemma, we conclude that gcd(51, 36) = gcd(36, 15). So
we have simpli- fied the problem. Next,
36 = 2 · 15 + 6. Thus gcd(36, 15) = gcd(15, 6). Next,
15 = 2 · 6 + 3.
Thus gcd(15, 6) = gcd(6, 3). But since 3|6, we know gcd(3, 6) = 3
by the second lemma. Thus gcd(51, 36) = 3.
This is a great algorithm for computing gcd’s, and originates in
the first proposition of Book VII of Euclid’s Elements. It is
described therein as “antenaresis”, or “repeated
subtraction”.
There is a second phase of this algorithm, which allows us to
express gcd(a, b) as the difference of a multiple of a and a
multiple of b. We iteratively use the idea that if b = qa+ r, then
r = b− qa. Thus we retrace the steps of the first algorithm, each
time writing the remainder as the dividend minus the quotient times
the divisor. In our present example we start with
3 = 15− 2 · 6.
The next step is to start with the smaller of the underlined
numbers on the right, find the equation in which it is the
remainder, and use that equation to substite in a difference of
larger numbers.
3 = 15− 2 · (36− 2 · 15),
Then combine terms. 3 = 5 · 15− 2 · 36.
Now the 15 is the smaller of the underlined numbers, so again
subsitute and com- bine:
3 = 5 · (51− 1 · 36)− 2 · 36.
3 = 5 · 51− 7 · 36.
This expresses 3 as the difference of a multiple of 51 and a
multiple of 36.
5.3. Strong Induction. In Exercise 7 in Section 2.4 you were asked
to prove a formula for the Fibonacci numbers, using the induction
scheme
(P (1), P (2), P (k)&P (k + 1) ⇒ P (k + 2) for k ≥ 1) ⇒ P (n)
for all n.
This meant that you were to verify the formula at n = 1 and 2, and
then prove that if the formula is correct for two consecutive
numbers, then it is true for the next number.
32 1. ARITHMETIC
We are now in a position to prove that this is a valid induction
scheme. It comes down to the following proposition:
Proposition 1.33. Let S ⊆ N be a subset of N satisfying the
following properties.
(1) 1, 2 ∈ S. (2) Fix an n > 2. If n− 1 and n− 2 ∈ S, then n ∈
S.
Then S = N.
Before proving this, let me spell out the relationship with the
above induction scheme. Suppose you are given propositions P (n) as
in the Fibonacci situation, then let S = {n ∈ N|P (n) is true}.
Then knowing P (1), P (2) and knowing that P (k) and P (k+1)
together imply P (k) tells you that S satisfies properties (1) and
(2). Therefore S = N and so P (n) is true for all n ∈ N.
Proof. Let T be the complement of S, in other words the set of all
numbers which are not in S. We will write this as T = N − S.
Suppose T is nonempty. Then T has a minimum, say m = minT . Since
1, 2 ∈ S we know they are not in T . Therefore m 6= 1 and m 6= 2.
Consider the numbers m − 1 and m − 2. Since they are both less than
m they are not in T . Therefore they are in S. By property (2) m ∈
S, so it is not in T . This is a contradiction. Therefore we know T
must be empty and therefore S = N.
I hope you get the feeling from the above proof that this “min”
technique is very powerful. It seems unfit to use it for such a
random-looking induction scheme. In fact, this same technique wil
take us all the way to Strong Induction.
The idea of Strong Induction is as follows. Again you have a
sequence P (n) of propositions, and know that P (1), say, is true.
Suppose you can always reduce P (k) to either
(1) some P (`) for ` < k, or (2) some combination of P (`)s with
various ` < k.
Then you know P (n) is true for all n.
This should make sense to you, because you are always decreasing n
until it finally gets down to 1. You shouldn’t have to worry
exactly how it decreases, just that it does.
We codify the above as
(P (1), (P (k) for all k < n) ⇒ P (n)) ⇒ (P (n) for all n ≥
1).
Although you may not necessarily need all k between 1 and n, it’s
simpler to suppose that you do.
Here is how we write it in terms of subsets of N:
Theorem 1.34. (Strong Induction) Let S ⊆ N be a subset of N
satisfying the following properties.
5. THE EUCLIDEAN ALGORITHM 33
(1) 1 ∈ S. (2) Fix an n > 1. If all numbers less than n are in
S, then n ∈ S.
Then S = N.
Proof. Let T = N− S, the set of all numbers not in S. If the
theorem is not true then S is not N and therefore T is nonempty.
Let m = minT . Note m > 1 since 1 ∈ S. Also note that if k <
m, then k /∈ T so k ∈ S. By hypothesis, m ∈ S which is a
contradiction.
We may now revisit some unfinished business.
Proposition 1.35. Fix a number b > 1, and let N ∈ N. Then there
is a number m ∈ N and digits d0, . . . , dm with di ∈ N, di < b
so that
N = m∑
i=0
dib i.
Proof. Strong Induction on N . For N = 0 let m = 0 and d0 = 0.
Assuming the proposition for numbers less than N , apply the
division algorithm to N and b, to yield N = qb+ r with r < b.
The r will be the first digit. Since b > 1, we know q < N .
So using the inductive hypothesis, q =
∑n i=0 dib
N = m∑
i=0
dib i+1 + r,
which shows that N has a b-ary expansion (although the indexing is
different).
Next we wrap up the second phase of the Euclidean Algorithm.
Theorem 1.36. (Euclidean Algorithm, Weak Form)
If a, b ∈ N and d = gcd(a, b), then there are numbers m,n ∈ N so
that either ma− nb = d or nb−ma = d.
Proof. Strong Induction on a. If a = 1, then d = 1 and 1 · a − 0 ·
b = 1. Assume the theorem for numbers less than a.
If b = a, then d = a and we can use 1 · a− 0 · b = d.
If b > a, then by the division algorithm we either have a|b or b
= qa + r with 0 < r < a. In the former case, gcd(a, b) = a by
Lemma 1.32, and we may use q · a− 0 · b = a.
In the second case, we apply Lemma 1.31 to find gcd(a, r) = d. Our
inductive hypothesis implies one of two possibilities. One is that
there are m0 and n0 so that m0a − n0r = d. Eliminating the r yields
(n0q + m0)a − n0b = d. The other possibility is handled
similarly.
For the case b < a, we may apply the inductive hypothesis to b;
thus by induction we are done.
34 1. ARITHMETIC
5.4. Euclidean Applications.
Theorem 1.37. (Euclidean Algorithm, Strong Form) If a, b ∈ N and d
= gcd(a, b), then there are numbers m and n so that ma− nb =
d.
Proof. Note that if ma−nb = d, then if k is large enough so that kb
≥ m and ka ≥ n (for example, k = max{m,n}), we also have (ak−n)b−
(kb−m)a = d.
Example: Previously we found that 3 = 5 · 51 − 7 · 36. Applying the
method of this proof with k = 1 we find that also 3 = (51 − 7) · 36
− (36 − 5) · 51; that is 3 = 44 · 36− 31 · 51.
Definition. Numbers a and b are called relatively prime if gcd(a,
b) = 1.
If two numbers a and b are relatively prime, then by the Euclidean
algorithm ma − nb = 1 for some choice of m,n. If x is any number,
we may multiply this equation by x to obtain (xm)a− (xn)b = x;
therefore any number may be written as an “integral combination” of
a and b.
Here is a sort of converse to the Euclidean Algorithm.
Proposition 1.38. If a, b,m, n ∈ N and ma − nb = 1, then a and b
are relatively prime.
Proof. Let d be a common divisor of a and b. Then d divides the LHS
and therefore d|1. It follows that Div(a, b) = 1.
Here are some theoretical applications of the Euclidean
Algorithm.
Proposition 1.39. Let a, b ∈ N. Then Div(a, b) = Div(gcd(a,
b)).
Proof. Let d = gcd(a, b). We have ma− nb = d for some numbers m,n.
If c is a common divisor of a and b, then c divides the left hand
side, and therefore c|d. Conversely, since d ∈ Div(a, b), any
divisor of d is also in Div(a, b).
Proposition 1.40. Suppose a and b are relatively prime, and both
divide some number c. Then ab|c.
Proof. By the Euclidean Algorithm, there are numbers m and n so
that ma−nb = 1. Multiply this by c to get mac−nbc = c. Using the
hypothesis we see that both terms of the left hand side are
divisible by ab, thus the right hand side is as well.
Proposition 1.41. Suppose a and b are relatively prime. Then lcm(a,
b) = ab.
Proof. Note first that ab is in fact a common multiple of a and b.
Now suppose that c is another common multiple of a and b. By the
previous proposition ab|c, thus ab ≤ c. It follows that ab is a
lower bound for Mult(a, b) and is therefore the least common
multiple.
5. THE EUCLIDEAN ALGORITHM 35
Proposition 1.42. Let a, b, c ∈ N and suppose that gcd(a, b) = 1
and gcd(a, c) = 1. Then gcd(a, bc) = 1.
Proof. Exercise.
Proposition 1.43. Let a, b1, . . . , bn ∈ N and suppose that gcd(a,
bi) = 1 for all i. Then gcd(a, b1 · · · bn) = 1.
Proof. Induction on n. The proposition is clear if n = 1. Suppose
it is true for k, and let a, b1, . . . , bk+1 be as in the
hypothesis. Then we have gcd(a, bk+1) = 1 and gcd(a, b1 · · · bk) =
1, so that gcd(a, b1 · · · bk+1) = 1 by the previous
proposition.
Proposition 1.44. Let a, b ∈ N be relatively prime. Then Mult(a, b)
= Mult(ab).
Proof. It should be clear that Mult(ab) ⊆ Mult(a, b). Let µ ∈
Mult(a, b). By the Euclidean algorithm, there are numbers m,n so
that ma − nb = 1. Therefore maµ−nbµ = µ. Because µ is a common
multiple of a and b it is easy to see that aµ and bµ are divisible
by ab. Therefore the LHS and hence µ is a multiple of ab.
The reader should contrast the following definitions.
Definition. Let a1, . . . , an ∈ N. We say they are pairwise
coprime if for all i 6= j, gcd(ai, aj) = 1. We say they are
relatively prime if gcd(a1, . . . , an) = 1.
For example, the three numbers 10, 21, 121 are pairwise coprime and
relatively prime, and the three numbers 6, 15, 35 are relatively
prime but not pairwise coprime.
Proposition 1.45. Let a1, . . . , an ∈ N be pairwise coprime. Then
Mult(a1, . . . , an) = Mult(a1 · · · an).
Proof. Induction on n. The case n = 1 is trivial. Suppose the
statement is true for n = k. It is easy to see that Mult(a1 · · ·
ak+1) ⊆ Mult(a1, . . . , ak+1); we must show the other inclusion.
Suppose that x ∈ Mult(a1, . . . , ak+1). Then in particular x ∈
Mult(a1, . . . , ak), which is equal to Mult(a1 · · · ak) by the
case n = k. We also have x ∈ Mult(ak+1). By Proposition 1.43, we
have gcd(a1 · · · ak, ak+1) = 1, so by Proposition 1.44 we conclude
that x ∈ Mult(a1 · · · ak+1), as desired.
5.5. Exercises.
(1) Theorem 1.30, Lemma 1.31, Lemma 1.32, and Proposition 1.42. (2)
Let a ∈ N. To compute Div(a), we need to check whether each
number
n ≤ a divides a. Naturally we would do this in order starting with
n = 1. Write Div(a) = {d1, d2, d3, . . .} with di < di+1 for all
i. (a) Prove that a is either a perfect square, or the product of
two consec-
utive divisors dm, dm+1. (b) Suppose that a = dm ·dm+1 is the
product of two consecutive divisors
dm, dm+1. Prove that
Div(a) = {d1, d2, . . . , dm, a÷ dm, a÷ dm−1, . . . , a÷ d1}.
36 1. ARITHMETIC
(c) What happens if instead, d2 m = a?
(This helps compute Div(a). ) (3) Given a natural number n, write
φ(n) ∈ N for the number of integers from
1 to n which are relatively prime to n. For example φ(12) = 4 since
there are four such numbers: {1, 5, 7, 11}. Compute φ(n) for all
the numbers n from 1 to 25. Is it true that φ(m+ n) = φ(m) + φ(n)
for all m,n ∈ N? Is it true that φ(mn) = φ(m)φ(n) for all m,n ∈ N?
This function φ is called “Euler’s totient function”.
(4) For each of the following pairs of numbers a, b, find d =
gcd(a, b) and numbers m,n ∈ N so that ma − nb = d and numbers p, q
∈ N so that pb− qa = d. (a) a = 9409, b = 7081. (b) a = 165, b =
224.
(5) If a = 2 in Theorem 1.36, and b is odd, what are m and n? What
if a is odd and b = 2?
(6) Find natural numbers x, y, z so that 35x+ 15y − 21z = 1. (7)
Let a ∈ N and b ∈ N. Prove that the set S = {m ∈ N|ma ≤ b} has
a
maximum. If q is the maximum of S, prove that there is an r ∈ N
with b = qa+ r and r < a.
(8) Fix a number a ∈ N. Suppose S ⊆ N is a set of numbers
satisfying the following two properties. (a) a ∈ S. (b) Whenever n
∈ S then n′ ∈ S. Prove that S contains all numbers greater or equal
to a.
(9) Prove that if a and b are relatively prime, and a|bc, then a|c.
(10) Let a, b ∈ N. Prove that lcm(a, b) divides every element of
Mult(a, b). (11) For which pairs of numbers d, µ do there exist a,
b ∈ N so that d = gcd(a, b)
and µ = lcm(a, b)? (12) Let d = gcd(a, b). Prove that a÷ d and b÷ d
are relatively prime. (13) Let d = gcd(a, b) and µ = lcm(a, b).
Prove that ab = dµ. [Suggestion:
First show ab ÷ d ∈ Mult(a, b). Then show that if ν ∈ Mult(a, b)
then ab÷ d divides ν. You may use the previous exercise.]
(14) Prove gcd(ac, bc) = c · gcd(a, b) for a, b, c ∈ N. (15) Prove
that gcd(a, b, c) = gcd(a, gcd(b, c)). Use this to compute
gcd(290177, 241133, 190747). (16) Prove that lcm(a, b, c) = lcm(a,
lcm(b, c)). (17) If d = gcd(a, b) prove that gcd(2a − 1, 2b − 1) =
2d − 1. (Use Problem 11
from Section 4.6.) (18) Prove gcd(a+ b, b) = gcd(a, b).
Strong Induction Exercises (19) Let a, b ∈ N. Theorem 1.36 gives
numbers m,n ∈ N so that either ma −
nb = d or nb−ma = d. Prove that if one follows the Euclidean
Algorithm, then actually m ≤ b and n ≤ a. (Strong Induction; follow
the proof of Theorem 1.36.)
(20) Prove that every natural number can be expressed as a sum of
distinct Fibonacci numbers.
6. THE FUNDAMENTAL THEOREM OF ARITHMETIC 37
(21) Let N ∈ N. Prove that there is a number m ∈ N and digits d0, .
. . dm with dn ∈ N, dn ≤ n so that
N = m∑
i=0
din!.
Are these digits unique? (Hint: Recall Exercise 3 in Section 2.4.)
(22) Consider the following two player game, played using two piles
of pennies:
Players take turns. In each turn a player picks one pile and
removes some (natural) number of pennies from that pile. The player
removing the last penny wins.
Prove that, as long as the two piles begin with an equal number of
pennies, the second player can always win.
(23) Write fk for the k-th Fibonacci number, starting with f1 = f2
= 1. Prove gcd(fk, fk+1) = 1 for all k.
(24) Prove that if fd|fn then d|n. (Suggestion: Use the previous
problem, problem 9, and problem 4 in Section 4.6.)
6. The Fundamental Theorem of Arithmetic
6.1. Ords. If m > 1 and n are natural numbers we want to define
ordm(n) to be the maximum number of times m divides n. For example,
ord3(18) should be 2. Since we have already developed a satisfying
theory of “maxima” we will be super careful and prove that this
exists.
Proposition 1.46. Let m > 1 and n ∈ N. Then the set {i ∈ N;mi|n}
is bounded above.
Proof. We will prove by induction on n that mn > n. Once we have
done this, if i is in this set, then mi ≤ n < mn, which by
Exercise 9 in Section 3.4 implies that i < n. Therefore n will
be an upper bound of the set.
The case n = 1 is obvious. Suppose we know that mk > k. Then
multiplying both sides by m we see that mk+1 > mk. Since m >
1 we know that mk > k and therefore mk ≥ k + 1. Appending this
to the previous inequality we conclude that mk+1 > k + 1. Thus
we are done by induction.
Certainly 0 is in this set, and so it has a maximum. We can
therefore make the following definition.
Definition. Let m > 1 and n ∈ N. Then ordm(n) = max{i ∈
N;mi|n}
For example, ord6(12) = 1, ord6(100) = 0, and ord2(48) = 4.
Remarks:
(1) This terminology comes from the world of analysis, where “ord”
means “order of vanishing”. For example, the order of vanishing of
f(x) = x2(x+ 1) at x = 0 is 2, and at x = −1 is 1, so one would say
ord0(f) = 2, ord−1(f) = 1 and ord1(f) = 0.
38 1. ARITHMETIC
(2) We will avoid defining ordm(0), but the obvious choice is
ordm(0) = ∞.
The following is a convenient reformulation of the definition of
ordm.
Proposition 1.47. Let m > 1 and n ∈ N. Then ordm(n) = i if and
only if there is a number u ∈ N so that n = miu and m - u.
Proof. (⇒) Suppose ordm(n) = i. Then mi|n, say n = miu. If m|u,
then mi+1|n, contradicting the maximality of i. Thus m - u.
(⇐) If n = miu then ordm(n) ≥ i. If mi+1|n we would have m|u. So
since m - u, ordm(n) < i+ 1 and therefore ordm(n) = i.
The following is comparable to the triangle inequality in
analysis.
Proposition 1.48. Let m > 1 and a, b ∈ N. Then ordm(a+b) ≥
min{ordm(a), ordm(b)}. Moreover if ordm(a) < ordm(b) then
ordm(a+ b) = ordm(a).
Before working through this proof the reader should try a few
examples.
Proof. Let i = ordm(a) and j = ordm(b). By the previous proposition
we may write a = miu and b = mjv, with m - u, v. If i ≤ j
then
a+ b = mi(u+ vmj−i).
If i < j it is easy to see that n - (u+ vmj−i), so that ordm(a+
b) = ordm(a) by the previous proposition. If i = j then the same
equation shows that mi|(a+ b). Since ordm(a+ b) is the maximum of
such exponents, we conclude that ordm(a+ b) ≥ i. Of course the case
i ≥ j is similar.
6.2. Prime Numbers. For every number n ∈ N, it is easy to see that
1, n ∈ Div(n). For some numbers, these are the only elements of
Div(n).
Definition. A number p > 1 is prime if Div(p) = {1, p}.
For example 8675309 and 314159 are prime.
Thus a number p > 1 is prime if whenever d|p, then d = 1 or p.
Another way to say this is as follows. One might call a divisor d
of n a “proper divisor” if d 6= 1, p. If a number has a proper
divisor it is called “composite”. Then, p is prime if and only if
it is not composite.
Activity: Prime Number Bee Have all the students all stand up, and
pick some order to go around the class. Successive students must
recite the prime numbers 2, 3, 5, . . .. Any student who gives a
composite number, skips a prime, or takes more than ten seconds
must sit, and the last one standing receives a prize.
Proposition 1.49. If p|ab then p|a or p|b.
6. THE FUNDAMENTAL THEOREM OF ARITHMETIC 39
Proof. Suppose that p - a. Then Div(a, p) = 1, thus by the
Euclidean Algo- rithm there are numbers m,n so that ma − np = 1.
Multiplying this by b yields mab − npb = b. By hypothesis, p
divides both parts of the left hand side, and therefore it divides
b.
Proposition 1.50. If p|(a1 · · · an), then p divides some ai.
Proof. Induction on n. This is clear if n = 1, suppose it is true
for n = k. Then if p|(a1 · · · ak+1) = (a1 · · · ak) · ak+1, we
have p|(a1 · · · ak) or p|ak+1 by Proposition 1.49. In the first
case, p divides some ai by the case n = k. In the second case we
are also done.
The next proposition shows that if p is prime, then the function
ordp : N → N behaves much like a logarithm.
Proposition 1.51. If p is prime and a, b ∈ N then ordp(ab) =
ordp(a) + ordp(b).
Proof. Let i = ordp(a). Thus there is a number u so that a = piu,
and p - u. Similarly if j = ordp(b) there is a v so that b = pjv
and p - v. So ab = piupjv = pi+juv. The contrapositive of
Proposition 1.49 tells us that p - uv. Therefore ordp(ab) = i+
j.
Corollary 1.52. If p is prime, a ∈ N and e ∈ N, then ordp(ae) = e
ordp(a).
To illustrate some of the power of ord2, we will essentially prove
the square root of 2 is irrational. (Only “essentially” because we
don’t have rational numbers yet!)
Proposition 1.53. Let a, b ∈ N. Then a2 6= 2b2.
Proof. Suppose that a2 = 2b2. Taking ord2 of both sides gives 2
ord2(a) = 2 ord2(b) + 1. The RHS is odd and the LHS is even, which
is a contradiction.
Proposition 1.54. If N > 1 then N has a prime factor.
Proof. Strong Induction on N . If N is prime then we are done.
Otherwise, N is composite, so it factors in some nontrivial way,
say N = de, with d, e < N . By the inductive hypothesis, d has a
prime factor, which is therefore also a prime factor of N .
Proposition 1.55. There are infinitely many prime numbers.
Proof. By Contradiction. Suppose there are only finitely many p1, .
. . , pm. Consider the number N = p1 · · · pm + 1. By the previous
proposition N must have a prime factor. This prime factor must be
one of the pi and therefore divides the LHS of
N − p1 · · · pm = 1, which is of course a contradiction.
Lemma 1.56. If p and q are primes, and p|q, then p = q.
40 1. ARITHMETIC
Proof. Exercise.
Proposition 1.57. Let p be prime and n ∈ N. Then Div(pn) = {pe; 0 ≤
e ≤ n}.
Proof. Suppose d ∈ Div(pn), and let e = ordp(d). Then d = peu, with
p - u. If u 6= 1 then by Proposition 1.54 it has a prime factor q
6= p. This implies that q|pn, thus Proposition 1.50 implies q|p,
contradicting the above lemma. We conclude that u = 1 and thus d =
pe. It is easy to see that e ≤ n.
Corollary 1.58. Let p, q be distinct primes, and m,n ∈ N. Then
gcd(pm, qn) = 1.
Proof. The above proposition shows that if x ∈ Div(pm, qn) then x =
pe = qf
for some e, f ∈ N. If one of e, f is 0 then x = 1. Otherwise we
have p|qf which by Proposition 1.50 implies p|q so p = q again, a
contradiction.
Theorem 1.59. (Fundamental Theorem of Arithmetic, Existence) Let N
> 1, and let p1, . . . , pm be the prime divisors of N . Let ei
= ordpi(N) for all such i. Then
N = pe1 1 · pe2
2 · · · pem m .
Proof. Write M for the RHS of the above equation. It is easy to see
that ordp(M) ≥ ordp(N) for all primes p. We know that pei
i divides N for all i, and by the previous corollary we know these
factors are pairwise coprime. By Propo- sition 1.45 we deduce that
M |N . Thus N = Mu for some u ∈ N. If u 6= 1 then by Proposition
1.54, u is divisible by some prime p. But then ordp(u) > 0 and
ordp(N) = ordp(M) + ordp(u), contradicting that ordp(M) ≥ ordp(N).
We conclude that u = 1 and M = N .
Theorem 1.60. (Fundamental Theorem of Arithmetic, Uniqueness) Let N
> 1, and suppose N factors in some way as
N = pf1 1 · pf2
2 · · · · pfr r ,
with all the pi prime and fi ∈ N. Then the pi are all the prime
divisors of N , and fi = ordpi
(N).
Proof. Obviously the pi at least form a subset of the prime
divisors of N , and the definition of ord implies that fi ≤
ordpi
(N). It follows that the RHS of the equation in the corollary is no
bigger than the RHS of the equation in the theorem, and equality
can only hold if we have equality of the ei and fi.
For example, 108 = 2 · 2 · 3 · 3 · 3. If we group together like
factors we obtain 108 = 22 · 33.
6.3. More about ords. The Fundamental Theorem of Arithmetic says
that knowing a number is equivalent to knowing its ords. And given
whole numbers {ep} for every prime p, there is an n with ordp(n) =
ep for all p when all but finitely many of them are 0. Namely, put
n =
∏ p p
ep , a finite product. Moreover, knowing the ords of a number tells
us how it behaves multiplicatively. To understand this, start with
the following:
6. THE FUNDAMENTAL THEOREM OF ARITHMETIC 41
Proposition 1.61. Let a, b ∈ N. Then ab = c if and only if for all
primes p, ordp(c) = ordp(a) + ordp(b).
Proof. The direction (⇒) is Proposition 1.51. We prove the other
direction here. Let p1, . . . , p` be the list of all the primes
occuring in the factorizations of a, b, and c. Then
a · b = (pe1 1 · pe2
2 · · · pe`
where ei = ordpi (a) and fi = ordpi
(b). Let gi = ordp(c). Since ei + fi = gi this product
becomes
pg1 1 · pg2
as desired.
Proposition 1.62. Let a, c ∈ N. Then a|c⇔ ordp(a) ≤ ordp(c) for all
primes p.
Proof. If a|c then the result follows from the “only if” part of
the previous proposition. Conversely, if ordp(a) ≤ ordp(b) for all
primes p, then let
b = ∏ p
pordp(c)−ordp(a).
Note that since there are only finitely many primes with ordp(c) =
0, we also must have ordp(a) = 0, so only finitely many ordp(c) −
ordp(a) are nonzero. So the expression for b makes sense. Then the
“if” part of the previous proposition proves that ab = c.
Thus we can characterize Div(n) as the set of numbers a so that for
all primes p, ordp(a) ≤ ordp(n). For every p, there are (ordp(n) +
1) choices for ordp(a), and it follows that there are exactly
∏ p(ordp(n) + 1) divisors of n.
Proposition 1.63. If d = gcd(a, b), then ordp(d) = min{ordp(a),
ordp(b)} for all primes p. If µ = lcm(a, b), then ordp(µ) =
max{ordp(a), ordp(b)} for all primes p.
Proof. Let p be a prime, and suppose i = ordp(a) ≤ ordp(b). Then
pi|a and pi|b, so pi ∈ Div(a, b) = Div(d) and therefore pi|d.
However, pi+1 - a, so certainly pi+1 - d. It follows that ordp(d) =
i = min{ordp(a), ordp(b)} in this case. Obviously if ordp(b) ≤
ordp(a) a similar argument holds.
The statement about the least common multiple is an exercise.
We now have a straightforward way to compute the least common
multiple of two numbers. For instance let a = 75 and b = 21. We
factor to get a = 3 · 52 and b = 3 · 7. The only nonzero ords are
for p = 3, 5, 7. If µ = lcm(a, b) then we must have ord3(µ) = 1,
ord5(µ) = 2, and ord7(µ) = 1. This determines µ = 3 · 52 · 7.
Using these ord coordinates simplifies much of the theory of
multiplication; for example the following is much easier:
Proposition 1.64. Let a, b ∈ N. Then gcd(a, b) · lcm(a, b) =
ab.
42 1. ARITHMETIC
Proof. Given the above discussion, this reduces to proving that
min(x, y) + max(x, y) = x + y for all x, y ∈ N. This is obvious
from the proper point of view, or the skeptical reader may consider
the trichotomy of x and y.
This gives a way to compute lcm(a, b) without having to factor a
and b. For example, if a = 2000002 and b = 2000004 then the
Euclidean Algorithm gives that gcd(a, b) = 2 and therefore lcm(a,
b) = ab÷ 2 = 2000006000004.
6.4. Exercises.
(1) Lemma 1.56 and the second half of Proposition 1.63. (2) Let m
> 1 and a, b ∈ N. Prove that ordm(ab) ≥ ordm(a) + ordm(b). (3)
There is a formula relating ord2(n!) and Sn, where Sn is the sum of
the
binary digits of n. Can you find it? Can you prove it? (4) Recall
Euler’s totient function φ from Exercise 3 from Section 5.5.
Explain
why if p is prime, then φ(p) = p − 1. Find a formula for φ(p2).
Find a formula for φ(pk), with k ∈ N. If q 6= p is another prime,
prove that φ(pq) = φ(p)φ(q).
(5) Consider the sequence 41, 43, 47, 53, . . . obtained by
beginning with the number 41 and successively adding all positive
even integers 2, 4, 6, . . .. Are all the numbers in this list
prime? Give a proof or a counterexample. Also answer the same
question starting with 11 or 17.
(6) Use Problem 4 in Section 2.4 to prove that different Fermat
numbers are pairwise coprime. Why does this imply that there are
infinitely many prime numbers?
(7) Prove that 2n−1 is composite when n is composite. If n is
prime, is 2n−1 necessarily prime?
(8) Prove that gcd(a2, b2) = gcd(a, b)2 for a, b ∈ N. Is this true
for other powers?
(9) Prove that gcd(a, bc)| gcd(a, b) · gcd(a, c). (10) For which a,
b, c is gcd(a, b, c) · lcm(a, b, c) = abc? (11) If a|x and b|y
prove that gcd(a, b)| gcd(x, y). (12) Suppose that a|bc. Prove that
there are numbers a1, a2 ∈ N so that
a = a1a2, a1|b, and a2|c. (Use factorization and Exercise 5 in
Section 4.6.)
7. Rubric for Chapter 1
In this chapter you should have learned
• standard and strong induction, along with other induction schemes
• the Peano theory; how properties of arithmetic derive from just a
few
axioms • how to work with different kinds of definitions, for
example, inductive
definitions, the definition of a− b, and the definition of gcd(a,
b). • the Euclidean Algorithm • the role of the division algorithm
and Euclidean Algorithm
8. TOUGHIES 43
8. Toughies
(1) Show how to inductively find antiderivative of sinm(x) cosn(x)
with m,n any integers. They may be positive, negative, or zero.
What happens for fractions?
(2) (Uniqueness of the Natural Numbers) Suppose M is a set with an
element µ, and a “successor” function m 7→ m# for m ∈ M satisfying
the analogue of the Peano Axioms. That is to say,
(INF) m# 6= µ for all m ∈ M, (INJ) If m#
1 = m# 2 , then m1 = m2, and
(IND) If S ⊆ M is a subset satisfying µ ∈ S and m# ∈ S whenever m ∈
S, then S = M. Define a bijection f : N → M so that for all n ∈ N,
f(n′) = f(n)#. [Suggestion: Define your function “inductively”.] Be
sure to prove that your function is bijective. At what points do
you use the axioms (INF),(INJ),(IND) for N and M? (You need all
six.)
(3) Go back and rigorously prove your answer for problem 11 from
Section 3.4.
(4) For which a, b is it true that ab = ba? Let’s see a proof! (5)
Let a, b ∈ N. Recall the definition of the statement “a⊥b”; this
means
there is a natural number n ∈ N with an = b. If a > 1 write loga
b = n in this situation. Is loga b uniquely defined? Prove that if
a, b, c ∈ N with a > 1, a⊥c and c⊥b, then
(loga b)÷ (loga c) = logc b.
(6) Prove that the numbers q, r, e in Problem 8 in Section 4.6 are
uniquely determined.
(7) Let n ∈ N. Prove that in base X arithmetic there is a multiple
of n which is written as a string of ‘1’s followed by a string of
‘0’s. For example 11100 is a multiple of VI.
(8) Recall that fn denotes the nth Fibonacci number. Let a, b ∈ N.
Prove that gcd(fa, fb) = fgcd(a,b).
(9) Prove that given a number N one can find N consecutive numbers,
each having prime factors other than 2 or 3. Generalize this to any
finite set of primes.
(10) There is a formula relating ordp(n!) and Sn, where Sn is the
sum of the base p digits of n. Can you find it? Can you prove
it?
(11) Prove that ordp( ( n k
) ) is the number of carries that occur in the base p
addition of k and n− k. (12) If s > 0, explain why∏
p prime
· 1 1− 5−s
n=1
1 ns .
(13) Let m ∈ N and n > 1. Put urdm(n) = min{i ∈ N;n|mi}, if this
set is nonempty, and let urdm(n) = ∞ otherwise. For example,
urd6(4) = 2
44 1. ARITHMETIC
since 4|62 but 4 - 61, and urd4(6) = ∞ since 6 - 4i for any i. Find
and prove some interesting properties of urd.
CHAPTER 2
46 2. MENSCHENWERK