(Ebook) Introduction to Number Theory by Mark Hunacek
ISBN 9781032332055, 9781032017204, 9781003318712,
1032332050, 1032017201, 1003318711 Pdf Download
https://ebooknice.com/product/introduction-to-number-theory-49406356
★★★★★
4.8 out of 5.0 (71 reviews )
DOWNLOAD PDF
ebooknice.com
(Ebook) Introduction to Number Theory by Mark Hunacek ISBN
9781032332055, 9781032017204, 9781003318712, 1032332050,
1032017201, 1003318711 Pdf Download
EBOOK
Available Formats
■ PDF eBook Study Guide Ebook
EXCLUSIVE 2025 EDUCATIONAL COLLECTION - LIMITED TIME
INSTANT DOWNLOAD VIEW LIBRARY
Introduction to Number
Theory
Introduction to Number Theory covers the essential content of an introduc-
tory number theory course including divisibility and prime factorization,
congruences and quadratic reciprocity. The instructor may also choose from
a collection of additional topics.
Aligning with the trend toward smaller, essential texts in mathematics,
the author strives for clarity of exposition. Proof techniques and proofs are
presented slowly and clearly.
The book employs a versatile approach to the use of algebraic ideas.
Instructors who wish to put this material into a broader context may do so,
though the author introduces these concepts in a non-essential way.
A final chapter discusses algebraic systems (like the Gaussian integers)
presuming no previous exposure to abstract algebra. Studying general
systems helps students to realize unique factorization into primes is a more
subtle idea than may at first appear; students will find this chapter interest-
ing, fun and quite accessible.
Applications of number theory include several sections on cryptography
and other applications to further interest instructors and students alike.
Textbooks in Mathematics
Series editors:
Al Boggess, Kenneth H. Rosen
Transition to Advanced Mathematics
Danilo R. Diedrichs and Stephen Lovett
Modeling Change and Uncertainty
Machine Learning and Other Techniques
William P. Fox and Robert E. Burks
Abstract Algebra
A First Course, Second Edition
Stephen Lovett
Multiplicative Differential Calculus
Svetlin Georgiev and Khaled Zennir
Applied Differential Equations
The Primary Course
Vladimir A. Dobrushkin
Introduction to Computational Mathematics: An Outline
William C. Bauldry
Mathematical Modeling the Life Sciences
Numerical Recipes in Python and MATLABTM
N. G. Cogan
Classical Analysis
An Approach through Problems
Hongwei Chen
Classic Vector Algebra
Vladimir Leptic
Introduction to Number Theory
Mark Hunacek
Probability and Statistics for Engineering and the Sciences with
Modeling Using R
William P. Fox and Rodney X. Sturdivant
https://www.routledge.com/Textbooks-in-Mathematics/book-series/
CANDHTEXBOOMTH
Introduction to Number
Theory
Mark Hunacek
First edition published 2023
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742
and by CRC Press
4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN
CRC Press is an imprint of Taylor & Francis Group, LLC
© 2023 Mark Hunacek
Reasonable efforts have been made to publish reliable data and information, but the author and
publisher cannot assume responsibility for the validity of all materials or the consequences of
their use. The authors and publishers have attempted to trace the copyright holders of all material
reproduced in this publication and apologize to copyright holders if permission to publish in this
form has not been obtained. If any copyright material has not been acknowledged please write and
let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known
or hereafter invented, including photocopying, microfilming, and recording, or in any information
storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, access www.copyright.
com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA
01923, 978-750-8400. For works that are not available on CCC please contact mpkbookspermissions@
tandf.co.uk
Trademark notice: Product or corporate names may be trademarks or registered trademarks and are
used only for identification and explanation without intent to infringe.
ISBN: 9781032332055 (hbk)
ISBN: 9781032017204 (pbk)
ISBN: 9781003318712 (ebk)
DOI: 10.1201/9781003318712
Typeset in Palatino
by codeMantra
This book is dedicated to Leslie, Adrienne and Sofia,
the three most important women in my life.
Contents
Preface ......................................................................................................................xi
Author ....................................................................................................................xv
Introduction: What Is Number Theory? ........................................................... 1
0.1 Exercises .................................................................................................5
1 Divisibility .......................................................................................................7
1.1 The Principles of Well-Ordering and Mathematical Induction .....7
Exercises ............................................................................................... 10
1.2 Basic Properties of Divisibility .......................................................... 11
Exercises ............................................................................................... 13
1.3 The Greatest Common Divisor ......................................................... 14
Exercises ............................................................................................... 19
1.4 The Euclidean Algorithm .................................................................. 19
Exercises ...............................................................................................22
1.5 Primes ................................................................................................... 23
Exercises ............................................................................................... 27
1.6 Numbers to Different Bases .............................................................. 28
Exercises ............................................................................................... 29
Challenge Problems for Chapter 1.................................................... 29
2 Congruences and Modular Arithmetic .................................................... 31
2.1 Basic Definitions and Principles ....................................................... 31
Exercises ...............................................................................................34
2.2 Arithmetic in Z n ..................................................................................34
Exercises ............................................................................................... 39
2.3 Linear Equations in Z n ....................................................................... 39
Exercises ...............................................................................................42
2.4 The Euler Phi Function ......................................................................43
Exercises ............................................................................................... 46
2.5 Theorems of Wilson, Fermat and Euler ........................................... 46
Exercises ............................................................................................... 49
2.6 Pythagorean Triples ............................................................................ 50
Exercises ............................................................................................... 52
Challenge Problems for Chapter 2.................................................... 53
3 Cryptography: An Introduction ................................................................ 55
3.1 Basic Definitions .................................................................................. 55
3.2 Classical Cryptography ...................................................................... 56
Exercises ............................................................................................... 60
vii
viii Contents
3.3 Public Key Cryptography: RSA......................................................... 60
Exercises ............................................................................................... 62
Challenge Problems for Chapter 3....................................................63
4 Perfect Numbers ...........................................................................................65
4.1 Basic Definitions and Principles: The Sigma Function ..................65
Exercises ............................................................................................... 67
4.2 Even Perfect Numbers ........................................................................ 67
Exercises ............................................................................................... 69
Challenge Problems for Chapter 4.................................................... 69
5 Primitive Roots ............................................................................................. 71
5.1 Order of an Integer ............................................................................. 71
Exercises ............................................................................................... 73
5.2 Primitive Roots .................................................................................... 73
Exercises ............................................................................................... 75
5.3 Polynomials in Z p ................................................................................ 75
Exercises ...............................................................................................77
5.4 Primitive Roots Modulo a Prime ......................................................77
Exercises ............................................................................................... 79
5.5 An Application: Diffie-Hellman Key Exchange ............................. 79
5.6 Another Application: ElGamal Cryptosystem ...............................80
Challenge Problems for Chapter 5.................................................... 81
6 Quadratic Reciprocity ..................................................................................83
6.1 Squares Modulo a Prime ....................................................................83
Exercises ...............................................................................................84
6.2 Euler’s Criterion and Legendre Symbols .........................................84
Exercises ............................................................................................... 88
6.3 The Law of Quadratic Reciprocity.................................................... 88
Exercises ...............................................................................................90
6.4 The Supplemental Relations .............................................................. 91
Exercises ............................................................................................... 92
6.5 The Jacobi Symbol ............................................................................... 93
Exercises ............................................................................................... 95
Challenge Problems for Chapter 6.................................................... 95
7 Arithmetic Beyond the Integers ................................................................ 97
7.1 Gaussian Integers: Introduction and Basic Facts ............................ 97
Exercises ............................................................................................... 99
7.2 A Geometric Interlude ........................................................................ 99
Exercises ............................................................................................. 100
7.3 Divisibility and Primes in the Gaussian Integers ........................ 100
Exercises ............................................................................................. 102
Contents ix
7.4 The Division Algorithm and the Greatest Common
Divisor in Z [i ]..................................................................................... 103
Exercises.............................................................................................. 107
7.5 An Application: Sums of Two Squares........................................... 108
Exercises.............................................................................................. 110
7.6 Another Application: Diophantine Equations............................... 110
Exercises.............................................................................................. 112
7.7 A Third Application: Pythagorean Triples..................................... 112
Exercises.............................................................................................. 113
7.8 Irreducible Gaussian Integers.......................................................... 113
Exercises.............................................................................................. 115
7.9 Other Quadratic Extensions............................................................. 115
Exercises.............................................................................................. 117
7.10 Algebraic Numbers and Integers..................................................... 118
Exercises.............................................................................................. 119
7.11 The Quaternions................................................................................ 119
Exercises.............................................................................................. 122
7.12 Sums of Four Squares........................................................................ 122
Challenge Problems for Chapter 7................................................... 125
Appendix A: A Proof Primer............................................................................ 127
Appendix B: Axioms for the Integers............................................................. 135
Appendix C: Basic Algebraic Terminology................................................... 139
Bibliography......................................................................................................... 143
Index...................................................................................................................... 145
Preface
This book, intended as a text for a junior/senior-level undergraduate course
in elementary number theory, is based on my experience teaching such a
course at Iowa State University. The course, though taught by a member
of the mathematics department, is cross-listed with the computer science
department so the audience typically consists of mathematics and computer
science majors, in roughly equal proportion, along with an occasional minor
in one of these subjects.
Both the computer science and mathematics departments offer an “intro-
duction to proofs” course, completion of either one of which is the only pre-
requisite for the number theory course. Despite this requirement, however,
I have found over time that any real level of comfort with creating proofs
cannot be assumed, so I have spent at least one class period reviewing this
material. This review is reflected in this text: there is an Appendix on proof
techniques, and particularly in the beginning of the text, proofs are pre-
sented in considerable detail.
Another issue that I grappled with when teaching the course is the extent of
algebra that I wished to include. Abstract algebra not being a prerequisite for
the course, most students in it had never heard of words like “group”, “ring”
or “field”. The first time I taught the course, I likewise avoided any mention
of these terms, but I found that maddingly frustrating. I was reminded of
my experience as an undergraduate taking a comparable course; when the
subject of primitive roots came up, I was able to understand the definition
and the various proofs, but I had little intuitive feel for the idea; it wasn’t until
later, after learning what a group was, that I realized that all of this was just
about cyclic groups. Likewise, results like Euler’s theorem suddenly became
much clearer to me, when I realized the “right” context for these results. So,
teaching the course in subsequent semesters, I experimented with mention-
ing enough algebra to at least give the students some indication of the fact
that these results were best viewed in a more general context. Some semes-
ters I would just mention the technical terms and tell the students without
detail that there was something deeper going on; on other occasions, I would
take a day or two to actually develop some abstract algebra in class and then
show, for example, the connection between Euler’s theorem and Lagrange’s
theorem in group theory. All these approaches have their benefits and draw-
backs, and to accommodate differing choices among instructors, I have tried
to provide flexibility in this text. The book can be read without ever men-
tioning abstract groups, rings or fields, but these terms are introduced in
an Appendix and at least referred to (in a non-essential way) in the text. An
instructor can simply ignore these references, or discuss them in varying
degrees of detail, as he or she sees fit.
xi
xii Preface
One inclusion of an algebraic idea that I could not resist occurs in the
section on greatest common divisors. I have always had a fondness for
proving the existence of the gcd by using ideals, so, in Chapter 1, I define
that concept (for the integers only), prove that any ideal in the integers is
generated by a single element, and use that result to quickly prove, in one
fell swoop, that the gcd of two integers exists and is a linear combination of
those integers.
This approach to the gcd pays dividends in the final chapter of the book,
which also introduces some algebraic ideas, though in a fairly concrete set-
ting, focusing on specific examples rather than abstract algebraic systems.
This chapter begins with a fairly detailed look at the Gaussian integers, mim-
icking, wherever possible, the various arguments used previously in the text
for the ordinary integers (including the concept of an ideal and using ideals
to prove the existence of a gcd). From the Gaussian integers, we proceed to
other quadratic extensions, including a discussion of algebraic systems in
which unique factorization fails, thus showing the students that unique fac-
torization is a more subtle concept than might have originally been thought.
As a very pleasant additional benefit, studying other algebraic systems can
actually be used to prove results about the ordinary integers. As seen in the
text, for example, the Gaussian integers can actually be used to prove results
about sums of two squares of integers and also used to classify Pythagorean
triples. Studying the quaternions allows a proof that any positive integer can
be written as the sum of four squares. Over the years, I have found that my
students find this material to be interesting, fun and quite accessible. And
here again, the instructor has some discretion in determining whether to use
algebraic terms like “ring” and “field”; I have written the book so as to accom-
modate either choice.
In writing this book, I have resisted the urge to discuss a plethora of top-
ics, most of which will never be gotten to in a one-semester introductory
course. I find it discouraging to use a book as a text for a course and then only
cover half (or less) of it. Students, I think, don’t like this either, particularly
since they are the ones who are paying for the book. Therefore, I have tried
to write a book that covers the essential content of an introductory number
theory course (divisibility and prime factorization, congruences, quadratic
reciprocity) and a collection of topics from which the professor can choose
(perfect numbers, sums of squares, Pythagorean triples, primitive roots and,
as previously noted, a chapter on algebraic systems other than the integers).
Because I invariably had computer science majors in my class, and because
the math majors also generally found it interesting, I also have included
some optional material on cryptography. All told, there is probably a little
more material in the text than can be covered in a one-semester course, but
not so much more as to be discouraging. The last time I taught the course, I
covered in one class period a selection of material from Chapter 0, and then
did Chapters 1 through 6 in their entirety (weaving in, as appropriate, the
three Appendices). This left me enough time to cover a substantial amount of
Preface xiii
Chapter 7. I have never succeeded in covering the quaternions, but I always
make it a point to get to Section 7.9 and at least give an example or two of
non-unique factorization in a quadratic extension of the integers. Because the
course more or less begins with unique factorization in the integers, coming
full circle and looking at non-unique factorization in other contexts seem an
excellent way to end the semester.
Author
Mark Hunacek has advanced degrees in both mathematics (PhD, Rutgers
University) and law (JD, Drake University Law School). He is now a Teaching
Professor Emeritus at Iowa State University, and before entering academia,
he was an Assistant Attorney General for the state of Iowa.
xv
0
Introduction: What Is Number Theory?
Carl Friedrich Gauss, whom many people consider the greatest mathema-
tician who ever lived, once described number theory as the “Queen of
Mathematics”. Indeed, the integers (“whole numbers”), and the patterns
they exhibit, have been the subject of fascination and study for literally thou-
sands of years. Euclid’s famous treatise The Elements, which is often thought
as being solely related to geometry, actually contains many results that are
theorems of number theory. In Chapter 1 of this text, for example, we will
give Euclid’s proof that there are infinitely many prime integers.
For our purposes, the term “number theory” will (mostly) refer to the study
of the integers and various issues connected with them. Unlike many areas
of mathematics, where the problems and conjectures themselves (let alone
the proofs) are so technical that one has to be a specialist in the area to even
understand them, many questions in number theory do not involve technical
terms or results and can be understood by a grade-schooler. In this introduc-
tory chapter, we will look at some examples of these problems, so as to try
and give a sense of the flavor of the subject.
First, let us start with one of the most famous problems in mathematics:
Fermat’s Last Theorem. This is one of the great success stories of mathematics,
and it also has a fascinating history that dates back to the Pythagorean theo-
rem: if a right triangle has sides of length x and y and hypotenuse of length z,
then x2 + y2 = z2. From a number-theoretic point of view, it is of interest to look
for positive integer solutions to this equation, such as x = 3, y = 4 and z = 5. Later
in the text, we will find the general form of all such solutions.
Mathematicians love to generalize from one problem to another, and when
you’ve considered x2 + y2 = z2, it is not too big a leap to consider more gen-
eral equations like xn + yn = zn, where n > 2 is a positive integer. Equations like
these are called Diophantine equations, in honor of the Greek mathematician
Diophantus, who wrote a textbook titled Arithmetica in which he discussed
solutions of many equations.
In the mid-1600s, a lawyer and amateur mathematician named Pierre
Fermat was reading Diophantus’s book and wrote in the margin that he had
discovered a “marvelous proof” that “this margin is too narrow to contain”
that for positive integers n > 2, the above-mentioned equation xn + yn = zn has
no solution in positive integers x, y and z.
Whether Fermat actually did have such a proof is something that will
never be known for sure, but most authorities believe that he did not. In any
event, this cryptic marginal reference led to a search, lasting for more than
DOI: 10.1201/9781003318712-1 1
2 Introduction to Number Theory
300 years, for a proof of this result. Correct proofs were given for some spe-
cific values of n (Fermat himself proved the result for n = 4, and Euler proved
the result for n = 3 by a different method) but nobody came up with a proof
that worked for all n. On the other hand, nobody could come up with a coun-
terexample showing the result to be false. Some mathematicians, including
some very good ones, thought they had come up with a proof, but errors
were always found. Sometimes these errors themselves shed some light on
subtle points, such as the uniqueness of factorization into primes.
Finally, in 1993, Andrew Wiles announced that, after 7 years of intense
effort, he had found a proof of the result. Unfortunately, Wiles’ proof was
found to contain an error, but that error was, in collaboration with his stu-
dent Richard Taylor, eventually patched up in 1994. The proof, published in
1995, uses very deep and difficult mathematics that is far beyond the scope of
this text, and which did not even exist in Fermat’s time.
As just noted, Fermat’s equation xn + yn − zn = 0 is an example of a Diophantine
equation. More generally, a Diophantine equation in k variables x1, x2, …, xk
is an equation of the form p(x1, x2, … xk) = 0, where p is a polynomial in these
variables with integer coefficients. The study of such polynomial equations,
which is a major part of number theory, itself naturally leads to several ques-
tions, including questions of interest to computer scientists. Specifically, one
might ask: Is there an algorithm for determining whether a given Diophantine
equation has a solution in integers or rational numbers? If so, is there an
algorithm for determining all such solutions? If we can’t determine all solu-
tions, can we at least determine some? The first of these questions is known
as Hilbert’s Tenth Problem, so named because it was the tenth of 23 then-
open problems identified by the mathematician David Hilbert in a famous
speech that he gave in Paris in the year 1900. In 1970 it was shown, via the
collaborative efforts of several mathematicians, that no such algorithm exists.
This result shows just one way in which number theory intersects with other
areas of mathematics (here, logic).
Fermat’s Last Theorem and Hilbert’s Tenth Problem are at least mathemati-
cal problems that were eventually solved. There are other problems in num-
ber theory that remain unsolved to this date. A number of them are also easy
to state. As a first example, let us say that a positive integer n is perfect if the
sum of its factors (other than n itself) is equal to n. For example, 6 is perfect,
because 1 + 2 + 3 = 6. There are, as of this writing, only 51 known perfect num-
bers, all of which are even. This suggests two questions: Are there any odd
perfect numbers? Are there infinitely many even perfect numbers? Nobody
knows the answer to either of these questions. However, as we will see, we
can at least tell what an even perfect number looks like: we’ll prove this later,
but the answer is hinted at in exercises 0.4 and 0.5.
Here’s another example of a problem that is also easy to state but currently
unsolved. Start with a positive integer n (your choice!); now define a new pos-
itive integer, which we will call n’, as follows: if n is even, n’ = n/2; if n is odd,
n’ = 3n + 1. Now, having defined n’, use this same recipe to define (n’)’, and so
Introduction 3
on. We obtain a sequence of positive integers in this manner; for example, if
our initial choice was n = 7, we obtain the sequence 7, 22, 11, 34, 17, 52, 26, 13,
40, 20, 10, 5, 16, 8, 4, 2, 1. Note that once we arrive at 1, we are essentially done,
since from this point on the sequence just loops around: 1, 4, 2, 1. Let’s illus-
trate this with another value of n, say n = 15. We get 15, 46, 23, 70, 35, 106, 53,
160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1. So we have again arrived at 1. This suggests
the question: do we always arrive at 1, no matter what initial choice of n was
made? The assertion that we do is called the Collatz Conjecture; it was pro-
posed by Lothar Collatz in 1937, but to this day nobody has either proved it or
found a counterexample, although, using computers, this conjecture has been
verified for literally trillions of integers. Quite recently, in September 2019,
Terrence Tao announced a major breakthrough in this problem: although not
completely proving the truthfulness of the conjecture, Tao did prove that for
“almost all” starting values, the conjecture is at least “almost true”, where
“almost all” and “almost true” have rather technical mathematical meanings.
Another interesting thing happened in September 2019. For some time,
mathematicians have been interested in knowing which integers can be
expressed as the sum of three cubes (positive, negative or zero). Since the
1950s, computers have been used to help determine whether integers can or
cannot be so expressed. The numbers 33 and 42 proved especially recalci-
trant, but in September 2019 an expression of each of these numbers as a sum
of three cubes was, using computers, found. The three integers whose cubes
sum to 33 each have 16 digits; the three whose cubes sum to 42 have 17 digits
each.
These examples illustrate that computers can play a big role in number
theory problems. One way to discover patterns (that can then be proved theo-
retically) is to use computers to explore lots of special cases. Computers can
also be used to find counterexamples to conjectures as well.
Another source of fascination over the years has been prime numbers. These
are integers, greater than 1, that are divisible only by themselves and 1. So, for
example, the first few primes are 2, 3, 5, 7 and 11. A number of questions (some
easy, some hard) can be asked about these numbers and their distribution
among all the positive integers. One obvious one is: is there a largest prime
number? Or, putting it another way: are there only finitely many primes? The
answer to this question has been known for thousands of years; it is not too
difficult to prove (and we will soon see several different proofs) that there are,
in fact, infinitely many primes. Quite a lot of computing time has been spent
trying to discover very large primes; the largest known one, as of this writing,
was discovered in December 2018 and has almost 25 million digits.
Not all questions about prime numbers are this easy to answer; there are
some that are so difficult that, even after hundreds of years, their answers
are not yet known. For example, note that 3 and 5, and 5 and 7, are both
primes; so are 11 and 13. These are known as twin primes because they are
two consecutive odd numbers. The twin prime conjecture asserts that there are
infinitely many pairs of twin primes, but nobody has proved or disproved it.
4 Introduction to Number Theory
In mathematics, if a problem proves very difficult, it is fairly common
to look at a related but simpler problem. Since the twin prime conjecture
is hard, let us consider the following weaker conjecture: that there is some
positive integer k with the property that there are infinitely many primes
differing by at most k. (This is called the bounded gap problem; if we could
establish that k = 2, we would have the twin prime conjecture.) For more than
100 years, this, too, was an unsolved problem, but in 2003, a mathematician
named Yitang Zhang proved that such a positive integer k existed.
A number of other questions (easy to state but hard to answer) about prime
numbers have been posed over the years. The famous Goldbach conjecture (first
posed in 1742), for example, asserts that every positive even integer greater
than 2 can be written as the sum of two (not necessarily distinct) primes. So,
for example, 4 = 2 + 2, 6 = 3 + 3, 8 = 3 + 5, 10 = 3 + 7 (or 5 + 5), 12 = 5 + 7, etc. This con-
jecture has been tested and verified for literally billions of positive even inte-
gers, but nobody has yet proved that it always holds. What has been proved,
however, is that every positive even integer greater than 2 can be written as
the sum of a prime and another positive integer that is the product of at most
two primes.
Goldbach’s conjecture, if true, has an immediate consequence: every posi-
tive odd integer greater than 5 can be written as the sum of three (not nec-
essarily distinct) primes. This latter statement, though clearly implied by
Goldbach’s conjecture (why?), does not itself imply it; it is therefore a weaker
statement of the conjecture. Even this weaker statement, however, remained
unproved for centuries, but in 2013 a proof of it was announced by Harald
Helfgott.
Of course, not all problems in number theory are as easy to understand as
the ones discussed above. Some are very technical—indeed, too technical to
conveniently state here. An example is the famous Riemann Hypothesis, which
is quite likely the most famous currently unsolved problem in mathematics,
and one for which a prize of 1 million dollars for its solution has been offered
by the Clay Mathematics Institute. (There are seven such problems, called
the Millennium Prize Problems; they were proposed in 2000, and, since then,
only one of them has been solved.) There are several equivalent ways to state
the Riemann Hypothesis, which involves, at a very deep level, the distribu-
tion of prime numbers among all the integers.
These examples of questions in number theory don’t even begin to scratch
the surface of the kind of problems that arise in the subject. Numerous other
examples of number theoretic questions will be discussed in the rest of the
book.
One final comment: Historically, number theory was considered to be a
completely “pure” subject in mathematics, without “real life” applications.
The number theorist G.H. Hardy, for example, in his famous A Mathematician’s
Apology, wrote: “No one has yet discovered any warlike purpose to be served
by the theory of numbers or relativity, and it seems very unlikely that any-
one will do so for many years.” Hardy was wrong: number theory is now
Introduction 5
recognized as having many practical applications, to warfare and other
more peaceful concerns, most notably to the subject of cryptography. We will
address some of these cryptographic applications later in the book.
0.1 Exercises
0.1. Find several prime numbers that can be written in the form n2 + 1,
for some positive integer n. The question of whether there are infi-
nitely many such primes is also unsolved to this day. The question
of whether there are infinitely many primes of the form n3 + 1 is,
however, easily resolved. Explain. What about primes of the form
n2 − 1? Explain again.
1
Divisibility
1.1 The Principles of Well-Ordering and
Mathematical Induction
The word “number” may, depending on context, mean different things to dif-
ferent people. There are lots of different kinds of numbers in mathematics—real
numbers, rational numbers, complex numbers, algebraic numbers and even more
esoteric things like quaternions, octonions, p-adic numbers or surreal numbers.
For our purposes, however, the word “number” shall, except for the last chapter
in this book, refer to an element of the set Z of integers; i.e., the “whole numbers”:
….−2, −2, 0, 1, 2, ….The reader has presumably been dealing wiwth these num-
bers since grade school, but probably not in any kind of theoretical sense.
We will not attempt any kind of formal definition of an integer but will
instead rely on the reader’s experience with them. In particular, we assume
that the reader knows what an integer is; knows that there are operations of
addition, subtraction and multiplication defined on the set of integers; and
knows that these operations satisfy the usual rules of arithmetic: addition and
multiplication, for example, satisfy the associative and commutative laws, as
well as the distributive laws. We will also assume that the reader is familiar
with the notion of positive and negative integers, and the basic facts concern-
ing them (e.g., that the sum and product of two positive integers is positive).
However, it should be noted that in mathematics, if you are going to prove
something about an object, you need to know precisely what that object is.
Therefore, a precise approach to the study of the integers would involve writing
down some axioms for these numbers and deducing things as a consequence of
these axioms. To give an idea of how this is done, we have specified a set of axi-
oms in Appendix B and shown how certain basic properties of the integers follow
from them. Another Appendix (A) also provides a quick “primer” on the nature
of proof and the basic principles of logic that are used in mathematics all the time.
There is one property of the integers that the reader may not have seen
before, so let us single it out now. The set Z of integers has no smallest num-
ber; we can keep going backward in the set forever. But the set of positive
integers has the smallest number 1, and therefore, our intuition tells us that in
any nonempty set of positive integers we cannot regress backward infinitely
DOI: 10.1201/9781003318712-2 7
8 Introduction to Number Theory
far. The Well-Ordering Principle, stated below (and also taken as an axiom in
Appendix B), makes this intuition precise.
Well-Ordering Principle: Any nonempty set S of positive integers contains
a smallest element, i.e., an element x with the property that x ≤ y for all y ∈ S.
We immediately point out a trivial restatement of this principle: any non-
empty set S of nonnegative integers has a smallest element. This is because
if 0 is an element of S, then it is clearly the smallest element of it; if 0 is not
an element of S, then S consists of positive integers and the Well-Ordering
Principle applies.
We motivated the Well-Ordering Principle by noting that there is a small-
est positive integer, namely 1. This is certainly something that most readers
of this book will be happy to take on faith as a “given”, based on their years
of prior acquaintance with the set of integers. Yet, it is not something that was
assumed as an axiom and, it turns out, can be proved easily as a consequence
of the Well-Ordering Principle. Because of the simplicity of the proof, and
because it illustrates how to use the Well-Ordering Principle, we take the
time to prove it precisely rather than just slip it under the rug.
Theorem 1.1.1
There is no positive integer that is less than 1.
Proof. Suppose to the contrary that a positive integer less than 1 existed. Then
the set S of all positive integers less than 1 is nonempty, and hence, by the Well-
Ordering Principle, has a smallest element; call it x. Multiply the inequality
0 < x < 1 by x; since we are multiplying by a positive integer, the inequality is
preserved and we get 0 < x2 < x < 1. It follows from this that x2 is a positive inte-
ger that is less than 1 but also less than x, which contradicts our definition of x.
This theorem finds immediate application in the next result, which states
precisely, and proves, the Principle of Mathematical Induction. The reader
may have already encountered this idea previously; it is a standard proof
method. Because we deduce this as a consequence of the Well-Ordering
Principle, we label it as a theorem.
Theorem 1.1.2
(Principle of Mathematical Induction) Suppose that
• S is a subset of the set of positive integers,
• 1 ∈ S, and
• n + 1 ∈ S whenever n ∈ S.
Then S consists of all positive integers.
Divisibility 9
Proof. Assume, hoping for a contradiction, that there is a positive integer that
is not in S. Then, by the Well-Ordering Principle (applied to the nonempty set
of all such integers) there must be a smallest positive integer not in S; call it
k. Note that k ≠ 1 (because 1 ∈ S), so k − 1 is a positive integer (note that we
are using Theorem 1.1.1 here!) and because it is smaller than k, must be in S.
However, by assumption, since k − 1 ∈ S, it must be the case that k = (k − 1) + 1 ∈ S,
a contradiction. This contradiction yields the desired result.
The Principle of Mathematical Induction is typically used as a proof tool. If
asked to prove that a certain statement is true for all positive integers n, one
first proves it is true for n = 1 and then, assuming it is true for n, proves it true
for n + 1. In the language of the preceding theorem, we let S be the set of all
positive integers n for which the result is true; the proofs just discussed then
show that S is the set of all positive integers, and we are done.
We illustrate this method with a simple example: we will prove that the
sum of the first n positive integers is equal to n(n + 1)/2. For n = 1, this is obvi-
ous because (1 × 2)/2 = 1. So, now assume the result is true for n, and let us
examine the sum of the first n + 1 positive integers; we want to prove this is
equal to (n + 1)(n + 2)/2. Well,
1 + 2 + …. + n + (n + 1) =
(1 + 2 + …+ n) + (n + 1) =
n(n + 1)/2 + (n + 1) =
n(n + 1)/2 + 2(n + 1)/2 =
(n(n + 1) +2 (n + 1)) /2 =
(n + 1)(n + 2)/2, completing the proof.
The Principle of Mathematical Induction has alternative forms. One is the
Strong Induction Principle, which we state below. The proof is similar to that
of Theorem 1.1.2 and is therefore omitted.
Theorem 1.1.3 (Strong Induction Principle)
Suppose that
• S is a subset of the set of positive integers,
• 1 ∈ S, and
• n + 1 ∈ S whenever 1, 2, …, n ∈ S, for any positive integer n.
Then S consists of all positive integers.
10 Introduction to Number Theory
To use the Strong Induction Principle in a proof, we therefore first prove
that 1 is in S, and then we assume, for an arbitrary positive integer n, that S
contains all the positive integers from 1 to n, and we use that to prove that n + 1
∈S. As an example of a result that can be easily proved using Strong Induction
but not so easily proved using “regular” induction, there is the theorem that
any integer greater than 1 is either a prime number or a product of prime
integers. This is part of the Fundamental Theorem of Arithmetic, which is
proved in Section 1.5 of this chapter, after prime integers have been defined.
The proof we give actually uses Well Ordering, but Strong Induction can also
be used in the proof.
Another variant on the Principle of Mathematical Induction starts the
induction with a positive integer k rather than 1. In other words, instead of
assuming 1 ∈ S, we assume k ∈ S, and that n + 1 ∈ S whenever n ∈ S. This allows
the conclusion that S contains all integers that are greater than or equal to k.
We leave to the reader a precise formulation and proof of this result.
From this point on, we will freely use all the basic facts about addition,
multiplication and ordering on the set of integers that the reader has been
using for years. We will not attempt to prove, for example, that if r is any real
number then there is an integer n that is greater than r, and also an integer m
that is less than r.
Exercises
1.1 Prove by induction that the sum of the first n positive odd integers
is equal to n2.
1.2 Prove by induction that 2n > n for every positive integer n.
1.3 Prove by induction that a set with n elements has 2n subsets.
1.4 If n is a nonnegative integer, define the nth Fermat number Fn to be
n
2 2 + 1. Use mathematical induction to prove that, for every n, F0…
Fn + 2 = Fn+1. (We will see Fermat numbers again. They pop up in
unexpected places in mathematics, including the geometric ques-
tion of when a regular polygon with n sides can be constructed
with compass and straightedge alone.)
1.5 Find the error in this fallacious “proof” that all billiard balls have
the same color: “We will prove that, for any positive integer n, in
any set of n billiard balls, they all have the same color. This is obvi-
ous if n = 1. Now assume the result is true for n and consider a set of
n + 1 billiard balls; let us denote them by B1, …, Bn +1. By our induc-
tive assumption, all the balls in the set of n balls {B1, …, Bn} have the
same color; without loss of generality, let us say the color is black.
Now consider the set {B2, …, Bn+1}. This is also a set of n balls and so
they must have the same color as well. But this color must be black
because B2 is in both sets. So all the billiard balls B1, …, Bn+1 have
the same color, and we are done.”
Divisibility 11
1.2 Basic Properties of Divisibility
If m and n are integers, we say that m divides n (denoted m ∣ n) if there is an
integer k such that n = km. Other ways to say this are “n is divisible by m” or
“n is a multiple of m”. Intuitively, this means that “m goes evenly into n”. An
integer that is divisible by 2 is called even; an integer that is not even is called
odd. The parity of an integer refers to its “evenness” or “oddness”.
The following theorem collects some of the very basic properties of the
divisibility relation. The proofs of these properties are quite simple and pro-
vide good practice in writing straightforward proofs; for this reason, the
proofs are (with the exception of part (f)) given in Appendix A, on proof-
writing. We will use these basic results constantly in the rest of the book,
often without explicit mention.
Theorem 1.2.1
If m, n and r are integers, then the following are true:
Another way of saying that m ∣n is to say that n leaves a remainder of 0 when
divided by m. Although we can’t expect this to happen all the time, it is true
12 Introduction to Number Theory
(as you no doubt know from grade school) that we can divide an integer a by
a positive integer b to obtain a quotient q and remainder r, with r being a non-
negative integer less than b. The precise statement of this result is called the
Division Algorithm (a slight misnomer, since it is not really an “algorithm”
in the usual sense). Although we stated earlier that we will simply assume
as known all the basic facts about integer addition and multiplication, this
fact involves division and, we think, is best proved, particularly because the
proof provides a nice use of the Well-Ordering Principle.
Theorem 1.2.2
(Division Algorithm) If a and b are integers, with b positive, then there exist
unique integers q and r such that a = bq + r and 0 ≤ r < b.
Proof. We first prove that such q and r exist and will then prove that they
are unique. First note that if b ∣ a, then existence is obvious (with r = 0). So we
assume without loss of generality (to prove existence) that b does not divide
a. Let S be the set of all positive integers of the form a − bx, as x ranges over the
a
integers. It is obvious that S is nonempty; any x that is less than will give
b
an element of S. So, by Well-Ordering, S contains a smallest element, which
we will call r. By definition of r, it can be written as a − bq for some integer q.
So we know a = bq + r; it therefore suffices to prove 0 ≤ r < b, and since we know
r is positive, we need only show that r < b. We can’t have r = b because then
b would divide a, contrary to our assumption. (Why?) If we had r > b, then
a − b(q + 1) = r − b would be positive, less than r, and in the set S, a contradiction.
So in fact r < b, and we have shown the existence of a quotient and remainder
satisfying the conditions of the theorem.
We next prove uniqueness. Specifically, we prove that if a = bq1 + r1 = bq2 + r2,
with both r1 and r2 nonnegative and less than b, then r1 = r2 and q1 = q2. It suf-
fices to prove that r1 = r2, as simple algebra then would establish q1 = q2 . We use
a proof by contradiction, and assume instead, without loss of generality, that
r1 > r2. We then have, by some more simple algebra, r1 − r2 = b(q1 − q2). Since
b and r1 − r2 are both positive, q1 − q2 must be positive as well, which would
then imply that the right-hand side of this equation is at least equal to b. But
this is a contradiction, because r1 − r2 ≤ r1 < b. This concludes the proof.
The division algorithm is a powerful tool in number theory, and we will
begin putting it to use in the very next section, where we discuss the greatest
common divisor of two integers. For the moment, though, we record an easy
but important consequence of it. If b = 2, then the division algorithm tells us
that any integer a can be written as either 2q or 2q + 1, but not as both. Integers
of the first type are (as we mentioned above) called even, and integers of the
second type are called odd. The uniqueness of the quotient and remainder in
the Division Algorithm tells us that no integer can be both even and odd. This
surely does not come as a surprise to you, but it’s nice to know it “officially”. It
Divisibility 13
is easy to see that the product of two odd integers is odd (see the exercises). In
particular, if n is an integer and n2 is even, then n must be even. Just these basic
facts allow us to prove a result of immense historical significance, namely that
2 is irrational. (Recall that a rational number is a fraction; more precisely, it
a
is a number of the form , where a and b are integers.)
b
Our proof of the irrationality of 2 gives a preview of the concept of great-
est common divisor, discussed in the next section.
Theorem 1.2.3
2 is irrational.
a
Proof. Suppose, hoping for a contradiction, that we could write 2 = , where
b
a and b are positive integers. We can and do assume this fraction is in “lowest
terms”, meaning that a and b have no positive divisors in common except 1.
(We can always divide both a and b by any common divisors greater than 1
without changing the value of the fraction.) Squaring both sides and clearing
denominators gives 2b2 = a2. This equation tells us that a2 is even, and hence,
by the observation above, this means that a is even, say a = 2k. Squaring and
substituting gives 2b2 = 4k2 or b2 = 2k2, which implies that b2, and hence b, is
a
even. But if a and b are both even, then the fraction is not in lowest terms, a
b
contradiction.
The historical importance of this result can be traced back to at least as far
as the ancient Greeks, who believed that any two lengths were commensu-
rable, i.e., both a multiple of some other length. If that were true, though, then
it would be true for both the side of a unit square and its diagonal (which by
the Pythagorean theorem has length 2 ) and that would mean that 2 is
rational. The realization that the side and diagonal of a square are not com-
mensurable had important historical consequences and led Greek geometers
to separate the concepts of number and segment and to develop an intricate
“theory of proportions” to deal with these issues.
The Division Algorithm also underlies the idea of writing integers to “dif-
ferent bases”. This is discussed in Section 1.6 at the end of this chapter, but
this section can be read now if desired.
Exercises
1.9 Prove or disprove: if a, b, c are integers and a ∣ bc, then a ∣ b or a ∣ c.
1.10 Prove or disprove: if a, b, c are integers and a ∣ b + c, then a ∣ b or a ∣ c.
1.11 Prove part (f) of Theorem 1.2.1.
Other documents randomly have
different content
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebooknice.com