Table Of ContentOlympiad Number Theory Justin Stevens Page 1
Olympiad Number Theory
Through Challenging Problems
Authors Editor and LATEX
Justin Stevens Manager
David Altizio
Dedicated to my sister Justin
Contents
0 Introduction 4
0.1 Hello and problem solving tips . . . . . . . . . . . . . . . . . 4
0.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
0.3 Terminology and definitions . . . . . . . . . . . . . . . . . . 6
1 Divisibility: The building blocks of number theory 10
1.1 Euclidean Algorithm . . . . . . . . . . . . . . . . . . . . . . 10
1.2 Bezout’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . 21
1.3 Fundamental Theorem of Arithmetic . . . . . . . . . . . . . 27
1.4 Challenging Division Problems . . . . . . . . . . . . . . . . . 32
2 Modular Arithmetic 39
2.1 Inverses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.2 Chinese Remainder Theorem . . . . . . . . . . . . . . . . . . 41
2.3 Euler’s Totient Theorem and Fermat’s Little Theorem . . . . 46
2.4 The equation x2 ≡ −1 (mod p) . . . . . . . . . . . . . . . . 59
2.5 Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3 p-adic Valuation 73
3.1 Definition and Basic Theorems . . . . . . . . . . . . . . . . . 73
3.2 p-adic Valuation of Factorials . . . . . . . . . . . . . . . . . 76
3.3 Lifting the Exponent . . . . . . . . . . . . . . . . . . . . . . 83
3.4 General Problems for the Reader . . . . . . . . . . . . . . . 89
4 Diophantine equations 90
4.1 Bounding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
4.2 The Modular Contradiction Method . . . . . . . . . . . . . . 90
4.3 General Problems for the Reader . . . . . . . . . . . . . . . 97
2
Olympiad Number Theory Justin Stevens Page 3
5 Problem Solving Strategies 98
5.1 Chicken Mcnuggets anyone? . . . . . . . . . . . . . . . . . . 98
5.2 Vieta Jumping . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.3 Wolstenholme’s Theorem . . . . . . . . . . . . . . . . . . . . 108
5.4 Bonus Problems . . . . . . . . . . . . . . . . . . . . . . . . . 115
0
Introduction
0.1 Hello and problem solving tips
In this text, we attack many hard math problems using simple methods
and formulae. Each section begins with a theorem or general idea, along
with a fully rigorous proof. By the end of this text, I hope the reader has
mastered the method of induction. Each section is then filled with problems
off of the main idea of the section. Instead of including many computational
problems, we begin with a few ”easier” problems and then dig right into
olympiad problems. While this may be hard or challenging to those just
getting acquainted with mathematics, through personal experience, this is
the best way to learn number theory. I highly recommend the reader spends
time on each and every problem before reading the given solution. If you do
not solve the problem immediately, do not fret, it took me a very long time
to solve most of the problem myself.1 A few general tips for solving hard
number theory problems:
• Experiment with small cases. For example, while solving the following
problem:
Example 0.1.1 (2007 ISL). Let b,n > 1 be integers. For all
k > 1, there exists an integer a so that k | (b−an). Prove that
k k
b = mn for some integer m.
1Disclaimer: Ididnotsolvealloftheproblemsmyself,thesolutionsthatwerereworded
are sourced accordingly with numbers.
4
Olympiad Number Theory Justin Stevens Page 5
I first off tried n = 2 then n = 3 until I finally got the main idea that
broke through the problem (this problem is included later in the text).
• Simplify the problem. For example, while solving the following prob-
lem:
Example 0.1.2 (China TST 2009). Let a > b > 1 be positive
integers and b be an odd number, let n be a positive integer. If
bn | an −1 prove that ab > 3n.
n
I first off simplified the problem to just the case where b is prime, and
laterproceededtosolvethefullproblem. Thisproblemisalsoincluded
later in the text (in the lifting the exponent section).
• Find patterns. Make a table. For example, when observing 2n modulo
5, we observe that
n 2n (mod 5)
0 1
1 2
2 4
3 3
4 1
5 2
6 4
7 3
We hypothesize that 2n ≡ 2n (mod4) (mod 5). We later go on to prove
this and other important relationship in the modular section.
• Use problem solving techniques found throughout this book. Many
techniques are repeated throughout many problems. One of the most
famous techniques used to show that n (cid:45) 2n−1 when n > 1 is to let p
be the smallest prime divisor of n. This technique is very important,
and later showed up on two IMO problems!
Spend your time and struggle through the problems, and enjoy this text!
Olympiad Number Theory Justin Stevens Page 6
0.2 Motivation
When reading solutions to problems, the reader is often left to wonder ”how
would someone go about solving that”. The solution makes sense, but to
readers that attempted the problems themselves, they are left to wonder.
Becauseofthis, formorechallengingproblems, Iprovidetheproblemsolving
steps I took when solving the problem. The reader may choose to skip the
motivatedsolutioniftheywish, asthefullyrigoroussolutionisalsoincluded,
however, I recommend taking a look especially if the reader wants to fully
understand the problem solving strategies illustrated above.
0.3 Terminology and definitions
To make sure we are all caught up on the same page, we begin this book
with some basic terminology and definitions. If you are unfamiliar with any
of the stuff below, we suggest you visit these topics in further detail as they
are assumed knowledge throughout the text. Later in this text, we revisit
all of these topics
0.3.1 Sets
• The real numbers R are any positive or negative number including 0,
√
such as 1,1+ 2,−π,e, etc
• The integers Z are defined as the integers:
{··· ,−3,−2,−1,0,1,2,3,···}
Z+ denotes the positive integers {1,2,3,···} while Z− denotes the
negative integers {··· ,−3,−2,−1}.
• The natural numbers N are defined as the positive integers or Z+. The
natural numbers including 0 are defined as N0.
• The rational numbers Q are defined as the ratio of two integers, such
as 2 or 17.
3 29
• The complex numbers C are defined as a+bi where a,b ∈ R.
• The set of polynomials with integer coefficients is defined as Z[x]. For
example, x3 −19x18 +1 ∈ Z[x], however, x2 −πx (cid:54)∈ Z[x].
Olympiad Number Theory Justin Stevens Page 7
• The set of polynomials with rational coefficients is defined as Q[x]. For
example, x2 − 1x ∈ Q[x].
2
0.3.2 Divisibility
We say that a divides b if b is an integer. For example, 4 divides 12 since
a
12 = 3, however, 4 does not divide 13 since 13 = 3.25. We write a divides
4 4
b as a | b. In this, b is also a multiple of a. In this text, when we say
”divisors” we assume positive divisors. When considering divisors of
√
natural n, we only have to work up to n. The reason for this is if n = ab
√
then we obviously cannot have a,b > n.
0.3.3 Induction
Induction is a proof technique used often in math. As it can be tricky to
those who are understanding it for the first time, we begin with an example
problem and explain the method of induction as we solve this problem.
Example 0.3.1. Show that for all natural n, 1+2+3+···+n = n(n+1).
2
Solution. In induction, we first off have to show a statement holds for a base
case, typically n = 1. In this case,
1×2
1 =
2
so the base case holds. We now show that if the problem statement holds
for n = k, then it holds for n = k+1. This essentially sets off a chain, where
we have
n = 1 =⇒ n = 2 =⇒ n = 3 =⇒ ···
The reason we have to show the base case is because it is the offseter of
the chain. Because of this reason, we can think of induction as a chain of
dominoes. Once we knock down the first domino, and show that hitting
a domino will knock down the proceeding domino, we know all the domi-
noes will be knocked down. Our inductive hypothesis is that the problem
statement holds for n = k, or henceforth
k(k +1)
1+2+3+···+k =
2
Olympiad Number Theory Justin Stevens Page 8
We now need to show that it holds for n = k +1 or we need to show that
1+2+3+···+(k +1) = (k+1)(k+2). Now, notice that
2
1+2+3+···+(k +1) = (1+2+3+···+k)+k +1
k(k +1) (k +1)(k +2)
= +k +1 =
2 2
As desired. Therefore, we have completed our induction.
Theorem 0.3.1 (Induction). Let’s say we have a statement P(n) that
we wish to show holds for all natural n. It is sufficient to show the
statement holds for n = 1 and that P(k) =⇒ P(k +1) for natural k,
then the statement is true for all natural n.
NOTE: The statement P(k) =⇒ P(k +1) means that if P(k) is
true (meaning the statement holds for n = k), then P(k + 1) is true.
This is used for ease of communication.
Proof. We use the well ordering principle. The well ordering principle
states that every set has a smallest element. In this case, assume that
for sake of contradiction, P(n) is not true for some n = x ∈ S. Let y
be the smallest element of S and since y > 1 (from us showing the base
case), we have y − 1 ≥ 1. Therefore P(y − 1) is true. We also know that
P(k) =⇒ P(k +1). Therefore, P(y −1) =⇒ P(y), contradiction.
Theorem 0.3.2 (Strong induction). For a statement P(n) that we wish
to show holds for all natural n, it is sufficient to show a base case (n = 1)
and that if P(n) is true for n ∈ {1,2,3,··· ,k} it implies P(k + 1) is
true.
Proof. The proof is identical to the above proof verbatum.
It is assumed the reader has prior knowledge of induction, so this should
be review. If induction is still confusing at this point, we recommend the
reader reads up on induction as it is vital for this text.
0.3.4 Other
This section includes formulas it is assumed the reader knows.
Olympiad Number Theory Justin Stevens Page 9
Theorem 0.3.3 (Binomial Theorem). For n natural,
n (cid:18) (cid:19)
(cid:88) n
(x+y)n = xiyn−i
i
i=0
Definition 0.3.1. The greatest common divisor of two integers a,b is de-
noted gcd(a,b). For example, gcd(4,12) = 4.
Definition 0.3.2. The least common multiple of two integers a,b is denoted
lcm[a,b]. For example lcm[4,15] = 60
Definition 0.3.3. We define
a ≡ b (mod c) ⇐⇒ c | a−b
For example 13 ≡ 1 (mod 4) since 4 | 12.
Definition 0.3.4. A number is said to be prime if the only divisors of the
number are 1 and itself. For example, 5 is prime since 1 | 5,2 (cid:45) 5,3 (cid:45) 5,4 (cid:45)
5,5 | 5. On the other hand, 6 is not prime as 1,2,3,6 | 6. A number is said
to be composite if n can be expressed in the form ab for a,b being positive
integers greater than 1. 1 is said to be neither prime nor composite.
Definition 0.3.5. −→←− means ”contradiction”
Definition 0.3.6. The degree of a polynomial is defined as the highest
exponentinitsexpansion. Forexample, deg(x3−2x2+1) = 3anddeg(−x2+
x4 −1) = 4.
1
Divisibility: The building blocks of
number theory
In this chapter we explore the building blocks behind number theory: di-
visibility. We will explore algorithms and other vital theorems for number
theory, along with a few problems they apply too. While this section is
smaller in length then other sections, it is the building blocks and founda-
tions of all number theory. These proofs can be repeated in similar vein for
unique factorization domains, something we will not get into in this paper.
I apologize in advance for the number of induction posts, however, when
we are laying down the ground blocks and don’t have many tools to use, we
must use induction in many cases to prove theorems (or we can just ”assume
they’re true” which I don’t like to do).
1.1 Euclidean Algorithm
Before we get into the Euclidean Algorithm, we must first introduce the
division algorithm which is vital for use in the Euclidean Algorithm.
Theorem 1.1.1. The division algorithm states for every natural pair
a,b with a > b, one can find exactly one distinct pair of quotient and
remainder (q and r respectively) such that
a = bq +r 0 ≤ r < b
Proof. We have to show every number can be represented under the division
algorithm, and that each representation is distinct. Assume for sake of
10
Description:In this text, we attack many hard math problems using simple methods Use problem solving techniques found throughout this book. Many .. gcd(am-n − 1,an − 1) = agcd(m-n,n) − 1 = agcd(m,n) − 1 Example 2.3.9 (AoPS). [11] Art of Problem Solving 2012-2013 WOOT Diophantine Equations.