You are on page 1of 114

QED Monthly Volume 1 Alexander Katz Page 1

QED Monthly Volume 1

Lead Author Co-author and


Alexander Katz LATEXManager
Justin Stevens
Contents

1 Algebra 1 3

2 Combinatorics 1 12

3 Geometry 1 21

4 Number Theory 1 30

5 Algebra 2 38

6 Combinatorics 2 49

7 Geometry 2 62

8 Number Theory 2 72

9 Algebra 3 80

10 Combinatorics 3 88

11 Geometry 3 96

12 Number Theory 3 106

13 Credits and Acknowledgements: 113

2
1

Algebra 1

We are all familiar with basic computation, such as 2 + 2 = 4, 2 · 7 = 14, and


9 ÷ 3 = 3. Most are also familiar with basic “math puzzles”, such as “what
number, when added to 2, gives 4?” and “9 people are at a train station
such that 3 people go onto each train, and each train has an equal number
of people. How many trains are there?”. If you’ve heard of one of these
puzzles, then congratulations - you know what Algebra is!
Loosely speaking, Algebra is mostly concerned in the manipulations of
variables. A variable is a number that is not (yet!) determined, usually
denoted by a letter. For example, the two puzzles above can be rewritten in
equation form as 2 + x = 4 and 9 ÷ x = 3, respectively, meaning that the 2
sides of the equation are equal. Essentially, we replace the “what number” or
the “how many” in these puzzles with an appropriate relation. In these cases,
we wish to solve for x, or find the unknown variable (or later on, variables).
Although school math education has promoted the view that Algebra is
about memorizing complicated unnatural ideas, in reality Algebra actually
is a quite natural extension of basic computation. To truly understand
Algebra, it is vitally important that you have a full understanding of the
concept of an equation, rather than just knowing it is represented by the
“=” sign. In an equation, the 2 sides of the equation are representative of
the same (often indeterminate) number. This means that when we refer to
one expression, we can just as well refer to the other expression (this key
point comes up again later on).
Fortunately, manipulating these types of one-variable equations is usually
simple. The key point to remember is that an equation can be likened to a
balance scale. If one “thing” is added to one side, the same thing must be
added to the other to ensure balance. Bringing this analogy back into math

3
QED Monthly Volume 1 Alexander Katz Page 4

terms, an operation on one side of the equation must be coupled with the
same operation on the other side. An operation can be essentially anything,
provided we approach with caution. We mostly use the basic operations,
e.g. addition, subtraction, multiplication, and division, below.
In the above examples, as with many single-variable equations, we wish
to isolate x, or get an equation of the form

x = some number

In other words, we want one side of the equation to only have x. We can
then conclude that x is that something. This sounds a little daunting when
we talk about it in words, but in reality the concept is simple. For example,
let’s take the equation from before:

x+2=4
If we perform an operation on both sides, we know the equation still
holds. The only problem is knowing which operation to perform. In this
case, we subtract two from both sides:

x + 2 = 4 =⇒ x + 2 − 2 = 4 − 2 =⇒ x = 2
The second puzzle is only slightly more complex.

9 ÷ x = 3 =⇒ 9 ÷ x · x = 3 · x =⇒ 9 = 3 · x
where the operation we used was multiplying by x. We can now finish by
dividing both sides by three (another operation):

9 = 3 · x =⇒ 9 ÷ 3 = 3 · x ÷ 3 =⇒ 3 = x
In these simple examples, it is likely that you simply “saw” the answer, or
determined it through intuition. While this is all well and good, and number
sense plays an important part in math, if the question was something scarier
such as “13 times a number, when added to 92, is equal to 118. Find the
number.”, then you likely wouldn’t happen to know the answer offhand. In
these situations, the above tools are golden.
In the above examples, it may seem like magic that we happened to know
exactly what operations to use! In reality, we chose our operation to be the
inverse of a different operation. An inverse essentially means “undoing” the
previous operation. For example, addition and subtraction, multiplication
and division, flipping a light switch on and off, etc. are all examples of
QED Monthly Volume 1 Alexander Katz Page 5

inverses (“opposite”, while not an exact synonym in the mathematical sense,


is a perfectly good substitute for now). We choose inverses because of our
desire to “isolate” x, and inverses “clear out” the “excess” parts.
For example, if we have the ”scary” equation above (we use the shorthand
13x to describe 13 · x):
13x + 92 = 118
First we need to determine what this equation means. First we are taking
a number x. We then multiply this number by 13 (our first operation), then
add 92 to this new number (our second operation), and the result is 118.
To isolate x, we need to utilize the inverses of these operations. Recall that
addition and subtraction are inverses, as are multiplication and division.
Given this knowledge, the first thing we do is subtract 92, the inverse of
adding 92, to get
13x + 92 − 92 = 118 − 92
=⇒ 13x = 26
we now divide by 13, the inverse of multiplying by 13, to get

13x ÷ 13 = 26 ÷ 2

=⇒ x = 2
solving the problem. Our knowledge of inverses easily defanged this suppos-
edly “scary” problem.
Up until now we’ve dealt with single-variable equations. In other words,
our equation only had one variable - x. However, this concept of isolating
the variable often appears in more complex forms. For example, if we have
the following problem:

Example 1.0.1. The difference between 2 numbers is 6, and the sum


of the 2 numbers is 12. Find the larger number.

We now have 2 unknowns rather than 1. If we try to go with our tech-


nique of using inverses, we’ll just be going around in circles. Rather than
panic, we simply assign a different letter to each variable, and try to find a
way to solve for both. If we let the numbers be x and y, we can write the
two equations that hold simulataneously, or at the same time:

x + y = 12
QED Monthly Volume 1 Alexander Katz Page 6

x−y =6
We call this a system of equations, because there is more than 1 equa-
tion that simultaneously holds. Because our earlier technique of simply find-
ing the appropriate inverse merely results in us travelling in circles, we need
to find a way to use both equations at the same time. Our 2 main techniques
for solving such systems are known as substitution and elimination. We
illustrate both.
Solution. (Substitution) Since we have x−y = 6, we can add y to both sides
(note the inverse!) to get
x−y+y =6+y
x=y+6
Now, since we know that x and y + 6 represent the same number (make sure
you understand why this is true. Keep in mind that an equation simply
means that the 2 sides are equal, or represent the same thing), we can
replace (or substitute) x in the first equation with y + 6 to get

x + y = 12
(y + 6) + y = 12
2y + 6 = 12
but now we have a single-variable equation, just as before! We can solve
this using our previously learned techniques to get

2y + 6 − 6 = 12 − 6
2y = 6
2y ÷ 2 = 6 ÷ 2
y=3
Now that we know y, finding x is simply a matter of plugging the values
back in. Note that again we use substitution to replace y with 3.
x + y = 12
x + 3 = 12
x=9
So the larger number is 9. (What would have happened if we plugged y
into the second equation instead? Would we get the same answer?)
QED Monthly Volume 1 Alexander Katz Page 7

Elimination works in a very similar manner. Since we know that x+y =


12 and x − y = 6, we can perform the operation of adding the same thing
to both sides as follows:

(x + y) + (x − y) = 12 + 6

Note that we added x − y to the left hand side, while we added 6 to the right
hand side. This may seem invalid at first glance, but because we know these
quantities are equal we can do this (recall the balance scale analogy. If we
add a weight to one side, we can add a different shaped weight to the other
side as long as it has the same weight as the first). Make sure you have a
solid understanding of why this is valid before you move on. A fundamental
understanding of the relationship between equations is essential.
We can then write

x + y + x − y = 12 + 6

2x = 18
x=9
and then proceed as above.
This gives us a general technique for solving such 2-variable systems. We
want to make the coefficients, or the number a variable is multiplied by,
of one variable cancel out. For example, given the equations

2x + 3y = 7

x + 2y = 3
The first thing we do is to select a variable to eliminate. In this solution
we choose y. To eliminate y, we need to make the coefficients of y terms in
both equations equal. That way, when we subtract the equations, this term
will cancel out.
To do this, we can strategically multiply the first equation by 2 and the
2nd equation by 3 (note that these are both operations) to get

4x + 6y = 14
3x + 6y = 9
and then subtract the equations to get

4x + 6y − 3x − 6y = 14 − 9
QED Monthly Volume 1 Alexander Katz Page 8

x=5
which we can then plug in to solve for y using either equation:

2x + 3y = 7
2 · 5 + 3y = 7
10 + 3y = 7
10 + 3y − 10 = 7 − 10
3y = −3
3y ÷ 3 = −3 ÷ 3
y = −1
We leave it as a suggested exercise to the reader to examine the result if
we instead attempt to eliminate x.
Up until now, we have focused on the positive integers, sometimes
called whole numbers. These are the numbers you’re probably most fa-
miliar with: 1, 2, 3, and so on. But there are also two other important classes
of numbers: the negative integers (which were featured in the last prob-
lem) and the rational numbers (more commonly known as fractions).
A negative integer is a bit harder to imagine than a positive one - what
exactly does the number −1 (negative one) mean? One common analogy is
to consider a large building. When you enter the building on the ground,
and then head to the basement, you are at a floor number that is below
zero, or negative. So the number −1 means 1 less than zero. Fractions can
be defined as “parts”. For example, if you cut a pizza into two identical
pieces, each piece is 21 , or one-half, the size of the pizza. Each fraction has a
numerator, or the number of pieces you have, and a denominator, or the
total number of pieces. So the fraction 43 means you have 3 of the 4 pieces.
Note that negative numbers are the inverse of their positive. The curious
reader may note that subtraction looks a lot like a negative number. Indeed,
this is exactly what subtraction is! Subtraction is actually adding a negative
number. Does this help you see why addition and subtraction are inverses?
Fractions are simply parts of a number. For example, half of a pizza is
represented by the fraction 21 . The top number, the numerator represents
the number of pieces you have, while the bottom number, the denominator
represents the total number of pieces. Note that if you have half a pizza,
you have 1 of the 2 pieces.
QED Monthly Volume 1 Alexander Katz Page 9

Equivalent fractions are fractions that can be “simplified” into a smaller


form. For example, if you have 6 of the 8 pieces of pizza, you may notice
that this is the same thing as having 3 of the 4 pieces of pizza (to see this,
imagine ”un-cutting” the pizza so that 2 pieces fit together). A “simplified
fraction” is a fraction that cannot be simplified into a smaller form.
Note that fractions can be bigger than 1 (think of your half of the pizza.
If you had 3 of them, you definitely have more than a whole pizza!), or
even negative (think of being in an elevator travelling down. You aren’t all
the way to the “negative” floor yet, but you’re not at 0 either. So you’re
somewhere in between. Negative fractions below -1 behave the same way as
fractions greater than 1 - imagine being between floors -1 and -2).
To see why these are relevant to equations, try working on exercises 2
and 5 with random numbers.

Summary:
We defined the basics of algebra, including the concepts of variables and
inverses, as well as our equation-solving tools of isolation, elimination, and
substitution. We saw not only how to solve single-variable equations, which
the reader has likely already had experience with without even knowing it
(for example, making change is a simple example that everyone is likely
familiar with), but also the more complex system of equations. We also
briefly touched on the concepts of fractions and negative numbers, with the
expectation that only a short review is required.

What follows are a series of exercises, typically 10, designed to enhance


the student’s understanding of the concepts illustrated. Many of the ex-
ercises are intentionally vague (e.g. what do you notice...), expecting that
the reader will derive the maximum benefit through their own struggles and
exploration.

Exercises:
1. Solve each of the following equations for x:
• 2x + 9 = 15
• 8x + 7 = 23
• 9x + 1 = 10
2. Pick any 3 random numbers (or ask a friend, or generate them ran-
domly, etc.), and use them to fill in the blanks: x + = solve this
QED Monthly Volume 1 Alexander Katz Page 10

equation for x. Try different combinations of numbers. Play around


with the equation.

3. In the general form ax + b = c, solve the equation for x in terms of


a, b and c. In other words, reduce the equation to

x = something

where the “something” is an expression using a, b and c. Does this


fit with the combinations of numbers you tried above?

4. Solve the following equations for x and y:

• 3x + 2y = 9, x + 6y = 3
• 2x − y = 11, x + 3y = 9
• 7x + y = 10, 8x − y = 5

5. Pick any 6 random numbers (or ask a friend), and use them to fill in
the blanks:
x+ y =
x+ y =
solve these equations for x, y. Try different combinations of numbers.
Play around with the equation.

6. Try both the substitution and the elimination technique. Which you do
find easier? Does it depend on the size of the numbers? Try eliminating
x, then solving for y, then going back to the same problem eliminating
y first then solving for x. Do you get the same answer? Which way is
easier?

7. The astute reader will notice that some combinations of numbers may
result in an impossible equation, such as 0 = 1. For example, try
solving
2x + 3y = 4,
4x + 6y = 7
for x and y. What does this tell you about x and y?

8. The same reader may also notice that some combinations of numbers
lead to two equations that are always satisfied at the same time. What
does this tell you about x and y?
QED Monthly Volume 1 Alexander Katz Page 11

9. For questions 7 and 8, try to explain in words (using a conceptual,


rather than a computational, argument) the results you found about
x and y.

10. Solve the following equations for the three variables x, y, and z:

x + y + 3z = 8

7x + 2y − 4z = 1
2x − 3y + 5z = 9
(This is a difficult exercise in relation to the article, but using the
techniques above should be enough to approach the problem).
2

Combinatorics 1

Combinatorics is one of the richest, most analyzed, and practical mathemat-


ical subjects, yet inexplicibly it is almost completely ignored in the school
curriculum. As a result, many students are not aware of what combinatorics
is, let alone have experience with it.
Combinatorics is a branch of math concerning “countable structures”.
This may seem like a scary definition, but for the time being we can think
of it as “counting things”. Great! Counting isn’t too hard! 1, 2, 3, ...
Unfortunately, things aren’t usually quite that simple (though as we will
see, this is far from trivial). Fortunately, combinatorics doesn’t have too
many specific definitions, and the necessary ones can be described as they
come up. We do, however, need to explain “. . .”, which we see often. Almost
always, “. . .” simply means that the pattern seen in some form (usually a
list of numbers, or a list of numbers under some operation such as addi-
tion) continues on. This is simply a convenient shorthand, in the same
way that the symbol × is a shorthand for repeated addition. For example,
1, 2, 3, . . . , 100, refers to the numbers 1 to 100, and 1 + 2 + 3 + . . . + 100 refers
to the sum of the first 100 positive integers. We begin with a simple example:

Example 2.0.2. How many numbers are in the list 1, 2, 3, ..., 100?

Solution. This one isn’t too hard. Since we’re counting the numbers from 1
to 100, there must be exactly 100 numbers in the list.
An important method in combinatorics is known as a bijection, or one-
to-one correspondence. This scary-looking term illustrates a simple con-
cept. Each element in one list corresponds to exactly one element in another

12
QED Monthly Volume 1 Alexander Katz Page 13

list. For example, we have a bijection between 1, 2, 3 and 2, 4, 6 - we just


double each of the first terms.
So why are bijections important for these types of problems? Because
they don’t change the number of numbers in the list. Therefore, we can
operate on a list in much the same way that we would an equation. We just
have to make sure to do the same operation on each number! We see a basic
example of this below:

Example 2.0.3. How many numbers are in the list 3, 4, 5, . . . , 100?


Solution. We can subtract 2 from each number, so the number of numbers
in the list 3, 4, 5, . . . , 100 is the same as the number of numbers in the list
1, 2, 3, . . . , 98. But these are just the numbers from 1 to 98, so there are 98
numbers.
We are not, of course, limited only to addition. We can use many differ-
ent types of operations, such as multiplication:

Example 2.0.4. How many numbers are in the list 3, 6, 9, . . . , 300?


Solution. Again, we just need to do the same operation on each number.
Thus we can divide each term by 3 to get the list 1, 2, . . . , 100. We did this
already - there’s 100 numbers.
Sometimes a single operation isn’t enough to finish a problem directly.
In this case, we can combine multiple operations - as long as there is still a
bijection:

Example 2.0.5. How many numbers are in the list 5, 8, 11, . . . , 305?
Solution. This one is a bit trickier. First we note the general form of the
numbers, which is 3k + 2 for some number k (this is essentially the same as
noticing that the numbers increase by 3 each time). If we want to make this
k, then we have to combine 2 inverses (read the algebra article!). We first
subtract 2 to get the list 3, 6, 9, . . . , 303, and then divide by 3 to get the list
1, 2, 3, . . . , 101. These are just the numbers from 1 to 101, so there are 101
numbers in this list. Because we didn’t change the number of numbers from
each step, there are also 101 numbers in our original list.
QED Monthly Volume 1 Alexander Katz Page 14

Now we know how to deal with lists of numbers. We simply need to find
a general form, then transform it using our algebra skills. In fact, with a bit
more skill, we can generalize this for integers:

Example 2.0.6. How many numbers are in the list a, a+1, a+2, . . . , b?

Solution. Ew. First we have to figure out what the question is even asking.
The smallest number is a, and we increase by 1 each time until we reach b.
So what we really want is the number of numbers between a and b, inclusive
(which simply means we include a and b in our count). We’d like to make
this list something like 1, 2, . . . like we did before, so we want to make a 1.
But we know how to do this - we can subtract the number a − 1 from each
term to get the list 1, 2, . . . , b − a + 1. But these are just the numbers from
1 to b − a + 1, so there are b − a + 1 numbers in our original list.
This formula looks a bit contrived at first glance, and it’s an excellent
idea to try checking it on your own if for no other reason than to convince
yourself of its truth. As a starting point, try the numbers in P1 and P2
(a = 1, b = 100 and a = 3, b = 100), to see if we come up with the same
answer.
The important point to take away from this problem is not the formula.
Any monkey can put numbers into a formula and return an answer. You are
not a monkey. It is much more important to understand where the formula
has come from (the how), and even more important to understand how we
came up with this (the why). In this case, we tried easier cases (always
an excellent idea), went progressively up to slightly more difficult cases,
observed a general pattern, and generalized this into a formula. This method
will get you through many difficult problems (not just in combinatorics).
To illustrate an obvious pitfall, if you just memorized the formula with-
out fully understanding how we derived it, you would be very liable to make
the following mistake:

Example 2.0.7. How many numbers are in the list 3, 6, 9, . . . , 300?

Solution. (FAULTY LOGIC): The first number in the list is 3, so a = 3


in our formula. The last number is 300, so we have b = 300. Therefore there
are b − a + 1 = 300 − 3 + 1 = 298 numbers in our list.
QED Monthly Volume 1 Alexander Katz Page 15

What happened here? In our 3rd problem we already established that


there are 100 numbers in this list - not 298! Is there something wrong with
our formula?
Of course, the answer is no. Our formula is fine, but we’re using it in
the wrong place. Recall the form of the list for which our formula works -
a, a + 1, a + 2, . . . , b. In particular, the numbers increase by 1 every term.
Is this the case in the list 3, 6, 9, . . . , 300? No. Thus we’re trying to use a
formula in the wrong place, explaining our error.
Many difficult problems use these ideas of counting numbers in lists (and
especially bijections) without really seeming to. The reason for this is that
once you reach the level where you’re working on such difficult problems,
such a method of counting lists is so internalized that it’s “obvious” and
not important to write out. This is not unique to combinatorics - high level
problems in every area utilize fundamental elementary principles without
explicity stating them.
We can move on to slightly more difficult problems now. Lists are, of
course, not always of only integers. For example, we can also have lists con-
taining fractions.

Example 2.0.8. How many numbers are in the list 31 , 32 , 1, . . . , 29


3
?

Solution. Instead of panicking at the sight of fractions, we keep our head


and follow the same method above. We’d like to make the first term 1
somehow, so a good candidate would be multiplying by 3. Combine this
with the fact that the denominators of the fractions are all 3, and we have
a solid choice. Indeed, multiplying by 3 gives the list 1, 2, 3, . . . , 29, which
has 29 numbers.

Example 2.0.9. How many numbers are in the list 61 , 21 , 56 , . . . , 41


6
?

Solution. We notice that the numbers increase each time by 31 , so we likely


want to multiply by 3. Unfortunately doing so directly doesn’t help very
much, so we have to be a bit more clever. Remember that we want the
first term to be 1. Using our algebra skills, we can recall that if we want a
number multiplied by 3 to be 1, then that number is 13 . Thus we need a way
to transform 61 into 31 , which can be done by adding 16 to each term. Doing
QED Monthly Volume 1 Alexander Katz Page 16

this, we get the list 31 , 23 , 1, . . . , 7. Now multiplying by 3 looks a lot more


promising, and indeed we get the list 1, 2, . . . , 21, which has 21 numbers.
Warning: always make sure that you are using bijections
when manipulating lists!
In each of the previous problems, we used simple operations such as addi-
tion, subtraction, multiplication, and division. But if we want to tackle more
complex problems that don’t involve simply manipulating lists of numbers,
we always have to be very careful in making sure we are using bijections.
Recall that a bijection means the same thing as a one-to-one correspon-
dence, or that every element in one list “matches up” with another element
in another list. We won’t explore these too deeply here, but this is a very
important concept to understand.

This technique is useful for far more than just happening to know how
many numbers are in a list. The next problem builds up to an important
result.

Example 2.0.10. How many numbers are in the list 5, 7, 9, . . . , 99?

Solution. Now we’re back on home ground. We note that each term is of
the form 2k + 3, so we perform both inverses. We subtract each number by
3 and then divide by 2 (recall that we want the first term to be 1), to get
1, 2, . . . , 48, in which there are 48 numbers.
Combining this with problem 2.0.4, we start to see a general pattern for
arithmetic sequences. We first find the common difference, which we know
we want to divide by to create a new sequence with common difference 1
(e.g. consecutive numbers). But we also want the first number to be 1. Now
we’re ready to tackle arithmetic sequences. If we let a be the first term and
d be the common difference, we get an arithmetic sequence.

Example 2.0.11. What is the last number in the arithmetic sequence


with n terms?

Solution. Now we’re lost again. We don’t know anything about getting a
list with n terms - we only know how to find the number of numbers in a
list! Think about how we might approach this problem for moment. Recall
QED Monthly Volume 1 Alexander Katz Page 17

that bijections work both ways! Because of this, we can work backwards.
We already know that there are n terms in the list 1, 2, 3, . . . , n. These are
consecutive numbers, so the common difference of this arithmetic sequence
is 1. We want it to be d, so the first thing we do is multiply the sequence by
d to get the list d, 2d, 3d, . . . , nd. We want the first term to be a, so we add
a − d to get the list a, a + d, a + 2d, . . . , a + (n − 1)d. Thus, the last term is
a + (n − 1)d.
This is great, but it doesn’t seem to be too useful. Why is it helpful to
know the last term of a sequence? Well, if we slightly modify our argument,
we can find the kth term of a sequence - not just the last one.

Example 2.0.12. What is the 1000th term in the infinite sequence


4, 7, 10, 13, . . .?

Solution. From problem 2.0.11, we know that the last number number in an
arithmetic sequence with 1000 terms, first term a, and common difference d
is a + (1000 − 1)d = a + 999d. But the last number in an arithmetic sequence
with 1000 terms is exactly the same thing as the 1000th term in this infinite
sequence! Thus the 1000th term is 4 + 999 · 3 = 3001.
It is unlikely that this is an entirely new concept for most of you. Many
have seen this formula before, and proving it is not exactly an incredibly
difficult exercise. But the point of the articles is not to simply introduce
formulas. Instead it is vitally important that you understand the concepts
behind the formulas. When working on difficult problems, you’ll often find
situations that are similar to ones you know, but in which your formulas are
not directly helpful. When this happens, you need to fall back onto your un-
derstanding of the topic to transform the problem into one you know how to
solve. We saw this in an elementary form in many of of our problems above.
Using only the information that there are n numbers in the list 1, 2, 3, . . . , n,
we worked all the way up to dealing with arithmetic sequences by transform-
ing progressively more difficult problems into ones we knew have to solve.

Summary:
We discussed how to find the number of numbers in a list. While this
seems like a trivial and unimportant exercise, We found that not only is it
not a simple pursuit, the ideas learned in tackling these problems are useful
in a wide array of concepts. We also derived two formulas for the sum of
QED Monthly Volume 1 Alexander Katz Page 18

an arithmetic sequence, using our knowledge of lists to help slightly reduce


the information needed to solve. By doing this we explore an area that is
partially combinatorics, partially algebra, and even some number theory.

What follows are a series of exercises, typically 10, designed to enhance


the student’s understanding of the concepts illustrated. Many of the exer-
cises are intentionally vague (e.g. ”What do you notice...”), expecting that
the reader will derive the maximum benefit through their own struggles and
exploration.

Exercises:
1. Find the number of elements in each of the following lists:
• 1, 2, 3, . . . , 2013
• 15, 34, 53, . . . 1915
1 5 1 1
• , , 1 , 1 , . . . , 30
2 6 6 2
• (*) 9, 16, 25, 36, . . . , 4000000
2. Consider the two sequences below:
• Sequence A: 1, 4, 7, 10, . . . , 2013
• Sequence B: 2, 6, 10, 14, . . . , 2014
How many numbers are in both sequence A and sequence B? For ex-
ample, 10 is one of these numbers.
3. Compute the following sums (of arithmetic series):
• 3+5+7
• 8+10+12+14+16
• 18+25+32+39+46
1 1 3 5
• + + +1+
4 2 4 4
What do you notice about these sums?
4. The sums above can be described differently by giving the starting
term, the common difference, and the number of terms. For exam-
ple, the third sum can be described by ”starting term 18, common
difference 7, 5 terms”. In terms of a and d, find the following sums:
QED Monthly Volume 1 Alexander Katz Page 19

• Starting term a, common difference d, 3 terms


• Starting term a, common difference d, 5 terms
• Starting term a, common difference d, 4 terms
• Starting term a, common difference d, 6 terms

What do these sums look like?

5. The average, or mean, of a list is the sum of the all the numbers in
the list divided by the number of terms. For example, the average of
the list 4, 7, 1 is 4, because 1+4+7
3
= 4.
The median of a list is defined as follows:

• If there are an odd number of terms in the list, the median is the
middle term when the list is sorted.
• If there are an even number of terms in the list, the median is the
average of the 2 middle terms when the list is sorted.

For example, the median of the list 4, 9, 1 is 4, because when sorted the
list becomes 1, 4, 9 making the middle term 4. Similarly, the median
of the list 4, 6, 1, 7 is 5, because when sorted the list becomes 1, 4, 6, 7
and the average of 4 and 6 is 5.
Compute the average and the median for the following lists:

• 1, 8, 3, 10
• 3, 5, 7, 9, 11
• 9, 17, 26, 35
• Starting term a, common difference d, 5 terms
• Starting term a, common difference d, 6 terms

What do you notice?

6. Prove that in an arithmetic sequence of any length, the mean and the
median are equal. Furthermore, let a and b be the first and last terms
of the sequence respectively. Show that the median is equal to a+b2
.

7. In an arithmetic sequence with starting term a, common difference d,


and n terms, compute the sum of the all the numbers in the sequence
in terms of a, d, and n.
QED Monthly Volume 1 Alexander Katz Page 20

8. Verify your formula with the well-known identity 1 + 2 + 3 + . . . + n =


n(n+1)
2
, as well as the also important 1 + 3 + 5 + . . . + (2n − 1) = n2
and 2 + 4 + 6 + . . . + 2n = n(n + 1).

9. Define a “special” list to be one for which every element is distinct


(better known as a “set”). If we have a list, we make it a special list
by “trimming”, or removing all the duplicates. For example, the list 1,
2, 2, 3, 3, 3, 4, 4, 4, 4 becomes the special list 1, 2, 3, 4 after trimming.
Given a special list, come up with an operation that is not a bijection
after trimming. In other words, find something to do to each element
of your special list such that the resulting list, after being trimmed,
has a different number of elements. You can of course do this in
many ways, but try to stay true to the spirit of the problem. In other
words defining a function as f (x) = x for x 6= 1 and f (1) = 2 is
technically correct (since the special list 1,2 becomes the special list 2
after trimming), but not helpful.

10. A geometric sequence is a sequence where the ratio between con-


secutive terms is constant. For example, 1, 2, 4, 8, 16 is a geometric
sequence because the ratio between consecutive terms is always 2. Sim-
ilarly, 16, -8, 4, -2, 1 is a geometric sequence because the ratio between
successive terms is − 21 .
How many numbers are in the list 1, 2, 4, 8, . . . , 65536? What about the
1
list 16, −8, 4, −2, . . . , 256 ? Come up with a generalization, and try to
prove it (this is quite difficult to do rigorously. At least come up with
an argument to convince yourself of the truth of your generalization).
3

Geometry 1

Geometry, loosely speaking, is the study of space. But be sure not to confuse
this with Astronomy - when we refer to space, we mean in a mathematical
sense! Geometry was first well-defined by Euclid, leading to the term Eu-
clidean Geometry. In everyday use, these two terms are equivalent, even
though there do exist other forms of Geometry.
Unlike the other subjects (Algebra, Combinatorics, Number Theory),
Geometry is very much its own branch. Without some basic experience in
Geometry, one is unlikely to be familiar with all of the basic definitions.
However, Geometry is one of the most practical branches of mathematics,
with many applications in everyday life (which perhaps explains why schools
have incorporated it into a standard math cirriculum). We reproduce the
most important definitions below:
The Cartesian Plane is a plane in 2 dimensions (in other words, you
can think of it as being a infinitely long flat surface) that extends infinitely
in every direction. Shapes with with you are probably most familiar, such as
triangles, squares, and so on are 2-dimensional, and can thus be represented
on the Cartesian plane.
A point, in a mathematical sense, is a location that takes up no space
and has no length. On a diagram, or a drawing to represent some space, we
represent a point by a small dot. We usually give a point a name, typically
a capital letter, and refer to the point by this letter.
Once we have 2 points on a plane, we can draw a line between them.
A line is uniquely defined by 2 points, and a line extends infinitely in both
directions. Just like a point, a line has no area, but it does have length. We
−→
denote a line through two points A and B by AB.
A ray is similar to a line, but it only extends in one direction rather

21
QED Monthly Volume 1 Alexander Katz Page 22

than the two a line does.

A line segment is a finite distance between 2 points. This is likely the


definition of line you are familiar with in everyday usage, but it is important
to differentiate the two. A line segment with endpoints A and B is denoted
by AB.

An angle is the rotational distance between 2 lines. This is typically


measured in degrees, where we define a circle to be 360 degrees. We denote
x degrees by x◦ . To avoid confusion, we always need to qualify degrees with
either the x◦ notation or by specifying ”degrees”. It is denoted by ∠ABC,
or sometimes by a lowercase letter (or even a greek letter such as α or θ). By
necessity B is the point where the lines intersect. Note this definition might
be lacking, as there are actually two possible angles that it could describe.
To rectify this, we usually refer only to the angle that is at most 180◦ .

Area, loosely defined, is the amount of space contained within a shape.


Based on this definition, it should now be obvious why points and lines have
no area - they take up no space.

We assume the reader is familiar with basic shapes such as triangles,


squares, circles, rectangles, and so on even if they are not sure of the rigorous
definitions of them. For now, a basic understanding of the concept will
suffice.

There are two more definitions we have to make: Parallel lines are 2
lines that never intersect. Perpendicular lines are two lines that intersect
at a 90◦ angle. All these definitions are shown in the picture below:
QED Monthly Volume 1 Alexander Katz Page 23

Angles form much of the basis of Geometry. Therefore, it is only natural


to examine them first. Recall that we define degrees such that there are 360◦
in a circle. Thus, a straight line, which is half a circle is 180◦ . Similarly,
half this straight line is 90◦ . We give this a special name as well - the right
angle.

Again, in the pictures above we are focusing only on one small part of the
plane. Make sure you understand that we are still referring to lines rather
than line segments.
This illustrates an important concept - the sum of 2 angles can be in-
QED Monthly Volume 1 Alexander Katz Page 24

terpreted as one larger angle. We see this in the first example below. For
whatever reason, typical schools first introduce the notion of ”proof” in Ge-
ometry classes. Often their first example is this:

Problem: Let two lines intersect. Prove that opposite (or vertical) angles
are equal.
Solution: In most Geometry problems, the first thing we do is draw a
diagram and assign labels:

We want to prove that ∠CEB = ∠AED. At first glance, it’s not obvious
how to rigorously prove this fact, but the result is indeed intuitively true.
We do know, however, that the angle of a straight line is 180◦ , so we can
write

∠CEB + ∠AEB = 180◦


and
∠AEB + ∠AED = 180◦
Equating these gives

∠CEB + ∠AEB = ∠AEB + ∠AED =⇒ ∠CEB = ∠AEB

as desired.

Finding equal angles is generally a very useful technique, even in diffi-


cult Geometry problems. But if we want to determine equal angles, simply
finding vertical angles is clearly not going to be sufficient in larger, more
QED Monthly Volume 1 Alexander Katz Page 25

complicated diagrams. Fortunately, we have other techniques as well. Par-


allel lines and angles go hand-in-hand, as shown in the next diagram. When
we have 2 parallel lines cut by a transversal (e.g. a line that intersects
both the parallel lines), the result is several equal angles:

All the angles marked with a “1” are equal, and all the angles marked
with a two are equal. In fact the converse of this statement holds as well
(with a small adjustment). If any two angles, either both marked with a
“1” or both marked with a “2”, are equal and not vertical angles, then
the two lines are parallel. Some sources have special names for these pairs:
alternate interior angles or alternate exterior angles respectively, but
these definitions are extremely redundant and quite useless if you understand
the concept (which is, of course, the important part).
This relationship between parallel lines and equal angles is an extremely
important one. For instance, you may be familiar with the following state-
ment:

Problem: Prove that the sum of the angles in a triangle is 180◦ .


Solution: At first glance, it is hardly obvious how to prove this fact. The
astute reader might recognize 180◦ as the number of degrees in a line, but
it is still not clear how to make use of this connection.
Since we were just discussing the relationship between parallel lines and
angles, it is no surprise that the solution here involves exactly this relation-
ship. Before looking at the diagram we give below, try to follow this solution
by yourself with pen and paper (or more ambitiously in your head). Let the
points of the triangle be A, B, and C, and draw a line through A that is
QED Monthly Volume 1 Alexander Katz Page 26

−−→
parallel to BC. Assume B is the first point clockwise from A, and pick some
points D, E on this line so that D is ”on the right” of A and E on the left.
−−→ −−→
Because DE is parallel to BC, we have

∠BAC + ∠ABC + ∠ACB = ∠BAC + ∠BAD + ∠CAE


But these three angles form a line, so

∠BAC + ∠ABC + ∠ACB = ∠BAC + ∠BAD + ∠CAE = 180◦

just like we wanted.

This method of adding parallel lines to make a problem more convenient


is hardly a rare one, but it often requires a great deal of insight and clever-
ness. We could say much more, but it is better to struggle through problems
on your own to internalize by trial-and-error what approaches to take and
when.
Before we hit the exercises, we’ll briefly mention the concept of congru-
ent triangles. Recognizing when two triangles are the same sounds like a
silly task, but in reality it is not so simple. Of course, if we know all of the
QED Monthly Volume 1 Alexander Katz Page 27

side lengths and angle measures, we know exactly what’s going on in with
the triangle. But oftentimes, we won’t have all this information. In the most
typical situation, we will only have a few pieces of information about two
different triangles, and we need to determine if they’re equal.
There are 5 major congruency tests, each with their own acronym. Mem-
orizing these shouldn’t be too necessary, as most of them are simply formal-
izations of intution.
• SAS congruence: If we have two triangles, and we are given that two of
their sides are equal and the angles between these sides are equal, then
the triangles are congruent. More formally, if we have two triangles
4ABC and 4DEF , and we are given that AB = DE, BC = EF,
and ∠ABC = ∠DEF , then the triangles are congruent.

• SSS congruence: If we have two triangles with equal side lengths, than
the triangles are congruent. In other words, using the same triangles
as above, if we are given AB = DE, BC = EF, CA = F D then the
triangles are congruent.

• ASA congruence: If two triangles have two pairs of equal angles and the
sides between them are equal, the triangles are congruent. Again, this
can be formally represented by ∠ABC = ∠DEF, ∠BCA = ∠EF D, BC =
EF .

• AAS congruence: If two triangles have two pairs of equal angles and
another pair of corresponding sides are equal, the triangles are congru-
ent. In other words, the BC = EF condition above can be replaced
by CA = F D or AB = DE.

• SSA NONCONGRUENCE: In general, knowing only that two pairs


of sides are equal and an angle that is not between them are equal
is NOT SUFFICIENT to conclude congruence. In formal terms, if
AB = DE, BC = EF , and ∠BCA = ∠EF D, the triangles are not
necessarily congruent.
The main exception is when the given angle is a right angle (e.g.
∠BCA = ∠EF D = 90◦ ), in which case the congruence holds.
So now we know to determine when triangles are congruent. Great,
so what? The reason why this is important is that if we can conclude
two triangles are congruent, then we automatically know everything about
those triangles are equal. For example, if we can prove two pairs of sides of
QED Monthly Volume 1 Alexander Katz Page 28

two triangles are equal and the angles between these sides are equal (SAS
congruence), we can conclude that the third pair of sides are equal as well
as the remaining two pairs of angles. This technique can quickly give us a
host of equal sides and angles, which is how most geometry problems are
solved.
What follows are a series of exercises, typically 10, designed to enhance
the student’s understanding of the concepts illustrated in the etxt. Many of
the exercises are intentionally vague (e.g. what do you notice...), expecting
that the reader will derive the maximum benefit through their own struggles
and exploration.

1. A triangle ABC is said to be isosceles if two of its angles are equal. If


one angle of an isosceles triangle is 58◦ , what is the sum of the possible
values for ∠ABC?

2. A arithmetic progression is a sequence of numbers such that the differ-


ences between any two consecutive numbers in the same. For example,
(1, 2, 3), (5, 7, 9, 11, 13), and (-2, -4, -6, -8) are all examples of arith-
metic progressions.
If the angles of a triangle are in arithmetic progression, and one of the
angles is 78◦ , what is the smallest angle in the triangle?

3. What is the angle formed by the hands of a clock at 11 : 10 AM?

4.
QED Monthly Volume 1 Alexander Katz Page 29

In the diagram above, you are given that AB is parallel to CD, AC is


parallel to BD, ∠CDE = 90◦ , and ∠IDB = 2 · ∠DEH. Furthermore,
∠CAB = 120◦ . Find ∠EDH.

5. Two points A and B lie on a line. Two other points, C and D, lie on a
line parallel to the first. Point E lies between the two lines such that
∠EBA = 30◦ and ∠ECD = 50◦ . Find ∠BEC.

6. In the first exercise, we mentioned that a triangle is isosceles if two of


its angles are equal. Show that if a triangle is isosceles, that two of its
sides must be equal. Also prove the converse - if two sides of a triangle
are equal, then the triangle is isosceles.

7. ABCD is a quadrilateral such that AD = CD and AB = CB. Show


that ∠ADB = ∠CDB, and show that AC ⊥ BD (e.g. AC is perpen-
dicular to BD).

8. You are likely familiar with what a circle is, but perhaps not with the
formal definition. A circle is all the points (known as a locus) that
are a fixed distance (the radius) away from the center of the circle.
In other words, if we pick any point on a circle, the distance from that
point to the center is always the same. A diameter of a circle is the
line segment between two points on the circle that passes through the
center. Let AB be a diameter of a circle, and let C be a point on the
circle. Prove that ∠ACB = 90◦ .

9. Let ABC be a triangle with points D and E lying on BC and AC


respectively. F is a point inside triangle ABC such that ∠CAF =
∠DAF and ∠CBF = ∠EBF . Show that

∠AEB + ∠ADB = 2∠AF B.

10. Because SSA does not imply congruence, there are two triangles ABC
such that AB = 13, BC = 10, and ∠BAC = 40◦ . Thus there are two
possible values for ∠ABC. Find the sum of these two values.
4

Number Theory 1

Number Theory is, loosely, the study of numbers (!). While this seems
simplistic at first glance, number theory is actually the richest field of math-
ematics.
We first run through some definitions. For at least the next few lessons,
we are working only over the integers, or whole numbers. Most of the time,
we refer to the positive integers, also called the natural numbers.

Exercise 1: Is the sum of any 2 integers also an integer? Is the difference?


The product? The quotient? Is the sum of any 2 natural numbers also a
natural number? Is the difference? The product? The quotient?

An integer is a divisor, or factor, of another integer if and only if the


quotient of the two numbers is an integer. For example, 6 is a divisor of 24
because 24 ÷ 6 = 4, an integer.

Definition: a is a divisor of b if and only if the quotient b ÷ a is an integer.

Similarly, an integer is a multiple of another integer if and only if there


exists a third integer such that the second and third numbers multiply to
the first. For example, 24 is a multiple of 6, for the same reason as above.
Obviously, if one number is a divisor of another, the second number is a
multiple of the first. This means that divisors and multiples are basically
the same thing.

Definition: a is a multiple of b if and only if the quotient a ÷ b is an integer.

30
QED Monthly Volume 1 Alexander Katz Page 31

Exercise 2: Does there exist some integer that is a divisor of every integer?
Does there exist some integer that is a multiple of every integer?

We use the notation a | b to say that a divides b. This means that there
exists some integer k such that ak = b. We use a - b to say that a does not
divide b. For example, 6 | 24, but 7 - 24 as we saw above. We can group all
of these together. Each of the following statements are equivalent:

• a is a divisor of b.

• a is a factor of b.

• a divides b.

• b is a multiple of a.

• b is divisible by a.

• a | b.

Divisibility of integers satisfies many of the same rules that computation


does. We go through some of the more common and useful ones, and illus-
trate common but deadly pitfalls.
If we have a | b and a | c, then this means there are some integers x and
y such that ax = b and ay = c. Adding these gives a(x + y) = b + c, while
subtracting them gives a(x − y) = b − c. In both cases, we see that there
exists some number that when multiplied with a gives b + c or b − c. Thus,
we can conclude that a | b + c and a | b − c.

Exercise 3: Use similar logic to prove that if a | b and a | c, then a | b + 2c,


a | b + 3c, a | 2b + 2c, and a | 1837b + 948c. Generalize.

Many students, upon seeing this for the first time, will erroneously con-
clude that if a | b + c, then a | b and a | c.

Exercise 4: Find a counterexample, or a set of numbers that leads to a


contradiction, to the above statement.

This is, of course, silly. However, this illustrates a common logical pitfall
- assuming that the converse, or the reverse, of a statement is true. For
example, consider the statement ”If I am 13 years old, then I am a teenager”.
QED Monthly Volume 1 Alexander Katz Page 32

This is a very true statement. However, the converse of this statement is ”If
I am a teenager, then I am 13 years old”.
But this is clearly not true, as teenagers can be several different ages.
It is important that you do not incorrectly make this logical fallacy (we’ll
discuss more on logic later on).
We continue on.
If a | b and b | c, then we have some integers x, y such that ax = b and
by = c. Substituting in gives a(xy) = c. Because x is an integer and y is an
integer, xy is an integer. Thus a | c.
Again, be careful not to draw incorrect conclusions from this statement.
When in doubt, write out the definitions of divisibility (if a | b, there exists
some integer x such that ax = b), and check to make sure you get the desired
result.
Below is another important example of drawing an incorrect conclusion.

Faulty Logic: Note that 2 | 24, 3 | 24, and 6 | 24. Also, 2 | 16, 8 | 16, and
16 | 16. Thus, we can conclude ”If a|c and b|c, then ab|c”. (We will examine
[and fix!] this statement in more depth later on)

Exercise 5: Explain why the above statement is untrue. At the very least,
come up with a counterexample to the above statement.

However, note that non-divisibility of integers does not follow any of the
same rules. For example, a - b and a - c do not necessarily lead to a - b + c
(can you think of an example where a - b and a - c but a | b + c?).
We can use these properties to our advantage to tackle otherwise tedious
problems. For example,

Problem 6: Is 3 a divisor of 3 + 6 + 9 + 12 + 15 + 18 + 21 + 24 + 27 + 30?


Solution: We could add up all the numbers and then check to see if 3 is
a divisor of the sum, but this will take some time and it’s easy to make a
mistake. Instead, we can be more clever. Note that 3 is a divisor of each of
the numbers 3, 6, 9, 12, 15, 18, 21, 24, 27, and 30, so 3 must divide their sum
from our first property.

Problem 7: Is 111111 divisible by 37?


Solution: We could divide 111111 by 37, but this is tedious and not much
fun. Instead, we note that 111111 is essentially 2 blocks of 111 put together.
In particular, 111111 = 111 · 1001, and so 111 | 111111 (make sure you see
QED Monthly Volume 1 Alexander Katz Page 33

why this is true!). We also know that 37 · 3 = 111, so 37 | 111. By our di-
visibility rules above, we can conclude that since 37 | 111 and 111 | 111111,
we have 37 | 111111.

We can now discuss a bit about the number of divisors an integer has.
Recall that we refer only to positive divisors. In Exercise 2, you hopefully
concluded that 1 is a divisor of every number, while 0 is a multiple of every
number (if you did not, go back and understand why this is true). We can
take this a step further. For any number n, we already know that 1 is a
divisor. We can also conclude that since 1 · n = n, n · 1 = n, and so n is a
divisor of n.
Thus, every number (except for 1!) has at least 2 divisors. 1 is a special
case because n = 1, meaning that it only actually has 1 divisor.

Exercise 8: Can a number have only 2 divisors? If so, give an example.

Hopefully your answer to the above question was yes. Such numbers are
very special numbers. In fact, they are so special, we give them a special
name - prime numbers. Numbers with more than 2 divisors are called
composite numbers. 1 is neither a prime nor composite number. Al-
though 0 has an infinite number of factors, we usually also consider 0 as its
own special case - not a prime nor a composite number.
The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31,
37, 41, and so on. We will discuss in much greater depth the importance of
these numbers in upcoming lessons.
You may notice that there doesn’t seem to be an obvious pattern to these
numbers (besides the fact that they are all prime!). Indeed, there isn’t one.
Prime numbers lend to themselves an aura of mystery, with a great deal of
very high-level mathematics devoted to them, and relatively little known.
So how can we determine if a number is prime? Unfortunately, not
simply. We have to take an algorithmic approach. The simplest (though
not most efficient, but one of the most practical for human use) goes as
follows: For a number n, we have to check that no numbers less than n are
divisors of n. But we can narrow our search significantly. If n is divisible by
some number a that is not prime (or 1), then a must be divisible by some
prime p. But then p | a and a | n, so p | n. Thus, in fact, we only need to
check if n is divisible by prime numbers less than n.
We
√ can narrow our search even further. If n is divisible by √ a such that
a > n, then the number b such that n = ab must satisfy b < n (why?).
QED Monthly Volume 1 Alexander Katz Page 34

But b is also a factor of n, so we


√only need to check if n is divisible by prime
numbers less than or equal to n. √
For example, let us check if 59 is a prime number. Note that 59 ≈ 7.68
(we don’t
√ actually need to know this good of an approximation, only that
2 2
7 < 59 < 8. This is easy because we know √ 7 = 49 and 8 = 64, so since
59 lies between 49 and 64 we know that 59 lies between 7 and 8), so we
only need to check primes less than or equal to 7. These are 2, 3, 5, 7. None
of these divide 59, so we can conclude that 59 is a prime number.
This method is used in the Sieve of Eratosthenes. This method works
as follows. Write down a list of the numbers 2 to n (note that we ignore
1, as it is a special case), usually in a rectangle
√ with row length 10. Now
list out the primes less than or equal to n. Start with 2 (the smallest
prime number), and cross out every number in the list that is divisible by
2. Proceed to 3, and cross out any remaining√ number divisible by 3, and so
on for every prime less than or equal to n. The numbers not crossed out
are prime. √
We show the final result for n = 100. Note that 100 = 10, and the
primes less than or equal to 10 are 2, 3, 5, 7. So we first cross out all the
numbers divisible by 2, then cross out the remaining numbers divisible by
3, then 5, then finally 7.
QED Monthly Volume 1 Alexander Katz Page 35

The light green numbers represent our original primes, the dark green
numbers the prime numbers we found, and the red numbers numbers that
were divisible by at least one of 2, 3, 5, or 7. So why are prime numbers so
important, and why do we care about them? One important application is
the prime factorization of numbers. Every number greater than 1 can be
expressed as the product of prime numbers (of course, prime numbers are
already expressed in this form!). For example, 30 = 2·3·5, 12 = 2·2·3 = 22 ·3,
2014 = 2 · 19 · 53, and so on. This means that when you hear statement
like “primes are the building blocks of mathematics”, they’re not kidding!
In a way, primes are similar to atoms. Although we know today that this
isn’t entirely true, the original concept of the atom was to be the smallest
“part” of something. The name atom literally means “uncuttable”. It was
envisioned that everything could be divided into progressively smaller parts,
finally stopping when it was impossible to break it into anymore smaller
pieces. In the same way, a number can be progressively broken down into
smaller and smaller parts, finally stopping when we reach all primes (which
are impossible to break down into smaller pieces).
Even more importantly, however, is that every number can be written
uniquely as a product of primes. In other words, when we find that 30 =
2 · 3 · 5, we know that there is no other way to write 30 as a product
of primes (except for permutations such as 3 · 2 · 5, but these don’t count
because they are equivalent). This is known as the Fundamental Theorem
of Arithmetic, a name that certainly does not overestimate the importance
of the result.
A common application fo √ the Fundamental Theorem of Arithmetic is
proving the irrationality of 2. A number is called irrational if it cannot
be expressed as the ratio of two integers.

Exercise 9: Prove 2 is irrational.

Solution. Assume the contrary, therefore we have


√ x
2=
y
for relatively prime integers x and y (meaning x and y do not share a
common factor). Therefore, we get
x2 = 2y 2
QED Monthly Volume 1 Alexander Katz Page 36

However, by the Fundamental Theorem of Arithmetic, if p | y, then we


must have p | x, contradicting the √
fact that x and y are relatively√prime.
Therefore y = 1, which implies that 2 is an integer. However, 1 < 2 < 2,
contradiction.
√ √
Exercise 10: Prove that if a n is rational, then a n is an integer.
Solution. We follow the same logic as in the above solution. Set

a
x
n=
y

for relatively prime integers x and y. Therefore


√ ny a = xa . If p | y then p | x,
contradiction. Therefore y = 1 implying a n = x.
Summary:
Number Theory is another vitally important branch of mathematics, but
it is also overlooked in the school cirriculum besides brief and unmotivated
passing mentions. At the heart of the subject is divisibility, which in turn
leads to the importance of primes. Like the initial concept of an atom, primes
cannot be decomposed into smaller parts. This leads to many convenient
properties, which we can exploit in various ways. Unfortunately, prime
numbers defy conventional patterns. In order to find them, we have to make
use of algorithmic constructions that are not always efficient. In fact, the
problem of factorizing a number is (literally) among the most difficult math
problems that we know of today in the general case. Fortunately this is not
generally necessary, and almost all of number theory utilizes the properties
of primes in some form.
Exercises:

1. • Is 17 prime?
• Is 19 prime?
• Is 21 prime?
• Is 1001 prime?
• Is 103 prime?
• Is 107 prime?
• Calculate the largest prime number greater than 200.
• Calculuate the number of prime numbers between 100 and 200
using the Sieve of Erathosthenes.
QED Monthly Volume 1 Alexander Katz Page 37

2. How may divisors does 6 have? How many divisors does 9 have? How
many divisors does 144 = 24 × 32 have? What about 23 · 32 · 5 · 73 ?

3. If n = pe11 pe22 · · · pekk is the unique prime factorization of n, prove that


n has
(e1 + 1) (e2 + 1) · · · (ek + 1)
divisors.

4. Let p, q, and r be three prime numbers that sum up to 62. What is


the minimum possible value of pqr?

5. A group of 25 pennies is arranged into three piles such that each pile
contains a different prime number of pennies. What is the great-
est number of pennies possible in any of the three piles? (MATH-
COUNTS)

6. Let p1 , p2 , . . . , p2k+1 be an odd number of primes with an even sum.


For example, (2, 3, 5) and (2, 11, 13, 23, 59, 101) satisfy this condition.
Prove that at least one of the primes must be 2.

7. What is the largest two-digit prime number whose digits are also each
prime? (MATHCOUNTS)

8. A two-digit prime number is randomly selected. What is the proba-


bility that its digits sum to 9? (MATHCOUNTS)

9. What is the first year in the twenty-first century that is a prime num-
ber? (MATHCOUNTS)

10. Find all integers n ≥ 1 such that n3 − 1 is prime.


5

Algebra 2

A logarithm is defined as follows:

logm (n) = x ⇐⇒ mx = n, m, n > 0, m 6= 1

In other words, if we have numbers m, n, x such that m and n are positive


with m 6= 1 and mx = n, then we say logm (n) = x. In this way, taking the
logarithm is the inverse of exponentation. Keep in mind that m and n
MUST be positive.
While at first this may seem like a confusing definition, it gets a lot sim-
pler than this. Let us take a look at a few basic examples before we begin
digging into the AIME problems. Letting m = 10, we have the common
logarithm. As an example, log10 (102 ) = 2. When m = e, we have the
natural logarithm which is quite useful in calculus. When there is no sub-
script attached to the logarithm, we assume it is one of these two depending
on context. For now, if there is no subscript attached, assume it is 10. In
other words, log x = log10 x.
There are a few important properties of logarithms that are necessary to
know in the following problems.

1. loga (m) + loga (n) = loga (mn)

2. loga ( m
n
) = loga (m) − loga (n)

3. loga (mn ) = n loga (m)


loga (m)
4. logab (m) = b

logb m
5. loga (m) = loga m

38
QED Monthly Volume 1 Alexander Katz Page 39

Proving these is mostly a matter of using the definition and some expo-
nent laws that we are already famililar with. For example,

Problem: Prove the first property. In other words show that

loga (m) + loga (n) = loga (mn)

Solution: At first we have no useful tools with which to prove this. But
we do know that logarithms are heavily related to exponentation, which
we know more about. Thus we attempt to convert the problem into one
involving exponents. Let x = loga (m) and y = loga (n). By the definition of
a logarithm, we have

m = ax , n = ay =⇒ mn = (ax )(ay )
But since (ax )(ay ) = ax+y , we have

mn = ax+y
Once again converting from exponentation to logarithms,

x + y = loga (mn)
and now simply replacing our original expressions for x and y:

loga (m) + loga (n) = loga (mn)

When doing logarithm problems, we always need to check that our solu-
tions are valid. For example,

Problem: Find all real x such that log12 x + log12 (x + 1) = 1


Flawed Solution: By the first property we have

log12 (x(x + 1)) = 1 =⇒ x(x + 1) = 121 = 12 =⇒ x2 + x − 12 = 0

=⇒ (x − 3)(x + 4) = 0 =⇒ x = 3, −4
Thus our solutions are x = 3, −4.
QED Monthly Volume 1 Alexander Katz Page 40

This solution is invalid because −4 is not actually a solution! log12 (−4)


is undefined, so −4 is an extraneous solution. It’s always very important to
ensure that all the solutions you find are valid.

Now, we have the tools to successfully attack some problems. We’ll start
off, fittingly, with the very first AIME problem that ever existed.

Problem: [1983 AIME Problem 1] Let x, y, and z all exceed 1 and let w
be a positive number such that logx w = 24, logy w = 40, and logxyz w = 12.
Find logz w.

Thoughts: Hmm, the nice thing about this problem is that all the loga-
rithms have the same argument, but unfortunately they all have different
bases. It would be much nicer if this was the other way around. But we
log b
can do this! Notice that by change of base since loga b = log a
, we have
1
logb a = log a
log b
= log1 b . This means that logw x = . We can do the same
a 24
thing for logw y and logw xyz, and after that we can solve for logw z! That’ll
complete this problem.
1 1 1
Solution: Note that logw x = = . Similarly, we have logw y =
logx w 24 40
1
and logw xyz = . Finally, note that
12
 
xyz 1 1 1 1
logw z = logw = logw xyz − logw x − logw y = − − = ,
xy 12 24 40 60

so logz w = 060 .

This problem highlights a very important strategy that can be used for
many different types of equations and systems of equations, problem solving
tip symmetry:

Tip: If there are any aspects of an equation or a system of equations


that look similar, exploit that similarity.

In the above problem, the said symmetry was noticing that all the log-
arithms have the same argument - w. We don’t know much about how to
use common arguments, but many of our properties pertain to logarithms
QED Monthly Volume 1 Alexander Katz Page 41

with common bases. Thus we converted into a form we knew how to deal
with, and found an easy solution as a result.

Problem: [2010 AIME II Problem 5] Positive numbers x, y, and z satisfy


xyz = 1081 and (log10 x)(log10 yz) + (log10 y)(log10 z) = 468. Find
p
(log10 x)2 + (log10 y)2 + (log10 z)2 .

Thoughts: We have logs base 10 and a power of 10. How about we take
log base 10 of the first equation? Then we can use property number 1
to give us log10 x + log10 y + log10 z = log10 (xyz) = 81. How about we
substitute a = log10 x, b = log10 y, c = log10 z as we have these in two equa-
tions. First, we have to convert log10 yz = log10 y + log10 z, and we are
left with a + b + c = 81 and ab + ac + bc = 468. We also know that
a2 + b2 + c2 = (a + b + c)2 − 2(ab + ac + bc). We are done!

Solution: xyz = 1081 =⇒ log10 x + log10 y + log10 z = log10 (xyz) = 81


from property 1. Set a = log10 x, b = log10 y, c = log10 z. Note that
(log10 x)(log10 yz) + (log10 y)(log10 z) = 468
=⇒ (log10 x)(log10 y + log 10z) + log10 y log10 z = 468
=⇒ log10 x log10 y + log10 x log10 z + log10 y log10 z = 468
from property 1 again, therefore we arrive at the following two equations:
a + b + c = 81 and ab + ac + bc = 468

We wish to find a2 + b2 + c2 . Note that some analysis (or prior knowledge)
reveals
√ that a2 + p
b2 + c2 = (a + b + c)2 − 2(ab + ac +pbc), therefore we have
a2 + b2 + c2 = (a + b + c)2 − 2(ab + ac + bc) = 812 − (2)(468). This
is now a work of basic calculations. You could expand the whole thing out, or
you could do a much nicer method:
p 812 −(2)(468) 3
p = 9(9 −2(52)) = 9(729−
104) = 9(625). Therefore, 812 − 2(468) = 9(625) = (3)(25) = 075 .

Afterthought: This problem highlights another problem solving tip:

Tip: When we have logarithms, try making an equation without the ugly
logarithms.
QED Monthly Volume 1 Alexander Katz Page 42

In this case, we had a bunch of logarithms that can be difficult to deal


with while working through problems, so we substituted variables to make
them easier to deal with. This is a tip that extends to all types of problems,
not just logarithm ones.
Problem: [2000 AIME I Problem 9] The system of equations

log10 (2000xy) − (log10 x)(log10 y) = 4


log10 (2yz) − (log10 y)(log10 z) = 1
log10 (zx) − (log10 z)(log10 x) = 0

has two solutions (x1 , y1 , z1 ) and (x2 , y2 , z2 ). Find y1 + y2 .

Thoughts: We can again use property 1 to simplify this a bit. We get

log10 (2000xy) = log10 (1000) + log10 (2) + log10 x + log10 y

=⇒ 3 + log10 2 + log10 x + log10 y − log10 x log10 y = 4


=⇒ log10 2 + log10 x + log10 y − log10 x log10 y = 1
Doing the same for the other equations, and letting a = log10 x, b = log10 y, c =
log10 z, we get

log10 2 + a + b − ab = 1
log10 2 + b + c − bc = 1
a + c − ac = 0
We can rearrange the first equation to notice that log10 2 = (a − 1)(b − 1).
Similarly, use this method to give us log10 2 = (b−1)(c−1) and (a−1)(c−1) =
1. What if we multiply together all the equations? Then we would have
((a − 1)(b − 1)(c − 1))2 = (log10 2)(log10 2) or (a − 1)(b − 1)(c − 1) =
± log10 2. Note that (a − 1)(c − 1) = 1 gives us (b − 1) = ± log10 2, so
b = log10 2 + 1 or 1 − log10 2. Substitute back b = log10 y and we’re done!

Solution: Noting that log10 (2000xy) = 3+log10 2+log10 x+log10 y, log10 (2yz) =
log10 2 + log10 y + log10 z and log10 (xz) = log10 x + log10 z, we make the sub-
stitution a = log10 x, b = log10 y, c = log10 z to make the equation easiest to
work with.
We arrive at the following set of equations

3 + log10 2 + a + b − ab = 4 and log10 2 + b + c − bc = 1 and a + c − ac = 0


QED Monthly Volume 1 Alexander Katz Page 43

We note that a + b − ab = −(a − 1)(b − 1) + 1, and we can use this equation


with different variables for the other equations to arrive at:

log10 2−(a−1)(b−1) = 0 and log10 2−(b−1)(c−1) = 0 and (a−1)(c−1) = 1

Therefore, we have:

log10 2 = (a − 1)(b − 1) and log10 2 = (b − 1)(c − 1) and(a − 1)(c − 1) = 1

Multiplying together the equations, we arrive at

((a − 1)(b − 1)(c − 1))2 = (log10 2)2 =⇒ (a − 1)(b − 1)(c − 1) = ± log10 2.

Therefore, combined with the fact that (a − 1)(c − 1) = 1, we have b − 1 =


± log10 2. Therefore, we get b = ± log10 2 + 1. Note that log10 2 + 1 =
log10 (20) and 1 − log10 2 = log10 5, therefore b ∈ {log10 (20), log10 (5)}. Since
b = log10 y, we have y ∈ {20, 5} and so y1 + y2 = 025 .

The above solution utilized, in a simple form, the following famous idea.
Of course, this is also not a concept used only for logarithms (in fact, it has
no direct relation to logarithms at all).

Simon’s Favorite Factoring Trick: When we have an equation of the


form ab − ma − nb = k, we can add mn to get

ab − ma − nb + mn = k + mn
=⇒ (a − n)(b − m) = k + mn
This is useful for when we have equations that are like this form to find a
simpler equation. WARNING: DO NOT FORGET ABOUT SIGNS. When
m and n are both positive, we add mn to both sides. When one is positive,
one is negative, we subtract mn from both sides. When both are negative,
we add mn to both sides. This allows us to factor our expression nicely.

Problem: [1988 AIME Problem 3] Find (log2 x)2 if log2 (log8 x) = log8 (log2 x).

Thoughts: There is nothing really nice we can do to manipulate this equa-


tion. Since we’re going to be taking log2 or log23 to both of the equations,
m
what if we let x = 22 so we can find an equation in m? Then we could have
m
2
log8 (x) = . Then, log2 of this is equal to m−log2 (3). We also have on the
3
QED Monthly Volume 1 Alexander Katz Page 44

m m
other side log8 (log2 x) = log8 (2m ) =. Therefore, we get m − log2 (3) = .
3 3
2m 3 log2 (3)
Aha! Next, we get = log2 (3) or m = . Now, we want to find
3 m 2
(log2 x) . Well, x = 2 , so log2 (x) = 2 . Therefore, we want (2m )2 , and
2 2 m

it’s a work of computations from now.


m
Solution: As in the thought, let x = 22 . Note that log8 (log2 x) = log8 (2m )
m m 2m
and using property 4, we get log8 (2m ) = . Also, log8 (22 ) = from
m
3 3
property 4, and log2 (log8 (22 ) = log2 (2m ) − log2 (3) = m − log2 (3) using
property 2. Putting these together,

2m
 
m
m − log2 (3) = log2 (2 ) − log2 3 = log2 = log2 (log8 x)
3
m
= log8 (log2 x) = log8 (2m ) = log23 (2m ) =
3
m 3 log2 (3)
=⇒ m − log2 (3) = =⇒ m =
3 2
We now want (log2 (x)) . Note that (log2 (x)) = (2m )2 . We find
2 2

3 log2 (3) 3 3
2m = 2 2 = (2log2 (3) ) 2 = 3 2 .
3
Finally, (2m )2 = (3 2 )2 = 33 = 027 .

Thoughts: What if we let u = log8 x as a different substitution? Then we


could also use a combination of properties 3 and 4 to be able to find log2 x
in terms of log8 x to give us log2 x = log8 (x3 ) = 3 log8 x = 3u. Therefore, we
substitute these into the equation, to give us log2 (u) = log8 (3u). Then, use
this same method to give us log2 (u) = log8 (u3 ) and we are done!
Solution 2: Let u = log8 x. As a result, log2 x = log8 x3 = 3 log8 x = 3u.
Hence the equation becomes log2 u = log8 (3u). Using the same transforma-
tion as before, we can write log2 u as log8 u3 , so we have the equation

log8 u3 = log8 (3u) =⇒ u3 = 3u.


√ √
Solving this gives
√ 2 u = 3. Finally, we have log 2 x = 3u = 3 3 and so
2
(log2 x) = (3 3) = 027 .
QED Monthly Volume 1 Alexander Katz Page 45

Afterthought: This problem highlights the problem solving tip substitu-


tion: Tip: When we have an equation that we do not know how to work
with, sometimes substituting a value x = bn when we have log base b can
get rid of the logs and make the equation much more workable.

In the above problem, we did this in two ways. Because we have two
m
copies of log2 (something), the substitution x = 22 becomes natural. Alter-
natively, note that x = bn =⇒ logb (x) = n, so instead we could work in
reverse to let n = log2 x (or to make the problem slightly easier, u = log8 x)
Problem: [1995 AIME I Problem 2] Find the last three digits of the product
of the positive roots of √
1995xlog1995 x = x2 .

Thoughts: Let’s use a similar method as last time. How about we let
log1995 x = y as we do not want to be dealing with √ that in an2 exponent.
Therefore, we get x = 1995y . Therefore, we get 1995 · 1995y = 19952y .
Therefore, taking log base 1995 of both sides, we get 12 + y 2 = 2y or, re-
arranging the equation, 2y 2 − 4y + 1 = 0. We don’t actually have to find
the roots now, we note that we want the product of the two roots y1 and y2
of this equation, which gives us the product of the two x’s that satisfy the
original equation are 1995y1 +y2 and we are done!
Solution: Let log1995 x = y. By defintion, x = 1995y , and we arrive at the
following equation: √ 2
1995 · 1995y = 19952y
Now, take log base 1995 of both sides to give us:
√ 2
log1995 ( 1995 · 1995y ) = log1995 (19952y )
√ 2
=⇒ log1995 ( 1995) + log1995 (1995y ) = 2y
1
=⇒ + y 2 = 2y
2
Therefore, we get 2y 2 − 4y + 1 = 0. Since the discriminant is positive (it
is 8), there are indeed 2 real solutions. Let the solutions be y1 , y2 . Note
that since both y1 and y2 satisfy this equation, we have y1 = log1995 x1 and
y2 = log1995 x2 where x1 and x2 are the two solutions of the original equation.
We can find y1 + y2 using Vieta’s formulas. Vieta’s formulas tell us
that the sum of the two roots of the quadratic ax2 + bx + c = 0 is −b a
,
QED Monthly Volume 1 Alexander Katz Page 46

so the sum of the roots satisfying 2y 2 − 4y + 1 = 0 is 42 = 2. Therefore,


x1 x2 = 1995y1 1995y2 = 1995y1 +y2 = 19952 , and we want to find the last 3
digits of this number. Therefore we can take the number modulo 1000, and
get 19952 ≡ (−5)2 ≡ 025 (mod 1000).

Afterthought: This problem again utilized substitution of a convenient


expression for an ugly one.

Our final problem once again illustrates the value of the following tip:

Tip: Changing the base of a logarithm is a great way to simplify ugly


looking expressions.
Problem: [2000 AIME II Problem 1] The number
2 3
+
log4 20006 log5 20006
m
can be written as n
where m and n are relatively prime positive integers.
Find m + n.

Thoughts: This thing is ugly. The 2000’s inside the logarithms are really
annoying. Let’s use property 5 again to change their bases maybe. Recall
that we found earlier
logb b 1
loga b = =
logb a logb a
Using this, the expression turns into
2 log20006 4 + 3 log20006 5.
We can consolidate this further into log20066 (42 × 53 ) which is now a work of
computation.

Solution: Note that


2 3
6
+ = 2 log20006 4 + 3 log20006 5
log4 2000 log5 20006
1
= log20006 (42 ) + log20006 (53 ) = log20006 (2000) = ,
6
so m + n = 007 .
QED Monthly Volume 1 Alexander Katz Page 47

What follows is a series of exercises, typically 10, designed to enhance


the reader’s understanding of the topic(s) covered in the article by having
them struggle with difficult problems on their own. While the majority of
the exercises will appear to only require a numerical answer, it is expected
that the student come up with solutions as in the article.

Exercises:

1. In the beginning of the article, we outlined 5 properties of logarithms


that we used repeatedly to solve difficult problems. We provided the
proof for the first property; prove the remaining 4.

2. (Interstellar) Find the number x such that

(log 8)2 + (log 16)2 = (log x)2 .

3. (1984 AIME Problem 5) Determine the value of ab if log8 a+log4 b2 = 5


and log8 b + log4 a2 = 7.

4. Show that

(logx1 x2 )(logx2 x3 )(logx3 x4 ) . . . (logxn−2 xn−1 )(logxn−1 xn ) = logx1 xn .

5. (2002 AIME II) It is given that log6 a + log6 b + log6 c = 6, where a, b, c


are positive integers that form an increasing geometric sequence and
b − a is the square of an integer. Find a + b + c.

6. (2002 AIME) The solutions to log225 x + log64 y = 4 and logx 225 −


logy 64 = 1 are (x1 , y1 ) and (x2 , y2 ). Find log30 (x1 y1 x2 y2 ).

7. (2013 ARML) Let X be the number of digits in the decimal expan-


10000
sion of 1001000 , and let Y be the number of digits in the decimal
10000100000
expansion of 1000 . Compute blogX Y c

8. (1995 ARML) If log10 14 = x, log10 15 = y and log10 16 = z, then deter-


mine the number of elements in S = {log10 1, log10 2, log10 3, . . . , log10 100}
which can be written in the form ax + by + cz + d for rational numbers
a, b, c, d.
QED Monthly Volume 1 Alexander Katz Page 48

9. (2000 ARML) If b = 2000, compute the numerical value of the infinite


sum:
0 1 2 3
(logb 2)0 (logb 54 )+(logb 2)1 (logb 54 )+(logb 2)2 (logb 54 )+(logb 2)3 (logb 54 )+. . .

10. (2009 AIME II) For certain pairs of (m, n) of positive integers with
m ≥ n there are exactly 50 distinct positive integers k such that |
log m − log k |< log n. Find the sum of all possible values of the
product mn.
6

Combinatorics 2

Undoubtedly the reader is familiar, at least in passing, with the famous


Fibbonacci sequence. An apparently innocuous series of numbers, the Fib-
bonacci sequence has far reaching applications, from the breeding of rabbits
to the shape of galaxies.
This sequence is defined thus: Let the first two numbers in the sequence
both be 1, and let each subsequent term be the sum of the previous two.
In this way, the sequence begins 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, . . . and
continues infinitely.
This is but one simple example of recursion. In a recursion, we re-
peatedly apply some iterative rule on a set of starting terms to generate a
(usually infinite) sequence. For example, the Fibbonacci sequence above can
be more succinctly defined as F1 = 1, F2 = 1, Fn = Fn−1 +Fn−2 for all n ≥ 2.
Recursions appear in several areas of math, and also appears frequently in
computer programming.
We see that a recursion is defined by 2 things: starting values (also
known as a base case, but we avoid this terminology to avoid confusion
with induction), and a recursive rule. In the above, the starting values
are F1 = F2 = 1, and the recursive rule is Fn = Fn−1 + Fn−2 . Why do
we require both? Well, with just the recursive rule, our recursion is not
fully defined. For example, the Lucas sequence (which is also a fascinating
sequence, with many relationships with the Fibbonacci sequence) begins
with L1 = 2, L2 = 1 and has the same recursive rule. Thus the sequence
begins 2, 1, 3, 4, 7, 11, 18, 29, . . ., which is clearly different from the Fibonacci
sequence.
There are a great number of problems that involve recursion in a non-
obvious way. Clues to use recursion include:

49
QED Monthly Volume 1 Alexander Katz Page 50

• The problem involves some number like “2014” or “421337” that doesn’t
appear to be important in any real way. This usually is a sign to re-
place this number with a variable and solve the general case.
• Problems that have something specific in them that resembles a recur-
sive rule. For example, if a problem defines a series of shapes based
on a previous shape (see, for example, the generation of the Koch
snowflake), recursion screams to be used.
• Many problems that ask you to “build” a sequence according to certain
restrictions are often solved relatively quickly using recursion.
Becauser recursion relies on building larger cases from smaller ones, our
goal is usually to do the reverse: relate some case to a smaller one. This is
best illustrated by an example:

Problem 1: How many ways are there to tile a 2 by 10 grid of unit squares
with dominoes? (Note: A domino is a 1 × 2 grid of unit squares).
Solution: There doesn’t appear to be anything special about the number
10, so let’s replace it with n, and let an be the number of ways to tile a 2 × n
grid of unit squares. Now consider the top left corner square. The domino
covering this square can be either vertical or horizontal. If this domino is
vertical, then we are left with a 2×(n−1) grid of unit squares, for which there
are an−1 tilings. If this domino is horizontal, then the domino containing
the bottom left square must also be horizontal, leaving us with a 2 × (n − 2)
grid of unit squares, for which there are an−2 tilings. Therefore, we have
an = an−1 + an−2 .
We also need to find the first few terms. Note that there is obviously
only 1 way to tile a 2 × 1 grid, and there are 2 ways to tile a 2 × 2 grid.
Therefore, we have a1 = 1, a2 = 2, an = an−1 + an−2 .
This sequence should look familiar - it’s exactly the definition we have
for the Fibbonacci numbers, shifted by a term. Thus we are just looking for
the 11th Fibbonacci number, or 89 .

In this solution, we see a general strategy for approaching recursion prob-


lems. We focus on a specific part of the problem (in this case the upper left
square), find out which cases are possible, and find a representation for each
case. Usually, the “specific part” that we zoom in on is a tiny case that is
easy to deal with. Typical examples include:
• “Corner cases”, illustrated quite literally in the previous problem.
QED Monthly Volume 1 Alexander Katz Page 51

• The first or last number of a sequence we are generating, or similarly


the first/last element in some kind of set we are generating, such as a
vertex in a polygon.
• The smallest or largest number in a sequence we are generating, or
analogously the “smallest” or “largest” element (by some measure) in
some type of set we’re generating.

By necessity, the element we choose to focus on should reduce the prob-


lem to a smaller case. For example, here is a slightly harder problem that
uses the same concept:

Problem 2: Kelvin the frog is building a tower with his infinite supply of
blocks. He has an infinite number of blocks that are 1 unit high, an infinite
number of blocks that are 2 units high, and an infinite number of blocks
that are 3 units high. How many ways can Kelvin the frog make a tower
that is 10 units high?
Not fun: One natural attempt at a solution to this problem I have seen: Let
a1 be the number of blocks 1 unit high, a2 be the nubmer of blocks 2 units
high, and a3 be the number of blocks 3 units high. Then a1 + 2a2 + 3a3 = 10.
Listing the cases and accounting for permutations leads to the answer. While
this technically works, it has two major disadvantages. First of all, it is ex-
tremely easy to make a mistake. As in most solutions that involve a great
deal of cases, a single slip can ruin a great deal of hard work. But more
importantly, it is not easily generalizable. If we replaced the number 10
with 20, this method would become completely unworkable.
Solution: Consider the bottom block of the tower. It is either 1 unit, 2
units, or 3 units high. Thus, if we do the same thing as the previous so-
lution and let an represent the number of ways to build a tower that is n
units high, we get an = an−1 + an−2 + an−3 . Our starting values are easy -
we get a1 = 1, a2 = 2, and a3 = 4 (we could even use a0 = 1, since there
is clearly 1 way to do nothing). We can use our recursive definition to get
a4 = 7, a5 = 13, a6 = 24, a7 = 44, a8 = 81, a9 = 149, a10 = 274 .

Notice how we focus on the bottom block. This allows us to reduce


our problem into multiple (three) smaller problems. However, what would
happen if we replaced the number 10 with 20 as we mentioned before? Al-
though our method is still much better than counting permutations of many
cases, it still is very easy to make a mistake when performing 18 additions
- especially when our numbers get very large. Oftentimes we want to find
QED Monthly Volume 1 Alexander Katz Page 52

a closed form formula for the terms. In other words, we want to find an
expression for the nth term that depends only on n. Unfortunately this is
not practical for the problem above, but in general it can be a very useful
tool.

Problem 3: How many ways are there to write 10 as the ordered sum of
positive integers? For example, 3 + 3 + 4, 3 + 4 + 3, and 4 + 3 + 3 are all
different ways.
Solution: Let an be the number of ways to write n in this manner. Note
that a0 = 1, a1 = 1, a2 = 2, a3 = 4. Consider the first term. This
term can be anywhere from 1 to n, and so an = an−1 + an−2 + . . . + a0 =
an−1 + an−2 + . . . + a1 + 1.
We suspect from our pattern above that an = 2n−1 for n ≥ 1. We easily
verify that a1 = 20 = 1 and 2n−1 = 2n−2 + 2n−3 + . . . + 20 + 1, so our formula
should be true (we will soon see how to find this formula without guessing).
Thus, our answer is 210−1 = 512 .

Again, we see the importance of focusing on one element. In most prob-


lems like this, we focus on the first term, as this usually gives us the easiest
workable form. When this is not possible, as in our first problem, we choose
whichever element gives us the least cases - in a way, an extremal element.
So far, it may look as though we have cherry picked our examples to
easily “die” to recursion. While there is some truth in this statement, it
shows how powerful recursion is. When recursion works, it works. Solutions
are usually quite quick once the method of reducing a case to a smaller one
is fleshed out. Don’t believe me? Let’s look at a supposedly “super hard”
contest problem - at least as the numbering would suggest!:

Problem 4: Call a set of integers spacy if it contains no more than one


out of any three consecutive integers. How many subsets of {1, 2, 3, . . . , 12},
including the empty set, are spacy? (2007 AMC 12A #25)
Solution: Let Sn be the number of spacy subsets of {1, 2, 3, . . . , n}. Con-
sider the number 1. If this is in our spacy subset, then 2 and 3 cannot be in
the subset, leaving us to choose a spacy subset of {4, 5, . . . , n} - equivalent
to choosing a spacy subset of {1, 2, 3, . . . , n − 3}, of which there are Sn−3 by
definition.
If 1 is not in our subset, then we must choose a spacy subset of {2, 3, . . . , n},
which is equivalent to choosing a spacy subset of {1, 2, . . . , n − 1}, of which
there are Sn−1 .
QED Monthly Volume 1 Alexander Katz Page 53

This gives Sn = Sn−1 + Sn−3 .


We can routinely calculate S1 = 2, S2 = 3, and S3 = 4. Then, S4 =
6, S5 = 9, S6 = 13, S7 = 19, S8 = 28, S9 = 41, S10 = 60, S11 = 88, S12 =
129 .

We can see our now-familiar strategy in the above solution. We choose


a convenient element to focus on, in this case the number 1, find all ap-
plicable cases, and reduce them to a smaller version of the same problem.
We also saw an important new technique. When we reduce a problem to
a smaller case, it is rare that we will come up with the exact expression
for a smaller case. We may need to recognize when cases are equivalent.
In the example above, a crucial step was recognizing that choosing a spacy
subset {4, 2, 3, . . . , n} is functionally equivalent to choosing a spacy subset
of {1, 2, . . . , n − 3}. Despite this, it was quite clear how we were to approach
the problem. Often however, the way to reduce to a smaller version of the
same problem is not entirely obvious. We may have to adjust our method
to account for small differences. For example, here’s a relatively advanced
example taken from an AIME:

Problem 5: (1996 AIME Problem 9) A bored student walks down a hall


that contains a row of closed lockers, numbered 1 to 1024. He opens the
locker numberd 1, and then alternates between skipping and opening each
locker thereafter. When he reaches the end of the hall, the student turns
around and start back. He opens the first closed locker he encounters, and
then alternates between skipping and opening each closed locker thereafter.
The student continues wandering back and forth in this manner until every
locker is open. What is the number of the last locker he opens?
Solution: There’s nothing special about the number 1024, except for the
fact that it’s a power of 2. This suggests letting an be the last locker opened
if we begin with 2n lockers. We search for a10 . Let’s consider the first pass
through the hall. Since there are 2n lockers, after his first pass-through
the student closes exactly half the lockers, leaving 2n−1 lockers. Now we’ve
reduced the problem to a previous case! Well, not entirely. When the student
makes his second pass-through, he’s returning in the opposite direction. In
other words, the lockers are not starting from 1 anymore. Fortunately, all
is not lost. Note that the first closed locker that the student will pass by is
the one labeled 2n (since he already opened all the odd-numbered lockers).
The next is the one labeled 2n − 2. In general, the mth locker the student
passes by on his return is 2n − 2m + 2 (do you see why?). Let the xth locker
QED Monthly Volume 1 Alexander Katz Page 54

be the last locker the student closes. We know that this locker is numberd
2n − 2x + 2. But x is also the last locker opened beginning with 2n−1 lockers,
or an−1 by definition. Furthermore, the locker 2n − 2x + 2 is the last locker
opened when beginning with 2n lockers, or an (also by definition). We’ve
reached the necessary recursion! We have an = 2n − 2an−1 + 2.
We just need to find an appropriate starting value. We want to choose
something small that makes sense, so let’s look at n = 1. If there are only
2 lockers this is an easy task - the student opens locker 1 and then we’re
done. That wasn’t too bad! Writing this as an equation, a1 = 2. Now we
have everything we need - the starting value(s) and the recursive relation -
to finish the problem. Doing the computations, we have a10 = 342.

Take the time to go through this problem over and over again! It’s a very
difficult example, but also one which illustrates excellently how recursion is
used in problems (and the tips in the problem that suggest using recursion).
Up until now, we’ve either just bashed out the appropriate value or
guessed (then verified) a general formula for our recursions. This works well
for most problems where cases are small, but not so much if we need to find
the 1000th term. We now turn to a method of finding a general formula for
a recurrence.
We focus on linear recurrences, or those in the form an = c1 an−1 +
c2 an−2 + c3 an−3 + . . . + ck an−k , for some constants c1 , c2 , . . . , ck (which might,
of course, be 0). In particular, there is no constant term. We’ll deal with
constants (e.g. an = an−1 + an−2 + 1) later, which is only slightly more
difficult. Note that all of our recursions above fall into this category.
Consider the polynomial xk − c1 xk−1 − c2 xk−2 − . . . − ck = 0, and let
the roots be r1 , r2 , . . . , rk . The nicest form occurs when all of the roots are
distinct, but we can still account for cases when they are not. This is known
as the characteristic polynomial of the recurrence. We present the main
theorem (the proof of which utilizes calculus and is beyond the scope of this
article):

Theorem:
an = r1n + r2n + . . . + rkn
satisfies the recurrence relation. Furthermore, there exist constants λ1 , λ2 , . . . , λk
such that
an = λ1 r1n + λ2 r2n + . . . + λk rkn
is the unique solution that satisfies the recurrence relation and evaluates to
QED Monthly Volume 1 Alexander Katz Page 55

the correct starting values.


If any of the ri are equal, as in the case where the characteristic polyno-
mial is x2 − 4x + 4 (and thus the roots are both 2), then some of the terms
are multiplied by increasing powers of n. For example, when the character-
istic polynomial is x2 − 4x + 4 as above, instead of λ1 2n + λ2 2n the general
form is λ1 2n + nλ2 2n for some appropriate constants. If the characteristic
polynomial were (n−2)3 , the form would be λ1 2n +nλ2 2n +n2 λ3 2n , and so on.

Example: When the characteristic polynomial is (n − 2)3 (n − 1), the


roots are 2, 2, 2, and 1. Therefore, the general solution is of the form
λ1 2n + nλ2 2n + n2 λ3 2n + λ4 1n .

Wow! This is a mouthful, so we’ll illustrate the concept with an elemen-


tary example.

Problem 6: Find the general form for the nth term of the sequence gen-
erated by the following recursion: a1 = 1, a2 = 5, an = 5an−1 − 6an−2 for
n ≥ 2.
Solution: In this case, the characteristic polynomial is x2 − 5x + 6 = 0,
which has roots 2 and 3. Thus, by the theorem above, an = λ1 2n + λ2 3n
satisfies the recurrence relation. For completeness, we verify this. Plugging
this in gives

λ1 2n + λ2 3n = 5(λ1 2n−1 + λ2 3n−1 ) − 6(λ1 2n−2 + λ2 3n−2 )


⇐⇒ λ1 2n + λ2 3n = 5 · λ1 2n−1 + 5 · λ2 3n−1 − 6 · λ1 2n−2 − 6 · λ2 3n−2
⇐⇒ λ1 2n + λ2 3n = 5 · λ1 2n−1 + 5 · λ2 3n−1 − 3 · λ1 2n−1 − 2 · λ2 3n−1
⇐⇒ λ1 2n + λ2 3n = 2 · λ1 2n−1 + 3 · λ2 3n−1
which is clearly true.
Now we only need to find appropriate constants. By plugging in n = 1
and n = 2, we have the equations

2λ1 + 3λ2 = 1

4λ1 + 9λ2 = 5
Solving this system gives λ1 = −1, λ2 = 1. Thus, our solution is
an = 3n − 2n .
QED Monthly Volume 1 Alexander Katz Page 56

Indeed, if we were to instead plug in numbers in the hope of find-


ing a pattern, we would reach a1 = 1 = 31 − 21 , a2 = 5 = 32 − 22 ,
a3 = 5(5) − 6(1) = 19 = 33 − 23 , a4 = 5(19) − 6(5) = 65 = 34 − 24 , and so
on. Whether or not we would quickly recognize the numbers 1, 5, 19, 65, . . .
as 3n − 2n without knowing this beforehand is an entirely different story.
While this formula is often very useful, it can also lead to forms that are not
helpful to work with at all. For example, Binet found the following formula
for the Fibbonacci numbers:

Theorem (Binet’s formula):


√ √
(1 + 5)n − (1 − 5)n
Fn = √
2 5
or in the slightly nicer form,

φn − (−φ)−n
Fn = √ ,
5

1+ 5
where φ is the golden ratio 2
.

Unfortunately, in general this is not a particularly useful thing to know.


It is much quicker to simply evaluate F12 by repeatedly applying the re-
cursive relation than to attempt to plug n = 12 into this expression. If
we wanted to evaluate F1000 , it’s not necessarily easier to use this formula
(though in programming it may be worth sacrificing some accuracy for the
runtime boost this formula gives), but when would you ever want to know
F1000 anyway? This problem becomes even more apparent when complex
roots are introduced. Though they can, on occasion, lead to relatively nice
solutions, this usually needs to be combined with other knowledge of com-
plex numbers to be useful (and is generally just messy anyway). There are
also often situations where finding the roots is not even practically possible,
let alone “nice”. For example, if we return to our second problem:

Problem 2: Kelvin the frog is building a tower with his infinite supply of
blocks. He has an infinite number of blocks that are 1 unit high, an infinite
number of blocks that are 2 units high, and an infinite number of blocks
that are 3 units high. How many ways can Kelvin the frog make a tower
that is 10 units high?
QED Monthly Volume 1 Alexander Katz Page 57

Hopefully, with our newfound experience we can quickly conclude that


this is a problem for recursion, and we can quickly find the recursion an =
an−1 + an−2 + an−3 for n > 3 where an is the number of ways to make a
tower 10 units high. But if we try to find a general form for this equation,
we reach the characteristic polynomial x3 − x2 − x − 1 = 0. The roots of
this equation are much like that one group project member - when they’re
needed to solve problems, they’re very difficult to find. And even if we can
find them, nobody wants to work with them anyway.
What happens, however, when we have constants in our relation? For
example, let’s amend our sequence in Problem 6 to a1 = 32 , a2 = 11 2
, an =
5an−1 − 6an−2 + 1. Now we have a problem. Our theorem above is no longer
(directly) valid! In particular, it would be a grave mistake to conclude the
following:

Faulty Logic: By the theorem, we need to find the roots of the poly-
nomial x2 − 5x + 6 − 1 = 0.

Obviously this is ridiculous. So what is the problem with this logic? The
error is that 1 is not a term of the form an−k (in general - in this case it
turns out to be a0 = an−n ), and so we cannot apply our theorem directly.
Fortunately, we have other ways to attack this problem. Let’s first list out
some terms to see if we can guess what’s going on:
   
3 11 11 3 39
a1 = , a2 = , a3 = 5 −6 +1=
2 2 2 2 2
131 423 1331
a4 = , a5 = , a6 = ,...
2 2 2
Now we might notice a relation to our previous problem. In problem 6,
we had a1 = 1, a2 = 5, a3 = 19, a4 = 65, a5 = 211, a6 = 665, . . . - terms that
are each 12 less than their counterparts here. This would suggest that our
solution to this recursion is an = 3n − 2n + 21 , and indeed checking this shows
that it is the case. But things don’t always work out so nicely. We’d really
like to find a more general method to approach these types of problems.
If we plug in an = 3n − 2n + 12 to the recursive relation an = 5an−1 −
6an−2 + 1, the first thing we should notice is that the constant terms cancel
out. While this might seem like a happy coincidence, if we think about it for
a minute we realize that it’s to be expected. The difficulty in this problem
lies in the constant term, so we’d like to eliminate it if possible.
QED Monthly Volume 1 Alexander Katz Page 58

Insight: We need to make a convenient substitution to cancel out the con-


stant term

But how can we do this? Let’s return to our example. We already


guessed that an = 3n − 2n + 12 , which turned out to be true. But 3n − 2n
is also a closed form for the recursion b1 = 1, b2 = 5, bn = 5bn−1 − 6bn−2 .
This suggests an alternate approach to our problem above: Let bn be a new
sequence satisfying an = bn + 12 for all n. Since a1 = 23 and a2 = 112
, this
means b1 = 1 and b2 = 5. Plugging this into the recursive relation gives
   
1 1 1
bn + = 5 bn−1 + − 6 bn−2 + +1
2 2 2
1 5 6
=⇒ bn + = 5bn−1 − 6bn−2 + − + 1
2 2 2

=⇒ bn = 5bn−1 − 6bn−2
Now we’ve reached a linear recurrance (and even better, a problem we’ve
already done)! We can solve this using standard methods to get bn = 3n −2n ,
and so an = bn + 12 = 3n − 2n + 12 .
Again, it may seem like magic that the constant term happened to cancel
out. What led us to choose 21 (besides listing out the terms)? The answer
is very simple: we chose it precisely to cancel out the constant term. With
this in mind, if we had let an = bn + k with the express goal of canceling out
the constant term, we would get

bn + k = 5(bn−1 + k) − 6(bn−2 + k) + 1

=⇒ bn + k = 5bn−1 − 6bn−2 − k + 1
To cancel the constant terms, we need k = −k + 1 =⇒ 2k = 1 =⇒
k = 21 , which explains the motivation for choosing it. Of course, when ap-
proaching this problem for the first time in this article, it is easy to look
at the first few terms, recognize them as being 21 greater than those in the
previous problem, and discover the recurrance that way. But if we were
coming across this problem for the first time, discovering that the terms fit
the pattern 3n − 2n + 12 is extremely unlikely. This was a long and quite
involved article, and here is a natural place to conclude it.
QED Monthly Volume 1 Alexander Katz Page 59

Further Reading: For more on this subject, see here

Summary:
Recursions are a very important concept in mathematics, and as such are
tested regularly on mathematics competitions. Interestingly, however, often
times relatively simple exercises in the subject appear quite late on tests.
Thus, knowing how to work with them can earn you some easy points on
seemingly high-level problems. When working through the exercises, notice
how many of them will likely seem relatively routine and not too difficult,
then look at the sources! Many of them are late AIME problems, problems
that very few students are meant to solve. We went through a general strat-
egy of attacking these problems, as well as recognizing when a seemingly
unrelated problem is actually a good candidate for recursion. Following
that, we discovered a method of determining the general form for a given
linear recursion. Finally, we learned how to deal with constant terms in
recursions by introducing convenient substitutions.

What follows is a series of exercises, typically 10, designed to enhance the


reader’s understanding of the article’s topic through their own exploration
and struggles with difficult problems. Although many of these exercises ap-
pear only to require a numerical answer, it is essential that the reader be able
to rigorously justify their method. Particularly in the subject of recursion,
it is often easy to list out some cases and assume a general pattern holds
without justification. Although this glorified type of guessing often results
in the correct answer, it has very little educational value.

Exercises:

1. How many integers n between 256 and 511 (inclusive) are there such
that the binary representation of n has no two consecutive 1s? For
example, 280 = 1001000102 , so it counts, while 268 = 1000011002
does not.

2. Let a1 , a2 , a3 , . . . be a sequence of positive real numbers such that


ak ak+2 = ak+1 + 1 for all positive integers k. If a1 and a2 are pos-
itive integers, find the maximum possible value of a2014 . (USAMTS)
1
3. The sequence {an } satisfies an+1 = 1+a n
for all positive integers n. If
a1 = a2012 , find the sum of all possible values of a1 .
QED Monthly Volume 1 Alexander Katz Page 60

4. In the article, we briefly mentioned Binet’s formula for the Fib-


bonacci numbers. In particular, if Fn represents the nth Fibbonacci
number, we have

√ n √
(1 + 5) − (1 − 5)n φn − (−φ)−n
Fn = √ = √
2 5 5

Prove this formula.

5. In how many ways can you write 12 as an ordered sum of integers


where the smallest of those integers is equal to 2? For example, 2 + 10,
10 + 2, and 3 + 2 + 2 + 5 are three such ways. (Purple Comet 2013)

6. A colored domino is a 1 × 2 grid of unit squares, one of which is black


and one of which is white. If a 2 × 10 grid of unit squares is tiled with
dominos, how many ways can the rectangle be colored? For example,
a 2 × 1 rectangle has 2 ways, since the 1 domino tiling it can be in
either direction. A 2 × 2 rectangle has 6 ways, since we can choose any
2 squares to be black. IMPORTANT: Note that despite the fact that
there are 8 domino tilings of a 2 × 2 rectangle, there are only 6 ways
to color it, as some colorings are counted multiple times.

7. A collection of 8 cubes consists of one cube with edge-length k for each


integer k, 1 ≤ k ≤ 8. A tower is to be built using all 8 cubes according
to the rules:

• Any cube may be the bottom cube in the tower


• The cube immediately on top of a cube with edge-length k must
have edge-length at most k + 2.

Let T be the number of different towers that can be constructed. What


is the remainder when T is divided by 1000? (AIME 2006 Problem
11)

8. The term !n is used to represent the number of derangements of the set


{1, 2, 3, . . . , n}, or permutations of the set {a1 , a2 , . . . , an } such that,
for all i, ai 6= i. For example, there are 2 derangements of the set
{1, 2, 3} (they are {2, 3, 1} and {3, 1, 2}), so !3 = 2. Given !0 = 1 and
!1 = 0, compute !7.
QED Monthly Volume 1 Alexander Katz Page 61

9. For each even positive integer x, let g(x) denote the greatest power of
2 that divides x. For example, g(20) = 4 and g(16) = 16. For each
2−1
X
positive integer n, let Sn = g(2k). Find the greatest integer n less
k=1
than 1000 such that Sn is a perfect square. (AIME 2006 Problem 13)

10. The US, the UK, and China are competing for the top spot at the
Intentionally Misleading Olympiad. Each has sent a delegation of 8
students to take the test, but upon arrival it is revealed they misun-
derstood the instructions! In fact, the organizers had meant that 8
students should take the test overall, not per country. In order to be
as fair as possible, the organizers will randomly designate each of the
8 seats, arranged in a line, with either “US”, “UK”, or “China”. How-
ever, the organizers recognize that the US participants and the UK
participants both work in English, and so they decide that no student
from the US can sit next to a student from the UK. Chinese partici-
pants, however, have no such restrictions. In how many ways can the
organizers assign seating?
7

Geometry 2

Geometry often provides a source of great frustration for competitive math


students. Because the solutions to problems often involve noticing seem-
ingly subtle facts in very cluttered diagrams, cleverly adding lines in ways
that may seem like “magic”, or using complicated techniques the reader is
probably unfamiliar with. Although this type of frustration is present in
every subject, geometry tends to amplify this because it is often difficult to
make a “little bit” of progress on geometry problems. It is not uncommon
to simply spend hours staring at a diagram wondering what to do.
However, many geometry problems below the olympiad level can often be
solved with the use of coordinates. Although the computations are usually
(sometimes extremely) ugly (shoutout to Sonnhard1 !), we can turn many
geometry problems into matters of rote computation. This does not mean
we should pull out the coordinates on every geometry problem! Like every
other technique, there are times that coordinates are useful and times that
they are not.
So what do we mean when we talk about coordinates? Let’s talk a
bit about the basics. You should be familiar with the Cartesian Plane,
which simply means a plane in two dimensions. The x-axis is an infinitely
long horizontal line, and the y axis is an infinitely long vertical line. Their
intersection is termed the origin. A point can then be represented by (x, y),
where x denotes the horizontal distance from the origin to the point and y
denotes the vertical distance. The origin itself is represented as (0, 0). For
example, (3, 4) refers to the point reached by moving 3 units horizontally (to
the right, or in the positive x-direction) from the origin and 4 units vertically
(up, or in the positive y-direction).
1
Dr Sonnhard Graubner, an Art of Problem Solving legend

62
QED Monthly Volume 1 Alexander Katz Page 63

So now we have a way to express a bunch of points numerically. Great,


but how does this help? As you may have guessed, this is not all we can do.
Let’s take a common problem (many problems will be indirectly asking for
this):

Problem: Given 2 points A and B, find the distance between them.


Solution: Let the points A and B be represented as (x1 , y1 ) and (x2 , y2 ) re-
spectively. The horizontal distance between these points is |x2 − x1 |, and the
vertical distance is |y2 − y1 |. The distance between the points can be inter-
preted as the hypotenuse of a triangle with these legs, so by the Pythagorean
Theorem the distance is
p
D(A, B) = (x2 − x1 )2 + (y2 − y1 )2

Note that (x2 − x1 )2 = (x1 − x2 )2 = (|x2 − x1 |)2 and similarly (y2 − y1 )2 =


(y1 − y2 )2 = (|y2 − y1 |)2 , so we dropped the absolute value signs to be a bit
more concise.

For example, if we want to find the distance between p the origin and the
point
√ (3, 4), we can simply use this formula to get (4 − 0)2 + (3 − 0)2 =
25 = 5. This is great, but of course this is not the only tool in our box.
Recall that given 2 points, there is exactly 1 line going through both of
them. If this is the case, we should be able to find this line? Right? Of
course we can! First we need to define another useful concept: the slope of
a line. The slope of a line is the ratio of the vertical change to the horizontal
change between two points. More formally, the slope between the points
−y1
(x1 , y1 ) and (x2 , y2 ) is xy22 −x 1
.

Exercise: Explain, in words, what it means if two different lines have the
same slope.

So how do we find the equation of a line between two points? First off,
we can write any (non-vertical) line in the form

y = mx + b
for some constants m and b. Note that if x increases by some number a1 ,
then y increases by m · a1 . In other words, the ratio of the vertical change to
the horizontal change is m. But we also know that this is the slope between
two points! Therefore m is the slope of this line. You may have seen the
QED Monthly Volume 1 Alexander Katz Page 64

equation of a line represented as Ax + By = C for constants A, B, C. While


a perfectly valid form, we use the above (sometimes termed ”slope-intercept
form”) because it is much easier to work with. We will soon see why this is
the case.
Using our tools above, if we are given two points (x1 , y1 ) and (x2 , y2 ), we
can find the equation of the line between them:
y2 − y1
y = mx + b ⇐⇒ y = ·x+b
x2 − x1
for some constant b. Now we can plug in either point to determine b,
and we have the equation of our line! For example, let’s say that we wish
to find the equation of the line containing the points (3, 7) and (5, 13). We
first find the slope:

y2 − y1 13 − 7 6
m= = = =3
x2 − x1 5−3 2
Therefore our line is y = 3x + b for some b. Plugging in (3, 7) to this
equation gives 7 = 3(3) + b =⇒ 7 = 9 + b =⇒ b = −2. Thus the desired
line is y = 3x − 2.
Using these tools, we are able to dive into some problems. Note that
since translations and rotations rarely affect our problems, we can usually
assume that one of the given points is the origin and a given side length
runs along a coordinate axis. While not strictly necessary, this makes the
algebra significantly nicer.

Problem 1: Let ABCD be a rectangle such that AB = 6 and BC = 3.


Let E be the midpoint of AB, and F be the intersection of ED and AC.
Compute the length of AF .
Solution: Place the rectangle in the coordinate plane such that point D is
the origin, and CD lies on the x-axis. Because DA = 3 and AB = 6, we can
place A at (0, 3) (where else could we potentially place this? Does it change
anything?), B at (6, 3), and C at (6, 0). As E is the midpoint of AB, which
are situated at (0, 3) and (6, 3) respectively, we can also place E at (3, 3).
Now we have all the information we need. First let’s find the equation
of the line AC. The points on this line are (0, 3) and (6, 0), so the slope is
0−3
6−0
= − 21 . Thus y = − 12 x + b for some b. Plugging in either point gives
b = 3, so the equation of this line is y = − 12 x + 3. We also need to find
the equation of the line ED. We know that the points (3, 3) and (0, 0) are
on this line, so the slope is 0−3
0−3
= 1. The equation of the line is y = x + b
QED Monthly Volume 1 Alexander Katz Page 65

for some b, which turns out to be 0 after plugging in either point. Thus the
equation of the line ED is y = x.
To find the intersection point of these two lines, we simply note that both
equations must simultaneously hold. In particular, we must have y = x and
y = − 12 x + 3. This implies that x = − 12 x + 3 =⇒ 23 x = 3 =⇒ x = 2.
Putting this back in to either of the equations, y = 2. Thus point F lies at
(2, 2).
Finally, we can finish the problem.
p Since point A is at√(0, 3) and point
F is at (2, 2), the length of AF is (2 − 3)2 + (2 − 0)2 = 5.

Although the solution may seem relatively long compared to synthetic


ones, the advantage of this technique is that it requires almost no thinking.
Once the coordinates are set up, working through the equations becomes a
matter of simple computation. More difficult is determining when coordi-
nates are appropriate. The above problem was a prime candidate because:

• The problem had somewhat “random” points that had no obvious


synthetic relationship.

• The problem involved the intersection of lines, usually a big tip-off


that coordinates are a good method to use.

• Since the problem involved a rectangle, we knew that we could con-


veniently represent several of the points along the coordinate axes,
making the algebra very easy to deal with.

There are still several other important properties that we need to address.
Among the most important is dealing with perpendicular lines. Let’s say
that we already know the equation of a line l, and we want to find the
equation of a line m that goes through a specified point. Since there is only
one such line, we should theoretically be able to determine its exact equation
(in general, if there is only one possible value for something and we know
all the other variables, we should be able to determine the exact value of it.
However, this makes no guarantee that this value is workable!).
To do this, we can’t rely only on algebraic methods. As is typical when
using coordinates, we need to incorporate synthetic geometry ideas to make
the computations easier (or often even feasible!). Let us call the perpendic-
ular lines l and m. Let their intersection point be O. Pick arbitrary points
A and B such that A lies on l and B lies on m, and draw AB. We know
that ∠AOB = 90◦ . Drop an altitude from O to AB, meeting AB at C. We
QED Monthly Volume 1 Alexander Katz Page 66

thus know that ∠OCA = ∠OCB = 90◦ . We now have several equal angles,
so we begin to look for similar triangles. Fortunately, we don’t have to look
very far! We can easily find that BCO OCA, so CB OC
= OCAC
. But these
CB
quantities should seem quite familiar by now. Note that OC is precisely the
AC
slope of line m, while OC is the slope of line l. Well, almost. In fact, since O
lies “between” A and B, one of these quantities is actually negative (why?).
Therefore we have

lines m and l are perpendicular


1
⇐⇒ slope of line m = −
slope of line l
⇐⇒ mslope lslope = −1
In other words, if two lines are perpendicular, their slopes multiply to
−1. This is a very useful result, since if we know the equation of the first line
and the coordinates of the intersection point, we can determine the exact
equation of the second line.
Although coordinates often reduce problems to matters of rote compu-
tation, this does not mean that we should simply dive headlong into long
equations with lots of square roots and solve 8th degree equations. Testwrit-
ers are quite aware that coordinates have become a quite popular method to
deal with geometry problems, and as such have adjusted their problems to
avoid these types of solutions. Thus, especially in modern-day problems, we
need to combine coordinates with other observations to simplify the algebra.
For example, let’s examine two possible approaches to the following problem:

Problem 2: A line l passes through the points B(7, −1) and C(−1, 7). De-
termine the coordinates of the point P on this line such that P is equidistant
from the points A(10, −10) and O(0, 0) (that is, so P A = P O). Express your
answer as an ordered pair (a, b).
Solution: The first thing we need to do is determine the equation of the
line l. The slope is 7−(−1)
−1−7
= −1, so the equation of the line is y = −x + b.
Plugging in either point gives b = 6, so the equation of the line is y = −x+6.
Approach 1: From here, we could write the p point as (a, −a + 6). The dis-
tance
p from (a, −a+6) to the point (10, −10) is (10 − a)2 + (−10 − (−a + 6))2 =
2 2
p(10 − a) + (a − 16) . The distance from (a, −a + 6) to the point (0, 0) is
a2 + (−a + 6)2 . Equating these gives
p p
(10 − a)2 + (a − 16)2 = a2 + (−a + 6)2
QED Monthly Volume 1 Alexander Katz Page 67

=⇒ (10 − a)2 + (a − 16)2 = a2 + (−a + 6)2


=⇒ a2 − 20a + 100 + a2 − 32a + 256 = a2 + a2 − 12a + 36
=⇒ 40a = 320
=⇒ a = 8
Plugging this back in gives y = −a + 6 = −2, so the desired point is
(8, −2). Although this solution works perfectly well, we are still dealing
with elementary examples. Often it is not so simple to solve these types of
equations.
Approach 2: Let’s take a look at the points equidistant from A(10, −10)
and B(0, 0). It’s worth noting that the slope of the line between these points
is −1. First let’s look at an easy one - the midpoint of these points (5, −5).
Another easy one is (10, 0), as is (0, −10). You might notice that these 3
points all lie on a line. In fact, the slope of this line is 1, meaning that the line
is perpendicular to AB! Furthermore, since we already know our line goes
through (5, −5), it is actually the perpendicular bisector of AB. Proving
this rigorously is straightforward. Using our newfound knowledge, the slope
of the line containing the points equidistant from A and B is −1 −1
= 1, so it
is of the form y = x + b. Plugging in (5, −5) gives b = −10, meaning that
our line is y = x − 10. Thus the point on the line y = −x + 6 equidistant
from A and B occurs when y = x − 10 and y = −x + 6 simultaneously hold,
or x = 8. Proceed as above to get the final point.
The first solution may appear to require less work and insight, which is
true! But in more complicated problems synthetic observations ,such as re-
alizing the perpendicular bisector of AB contains all the points equidistant
from A and B, are necessary to avoid being bogged down in equations with
huge degree and many variables. Let’s try another problem:

Problem 3: ABC is a triangle such that AB = 7, BC = 24, and AC = 25.


Let I be the incenter of ABC and O be the circumcenter. Compute OI.
Solution: At first glance, this is hardly a problem for coordinates. As a
general rule, circles and coordinates don’t tend to mix (we’ll soon deal with
these). But using other geometric knowledge, we can drastically simplify
the algebra. First of all, since 72 + 242 = 252 we know that ABC is a right
triangle. This means that we can not only place B at the origin, but also A
at (0, 7) and C at (24, 0). Secondly, the area of the triangle is thus 7·24
2
= 84,
84 84
and so the inradius is s = 28 = 3. Draw the perpendiculars from I to AB
and BC meeting the lines at D and E respectively. Thus ID = IE = 3.
QED Monthly Volume 1 Alexander Katz Page 68

Furthermore, ∠DBE = ∠BEI = ∠BDI = 90◦ , so DBEI is a square. Thus


the incenter lies at (3, 3).
Now we need to deal with the circumcenter. Instead of pulling out messy
equations, we can note that the circumcenter of a right triangle is the mid-
point of its hypotenuse (this is a useful fact that is easy to prove but very
important), so the circumcetner of this triangle lies at (12, 27 ). Thus we can
q q q
2 7
compute the distance OI = (12 − 3) + ( 2 − 3) = 81 + 4 = 325
2 1
4
=

5 13
2
.
We’ll close by briefly touching on handling circles with coordinates. Just
like we can find the equation of a line given two points, we can find the
equation of a circle given the center and the radius. Let the center O be
(x1 , y1 ) and the radius be r. Pick a point X on the circle (x2 , y2 ). Let lx
be the line through O parallel to the x-axis. Drop an altitude from X to
lx , meeting the line at Y . Note that OY = x2 − x1 , and XY = y2 − y1 .
Furthermore, ∠XY O = 90◦ , and OX = r. Thus,
p
r= (x2 − x1 )2 + (y2 − y1 )2
⇐⇒ (x2 − x1 )2 + (y2 − y1 )2 = r
Recall that x1 and y1 are known to us, so this is the equation of our circle.
For example, a circle centered at the origin with radius 3 has equation

(x − 0)2 + (y − 0)2 = 32 ⇐⇒ x2 + y 2 = 9
√ √
so the points (0, 3), (3, 0), ( 2, − 7), and so on all lie on this circle.
This form tends to not be particularly useful, but in small diagrams it can
work quite well. We’ll do one quick problem:

Problem: Let γ be a circle with center O, and let B be a point on the circle.
Point P lies outside the circle such that P O ⊥ OB and P O equals the length
of the diameter of circle O. Compute PP B A
. (ARML 1999, paraphrased)
Solution: Let X be the center of circle O, and place it at the origin. Let r
be the radius of circle O. As P O ⊥ OB, we can assign P to lie on the x-axis
and B to lie on the y-axis. We also know that P O = 2r, so point P lies at
(2r, 0). As B lies on the circle, OB = r and so B lies at (0, r) (note that
we could also choose (−r, 0), but it makes no difference). Note that (where
mBP denotes the slope of BP )
y2 − y1 r−0 1 1
mBP = = = − =⇒ y = − x + b
x2 − x 1 0 − 2r 2 2
QED Monthly Volume 1 Alexander Katz Page 69

is the equation of the line BP . Plugging in (0, r) gives b = r, so the


equation of the line BP is y = − 21 x + r. Furthermore, the equation of the
circle O is x2 + y 2 = r2 . Plugging this in gives

1
x2 + (− x + r)2 = r2
2
5
=⇒ x2 − xr + r2 = r2
4
5
=⇒ x2 = xr
4
4
=⇒ x = r
5
Thus y = 35 r, and point A lies at ( 54 r, 35 r). We can now find AB =
q 2 2 q q 2 2
4 3 4 4
5
r − 0 + 5
r − r = r 5
, and AP = 5
r − 2r + 35 r − 0 =

r 95
q q
9 AP
r 5 , so AB = √ 4
= 94 = 32 .
r 5

Summary:
We introduced the application of Cartesian coordinates to geometry
problems, a tool that allows the user to avoid the cleverness and inspira-
tion necessary for many difficult geometry problems at the cost of difficult
and lengthy computations. Although many students will try this method on
nearly all geometry problems they come across, such an approach is unlikely
to succeed in today’s environment. Almost always, synthetic observations
are necessary to aid in the computations, or the equations will quickly be-
come unworkable. Recall the clues within a problem that suggests the use
of coordinates: right angles mean easier computations (since we can place
the right angle at the origin, thus taking advantage of the coordinate axes),
and lines work well. Circles are usually a sign that coordinates are not the
correct method, though we have ways to express those algebraically as well.

We now turn to a group of exercises, typically 10, designed to enhance the


reader’s understanding of the text by providing difficult challenges based on
the material in the article. Although many appear only to require a numer-
ical answer, the reader derives little benefit from “guessing” things about a
problem that seem to be intuitively true. For example, drawing a somewhat
accurate diagram is often enough to suggest a certain angle is right, or two
sides equal, and so on. Despite the fact that you may come up with the
QED Monthly Volume 1 Alexander Katz Page 70

correct answer with these types of educated guesses, learning to prove the
facts you notice is much more important.

Exercises:
Disclaimer: Almost all geometry problems are not intended to be solved
by coordinates. Thus you may likely see a purely synthetic solution, in which
case you’ve solved the problem “properly”. All of the problems below, how-
ever, have relatively ok coordinate solutions.
1. In 4ABC, ∠C is a right angle. Point M is the midpoint of AB,
point N is the midpoint of AC, and point O is the midpoint of AM .
The perimeter of 4ABC is 112 and ON = 25 2
. What is the area of
M N CB? (MATHCOUNTS)

2. A triangle had sides of length 10, 17 and 21 units. What is the radius
of its circumscribed circle? Express your answer as a common fraction.
(MATHCOUNTS)

3. Let 4ABC be an equilateral triangle. Point D lies on BC such that


2 · BD = CD. Point E lies on AB such that AE = ED. Then CE AC
can
be written as m
n
, where m and n are relatively prime positive integers.
Compute m + n.

4. Let ABCD be a rectangle with AB = 12 and BC = 5. Let I1 and I2


be the incenters of 4ABC and 4ADC respectively. Compute O1 O22 .

5. Let ABCD be a trapezoid with AB||CD. Let BF HC be the square


constructed on BC, and AEGD the one constructed on AD. Let M
be the midpoint of EF . Show that M A = M B. (MTQ 2013)

6. Let ABXC be a parallelogram. Points K, P, Q lie on BC in this order


such that BK = 13 KC and BP = P Q = QC = 13 BC. Rays XP
and XQ meet AB and AC at D and E, respectively. Suppose that
AK ⊥ BC, EK − DK = 9 and BC = 60. Find AB + AC. (OMO
2013-2014)

7. 4ABC is an equilateral triangle with side length 1. Point D lies on


AB, point E lies on AC, and points G and F lie on BC such that
DEF G is a square. What is the area of DEF G? (SMT 2012)

8. Let ABC be an isosceles triangle with AB = AC. Point D is the


foot of the perpendicular from A to BC, point E is the foot of the
QED Monthly Volume 1 Alexander Katz Page 71

perpendicular from D to AB, and F is the midpoint of DE. Show


that the lines AF and CE are perpendicular.

9. Prove that
√ p √ q
√ √ √ √ √ √
a + x + b + y + c + z ≥ ( a + b + c)2 + ( x + y + z)2

for positive reals a, b, c, x, y, z.

10. Let AC be a diameter of a circle ω of radius 1, and let D be a point


on AC such that CD = 51 . Let B be the point on ω such that DB is
perpendicular to AC, and E is the midpoint of DB. The line tangent
to ω at B intersects line CE at the point X. Compute AX. (HMMT
2005)
8

Number Theory 2

In our introductory article we introduced some basic facts about divisibility.


As a brief reminder, an integer a is divisible by an integer b iff there exists
a third integer c such that a = b · c. For example, 18 is divisible by 3,
because 18 = 3 · 6. Furthermore, this integer a is a multiple of b (thus 18
is a multiple of 3).
We can extend this definition to include the concept of remainders.
For any 2 integers a and b, there exist integers q and r such that 0 ≤ r < b
and

a=b·q+r
The integer q is the quotient, and the integer r is the remainder. When
r = 0, we have a = b · q and so a is divisible by b (and a is a multiple of b).
For example, if a = 19 and b = 5, we have 19 = 5 · 3 + 4.
We further extend this to the concept of modular arithmetic. There
are several ways to define this concept - we present two equivalent ones.
Definition 1: For integers a, b, c, we say that

a ≡ b (mod c)
iff a − b is a multiple of c.
Definition 2: We say that

a ≡ b (mod c)
if the remainder when dividing a by c is equivalent to the remainder
when dividing b by c.

72
QED Monthly Volume 1 Alexander Katz Page 73

First we show why these definitions are equivalent. Assume the second
definition holds, and let a = c · q1 + r1 and b = c · q2 + r2 . Then r1 = r2 , and
so a = c · q1 + r, b = c · q2 + r. Subtracting these equations gives

a − b = c · (q1 − q2 )
implying that a − b is a multiple of c. Reversing the process shows
that the first definition leads to the second definition, so the definitions are
equivalent.
If we consider c = 12, we have a formal expression for the familiar concept
of a 12-hour clock. 13 hours after 1 o’clock is not 14 o’clock, but rather 2
o’clock. Continuing with the clock analogy, if c = 60 we have a formal
expression for how minutes and seconds work. If we do something every
week, we are in effect taking c = 7.
So why is modular arithmetic useful, and how is it used in contests?
There are several useful properties of modular arithmetic (often referred to
as ”mods”). We present a few below:

1. If a ≡ b (mod x) and b ≡ c (mod x), then a ≡ c (mod x).

2. If a ≡ c (mod x) and b ≡ d (mod x), then a + b ≡ c + d (mod x).

3. If a ≡ c (mod x) and b ≡ d (mod x), then a · b ≡ c · d (mod x).

4. If a ≡ b (mod x) and a ≡ b (mod y), then a ≡ b (mod lcm(x, y)).

Proving these is generally a matter of writing out the definitions and


seeing where they take us. For example, in the first property, a ≡ b (mod x)
means that there exists an integer q1 such that a − b = q1 x, and b ≡ c
(mod x) means that there exists an integer q2 such that b − c = q2 x. Adding
these gives a − c = (q1 + q2 )x, and since q1 + q2 is an integer we have a ≡ c
(mod x) as desired. The second and third properties are proved in a similar
manner - they’re given as an exercise.
The fourth property is much more difficult to prove. It is also given as
a later exercise, but simply writing out the definitions is not sufficient by
themselves. Instead one should approach the problem by first proving it in
the case of x and y being relatively prime (e.g. have no common factors
other than 1), then using this to prove the result for all x, y.
We first examine a simple problem to illustrate how modular arithmetic
is used in simple cases:
QED Monthly Volume 1 Alexander Katz Page 74

Problem 1: January 1st, 2014 will be a Wednesday. What day will it be


on January 1st, 2015?
Solution: January 1st, 2015 is exactly 365 days after January 1st, 2014
(note that 2014 is not a leap year, otherwise the answer would be different!).
Furthermore,

7 | 365 − 1 = 364 =⇒ 365 ≡ 1 (mod 7)


so the day 365 days after January 1st, 2014 is the same as the day after
January 1st, 2014. Since January 1st, 2014 is a Wednesday, it follows that
January 1st, 2015 is a Thursday.

One might wonder how we knew offhand that 364 was a multiple of 7.
The simple answer is we didn’t! Instead we can use an iterative process,
using numbers that are ”obviously” multiples of 7. For example, you might
know that 350 is a multiple of 7 (if you don’t, subtract off a multiple you do
know such as 70), so

365 ≡ 365 − 350 = 15 (mod 7)


Now we should be able to tell just by intuition that 14 is also a multiple
of 7, so

365 ≡ 365 − 350 ≡ 15 ≡ 15 − 14 ≡ 1 (mod 7)


as desired. Note that we use property 2 repeatedly - since 350 is a mul-
tiple of 7, −350 is also a multiple of 7. Therefore, 0 ≡ −350 (mod 7) and
365 ≡ 365 (mod 7). Using property 2 gives 365 ≡ 365 − 350 (mod 7) as we
wanted. We also used property 1 in our second solution - since 365 ≡ 15
(mod 7) and 15 ≡ 1 (mod 7), we have 365 ≡ 1 (mod 7). If you’re just
learning about modular arithmetic for the first time, keeping careful track
of what properties you are using and when can make the process easier to
understand. Over time these ”rules” will become internalized, and you’ll be
able to rattle off computations without even having to think about how they
work.

Another class of common problems involves finding the last digit of an


exponential. For example, a typical problem might read

Problem 2: What is the last digit of 3100 ?


Solution: At first glance, this is a scary problem. As usual when we have
QED Monthly Volume 1 Alexander Katz Page 75

such a scary looking problem, we first look at small cases. For example, we
can find that the last digit of 31 is 3, the last digit of 32 is 9, the last digit
of 33 is 7 (since 33 = 27), the last digit of 34 is 1 (since 34 = 81), and so on.
At this point we can stop. By our third property, we have

34 ≡ 1 (mod 10) and 3n ≡ 3n (mod 10)

=⇒ 3n+4 ≡ 3n (mod 10)


Therefore,

3100 ≡ 396 ≡ 392 ≡ . . . ≡ 30 ≡ 1 (mod 10)


where we repeatedly use property 1.
In fact, this problem gives us a brief glance into the concept of order.
The order of an integer a and a modulus b is the smallest positive integer n
such that an ≡ 1 (mod b). Note that order does not necessarily exist! We’ll
come back to this concept in a later article.

What we really did in this problem is formalize a pattern that you could
have come across on your own. For example, if we had continued our search
to find 35 = 243, 36 = 729, 37 = 2187, 38 = 6561, we would have seen that
the last digits of 3n cycle 3, 9, 7, 1, 3, 9, 7, 1. This provides a good basis to
hypothesize that the last digit of 3100 is the same as the last digit of 34 ,
which we already know is 1. But using modular arithmetic gives us a way
not only to make this argument rigorous, but also to generalize to harder
problems.
Now we can expand to a slightly harder type of problem. By repeatedly
using property 3, we get that

a + c ≡ a (mod c) =⇒ (a + c)k ≡ ak (mod c)


So, for example, 520 ≡ 120 ≡ 1 (mod 4). Now let’s consider a problem:

Problem 3: Let x be an integer. What remainders are possible when x2 is


divided by 4?
Solution: Because (x + 4k)2 ≡ x2 (mod 4), we only need to check the cases
when x = 0, x = 1, x = 2, and x = 3. We can do this easily: 02 = 0 ≡ 0
(mod 4), 12 = 1 ≡ 1 (mod 4), 22 = 4 ≡ 0 (mod 4), and 32 = 9 ≡ 1
QED Monthly Volume 1 Alexander Katz Page 76

(mod 4). Thus the only remainders possible are 0 and 1 .

This gives us a glimpse into the field of quadratic residues and the
more general power residues. For example, since x2 only takes on the
remainders 0, 1 in mod 4, we can make a simple observation about an oth-
erwise difficult-looking problem:

Problem 4: A Modified Pythagorean triple is a triple of three numbers


a, b, c such that

a2 + b 2 = c
Does there exist a modified Pythagorean triple with c = 9283?
Solution: No. Taking the equation (mod 4) gives

a2 + b 2 ≡ c 2 (mod 4)
now a2 ≡ 0 or 1 (mod 4) and b2 ≡ 0 or 1 (mod 4), so a2 +b2 ≡ 0 or 1 or 2
(mod 4). Since 9283 ≡ 3 (mod 4), we cannot have a2 + b2 = 9283.

We use the same ideas to tackle an AIME problem:

Problem 5: How many integers from 1 to 1000 can be expressed as the


difference of two nonnegative perfect squares?
Solution: Let n = a2 − b2 . We want to find the number of n from 1 to 1000
for which there exist some a, b satisfying the equation.
As before, take the equation in (mod 4). Then

n ≡ a2 − b 2 (mod 4)
Because a2 ≡ 0 or 1 (mod 4) and b2 ≡ 0 or 1 (mod 4), a2 −b2 ≡ 0 or 1 or 3
(mod 4). In particular, a2 − b2 cannot be 2 (mod 4).
We still have to check that every n ≡ 0, 1, 3 (mod 4) has a solution.
If n ≡ 0 (mod 4), then there exists a k such that n = 4k. Note that
(k + 1)2 − (k − 1)2 = 4k, so for every n ≡ 0 (mod 4) there exist appropriate
a, b. Similarly, (2k)2 − (2k − 1)2 = 4k − 1 ≡ 4k + 3 and (2k + 1)2 − (2k)2 =
4k + 1. Thus our answer is 250 + 250 + 250 = 750 .

Summary:
Up until AIME level, most of competition Number Theory amounts to
“set up the modular arithmetic and just do it”. Although a natural extension
QED Monthly Volume 1 Alexander Katz Page 77

of the concept of divisibility, this is another skill that many students oddly
don’t master until well into their competitive “careers”. Knowing which
moduli are useful for which types of problems is essential, and knowing how
to manipulate modular equations is just as important. Learning how to do
this quickly and efficiently will often result in quick solutions to problems
both at the beginnings and ends of tests, often without even needing any
difficult thinking whatsoever. The basics are illustrated in this article, but
as we see even the basics can be successfully used to approach even olympiad
problems.

What follows are a series of exercises, typically 10, designed to enhance


the student’s understanding of the concepts illustrated. Many of the ex-
ercises are intentionally vague (e.g. what do you notice...), expecting that
the reader will derive the maximum benefit through their own struggles and
exploration.

Exercises:

1. Prove the second and third properties from the beginning of the article.
In particular, if a ≡ b (mod x) and c ≡ d (mod x), prove that

a + c ≡ b + d (mod x)

and

a · c ≡ b · d (mod x)

2. This one isn’t a mod problem - for integers a, b prove that

gcd(a, b) · lcm(a, b) = ab

where gcd(a, b) is the greatest common divisor of a and b and lcm(a, b)


is the least common multiple of a and b.
3. If a ≡ b (mod c) and a ≡ b (mod d), show that

a≡b (mod lcm(c, d))

First show that if a | x and b | x where a, b are relatively prime integers,


then ab | x. Use this and the previous exercise to finish the problem.
QED Monthly Volume 1 Alexander Katz Page 78

4. A band is attempting to form itself into a rectangle. When they divide


themselves into rows of 6 people, there is 1 person left over. When they
divide themselves into rows of 8 people, there are 3 people left over.
What is the smallest number of members the band might have?

5. A Pythagorean triple is a triple of integers (a, b, c) such that a2 +b2 = c2 .


Show that at least one of a, b, c is a multiple of 2, at least one of a, b, c is
a multiple of 3, and at least one of a, b, c is a multiple of 5. A primitive
Pythagorean triple is a triple of integers (a, b, c) such that a2 + b2 = c2
and gcd(a, b, c) = 1. Show that exactly one of a, b, c is even.

6. If we examine the last digit of powers of 2, we discover that they cycle


2, 4, 8, 6, 2, 4, 8, 6, etc. If we do the same for powers of 3, we discover
that they cycle 3, 9, 7, 1, 3, 9, 7, 1, etc. Show that the last digit of
powers of n is periodic with length 4 (e.g. cycles every 4 terms). More
formally, show that

nk+4 ≡ nk (mod 10)

for all n. Note if a sequence is periodic with length 1 or 2, it is also


periodic with length 4.

7. Find, with proof, all integers n such that

n
32 + 22

is a perfect square.

8. In the article, we noted that x2 can only be equivalent to 0 or 1 when


taken modulo 4. As such, we say that 0, 1 are the quadratic residues
modulo 4.
What are the quadratic residues modulo 3? 5? 6? When trying to
prove things about squares, which ones seem most useful?

9. We can extend the concept above to power residues. For example,


03 ≡ 0 (mod 3), 13 ≡ 1 (mod 3), 23 ≡ 2 (mod 3). Therefore, 0, 1, 2
are the cubic residues modulo 3. Note that this is not generally very
helpful when trying to prove things about problems involving cubes,
since this is equivalent to saying x3 can take any valid residue modulo
3.
QED Monthly Volume 1 Alexander Katz Page 79

Which moduli (plural of modulus) seem most useful when dealing with
cubes? For example, if you were given the problem:
“Prove there do not exist a, b such that a3 + b3 = 9431843?”
which modulus would you use to conveniently solve the problem?

10. Find, with proof, all positive integers n for which 2n + 12n + 2011n is
a perfect square. (USAJMO 2011)
9

Algebra 3

Inequalities are an exception to the usual olympiad classification scheme


of Algebra, Geometry, Number Theory, and Combinatorics, as they appear
so often in Olympiads that they are often considered their own category.
However, we generally associate them as a sub-branch of Algebra. As we
will see, they share many of the same ideas.
Inequalities involve trying to demonstrate that some function in given
variables is greater than (or, more often, at least) another function in the
same variables for all choices of these variables. For example, a classic in-
equality is

Example: Prove that

a2 + b2 + c2 ≥ ab + bc + ac

for all reals a, b, c.

We will see how to approach this problem later on.


Most inequalities deal with the positive reals. Some inequalities have an
additional condition, such as a + b + c = 3. We will see how to handle such
conditions in a future article.
We begin by finding (and proving!) some basic inequalities. Most more
complicated inequalities can be tackled by understanding them.
The trivial inequality states x2 ≥ 0 for all reals x. We call this the
Trivial Inequality because it is obvious, but do not let this fool you into
underestimating its value. In fact, the trivial inequality is one of the most
useful.

80
QED Monthly Volume 1 Alexander Katz Page 81

The proof of this is, unlike most inequalities, very straightforward. If x


is positive, then clearly x2 > 0, and if x is negative the same holds. When
x is neither positive nor negative, e.g. 0, we have x2 = 0. Thus, we say that
equality occurs at x = 0. Finding when equality occurs is occasionally
important when solving inequalities, and finding equality cases provides a
good clue as to which inequalities might be helpful in solving the problem.
As an example of how the trivial inequality is used, we demonstrate a
case of the AM-GM inequality, shown here in 2 positive real variables a
and b.

Theorem:
a+b √
≥ ab
2

We call this AM-GM because the left hand side (referred to as ”LHS”)
is the arithmetic mean, or average, of the variables, while the RHS (guess
what this means?) is the geometric mean of the variables.
We can prove this in elementary fashion as follows:

Proof:
a+b √
≥ ab
2

⇐⇒ a + b ≥ 2 ab

⇐⇒ a − 2 ab + b ≥ 0
√ √
⇐⇒ ( a − b)2 ≥ 0
which is true by the Trivial Inequality.
We extend this to the general AM-GM inequality, where a1 , a2 , . . . , an
are positive real numbers:
a1 + a2 + . . . + an √
Theorem (AM-GM): ≥ n a1 a2 . . . an
n

Note that the LHS is the arithmetic mean of n variables, while the RHS is
the geometric mean of n variables.
Proving this inequality is difficult, but many different approaches exist.
We present the celebrated Cauchy’s proof, due to its beauty, but acknowl-
edge that it is a particularly difficult proof to come up with. This proof
QED Monthly Volume 1 Alexander Katz Page 82

utilizes an abnormal type of induction. It is also possible to prove AM-GM


with a more typical type of induction, which we suggest the reader attempt.

Proof: We proceed by induction. Note that we proved the base case, n = 2,


above. We first prove that the statement is true for all n = 2k . Assume the
statement is true for n = 2k−1 . Then,
a1 + a2 + . . . + a2k
2k
1 a1 + a2 + . . . + a2k−1 a2k−1 +1 + a2k−1 +2 + . . . + a2k
= ( + )
2 2k−1 2k−1
1 √ √
≥ ( 2k−1 a1 a2 . . . a2k−1 + 2k−1 a2k−1 +1 a2k−1 +2 . . . a2k )
2

≥ 2k a1 a2 . . . a2k
where the last step follows from 2-variable AM-GM.
Now we show that if the statement is true for n = k, then it is true for
n = k − 1. If the statement is true for n = k, it is true for any a1 , a2 , . . . , ak .
We cleverly choose ak = a1 +a2k−1
+...+ak−1
. It will be clear in a moment why we
do so. We now have

a1 +a2 +...+ak−1 r
a1 + a2 + . . . + ak−1 + k−1 a1 + a2 + . . . + ak−1
≥ k a1 a2 . . .
k k−1
r
a1 + a2 + . . . + ak−1 a1 + a2 + . . . + ak−1
⇐⇒ ≥ k a1 a2 . . . ak−1 ( )
k−1 k−1
a1 + a2 + . . . + ak−1 k a1 + a2 + . . . + ak−1
⇐⇒ ( ) ≥ a1 a2 . . . ak−1 ( )
k−1 k−1
a1 + a2 + . . . + ak−1 k−1
⇐⇒ ( ) ≥ a1 a2 . . . ak−1
k−1
a1 + a2 + . . . + ak−1 √
⇐⇒ ≥ k−1 a1 a2 . . . ak−1
k−1
as desired.
It is now clear why we chose ak = a1 +a2k−1 +...+ak−1
, as we wanted the LHS to
be the arithmetic mean of a1 , a2 , . . . ak−1 . Note, of course, that this proof is
likely not found by “working forwards” as the solution demonstrates. More
likely, we “work backwards” by beginning with what we are trying to prove
and attempting to reach, by reversable steps, something we are given.
QED Monthly Volume 1 Alexander Katz Page 83

Therefore, the induction is complete and the statement is true for all n.

The AM-GM inequality is one of the most useful inequalities in our ar-
senal. Below, we use it to tackle problems of increasing difficulty (in each,
we assume we work over the positive reals)

Problem 1: Prove that the sum of a positive real number and its reciprocal
is at least 2.
Solution: Let this number be a. Thus, we want to prove a + a1 ≥ 2. But
a+ 1
q
from AM-GM we have 2 a ≥ a · a1 =⇒ a + a1 ≥ 2, as desired.

Oftentimes we combine multiple inequalities using AM-GM, combining


them to give a desired result. As a basic example,

1
Problem 2: Prove that ab + ab ≥ 2.
Solution: We can use AM-GM directly, or we can use another approach.
Remember from Problem 1 that a + a1 ≥ 2, thus b + 1b ≥ 2. Multiplying
1 1
these gives ab + ab + 2 ≥ 4, so ab + ab ≥ 2.

And as a more complex example,

Problem 3: Prove that (a + b)(b + c)(a + c) √ ≥ 8abc. √ √


Solution: Note that, by AM-GM, a+b ≥ 2 ab, b+c ≥ 2 bc, a+c ≥ 2 ac.
Multiplying the 3 inequalities gives the result.

Problem 4: Prove that a3 − ab2 − a2 b + b3 ≥ 0.


Solution: Dividing by a+b, we get (a2 −ab+b2 )−ab ≥ 0 ⇐⇒ a2 −2ab+b2 ≥
0 ⇐⇒ (a − b)2 ≥ 0, which is true by the trivial inequality.

In the above example, we see the use of simplifying expressions to get a


more workable form. In the next, we see the use of expanding them.

Problem 5: Prove that (a + b)( a1 + 1b ) ≥ 4.


Solution: Expanding, we get ab + ab + 2 ≥ 4 ⇐⇒ ab + ab ≥ 2, true
by AM-GM. We could q also use AM-GM on each term directly, getting
√ 1 1 1
a + b ≥ 2 ab, a + b ≥ 2 ab . Multiplying gives the desired result.

We now demonstrate the Cauchy-Schwartz inequality. Given any real


QED Monthly Volume 1 Alexander Katz Page 84

numbers (note that we do not require them to be positive!) a1 , a2 , . . . , an , b1 , b2 , . . . , bn ,


we have

Theorem (Cauchy-Schwartz): (a21 + a22 + . . . + a2n )(b21 + b22 + . . . + b2n )

≥ (a1 b1 + a2 b2 + . . . + an bn )2
a1 a2 an
with equality iff b1
= b2
= ... = bn

We omit the proof here, encouraging the reader to make an attempt. Ad-
vanced readers familiar with vectors may recognize these summations. For
these readers, we suggest a geometric approach, and ask what the geometric
interpretation of the equality case is.
The best way to illustrate Cauchy-Scwartz is to delve into some examples
below. Note that oftentimes we are required to be extremely clever in our
solutions. Mostly we need to choose the appropriate ai , bi to achieve a desired
sum.
We begin with a direct application to solve a previous inequality:

Problem 6: Prove that (a + b)( a1 + 1b ) ≥ 4. Note that this is the same as


P5.
Solution: By Cauchy-Schwartz (often simply abbreviated to ”Cauchy”),

1 √
r r
1 1 √ 1 2
(a + b)( + ) ≥ ( a · + b· ) = 22 = 4
a b a b
as desired.

Now we move on to a much more difficult problem.

Problem 7: Suppose x2 +y 2 = 14x+6y +6. What is the maximum possible


value of 3x + 4y?
Solution: We rearrange the equation to get (x − 7)2 + (y − 3)2 = 64. Now,
by Cauchy, we get

(x − 7)2 + (y − 3)2 (32 + 42 ) ≥ (3(x − 7) + 4(y − 3))2




or
64 · 25 ≥ (3x + 4y − 33)2
⇐⇒ 40 ≥ 3x + 4y − 33
QED Monthly Volume 1 Alexander Katz Page 85

⇐⇒ 73 ≥ 3x + 4y.
Thus, 73 is the greatest possible value.
So now we’re done with this problem, right? Wrong. We also need to
show that this bound is attainable, or that there actually exist numbers
x, y such that 3x + 4y = 73. Fortunately, we use the equality case to get
x−7
3
= y−3
4
, and plugging this back in does indeed give a solution. Always
remember that it is necessary to check the bound in similar cases, as it is
not at all rare to erroneously conclude that some number is the maximum
(or minimum) when there isn’t actually a way to attain it.

We could go through many more examples, but the best way to learn
is to struggle with problems on your own. Thus we provide some exercises
below. Please note that unlike our lower-level series, these exercises are very
difficult in relation to the text. Additionally, these exercises are very rarely
of the form ”What do you notice...”, as we expect that the serious stu-
dent who has reached this level will explore generalizations and extensions
without prodding. Full solutions, as would be written on an Olympiad, are
expected, or at least an outline of how to write such a rigorous solution. In
other words, show all necessary steps.

Summary:
Inequalities are very much contained to their own subject, but they come
up in some form on all levels of competition. Any type of maximation or
minimization problem is usually motivated by inequalities in (often not-so-
subtle) disguise. Although more of an olympiad level topic, inequalities have
been known to be used on several short-answer contests, even including the
AMC 12. The most basic and important inequalities in our arsenal are
the AM-GM inequalities and the Cauchy-Schwartz inequality, which solve
a great deal of problems seemingly effortlessly. Although, as we shall see,
they are not the only tools for dealing with inequality problems, a mastery
of their use will be sufficient to approach all but the hardest inequalities.

Exercises:

1. Prove the first inequality we spoke of; e.g. prove that

a2 + b2 + c2 ≥ ab + bc + ca.

When does equality hold?


QED Monthly Volume 1 Alexander Katz Page 86

2. Prove that
a2 b2 c2 d2
+ + + ≥a+b+c+d
b c d a
for reals a, b, c, d.
3. a, b, c are positive reals such that abc = 1. Show that a2 + b2 + c2 ≥
a + b + c.
4. Let x be a positive real number. Find the minimum value of x2013 + 2013
x
.
5. Prove that
a1 + a2 + . . . + an n
≥ 1 1 1
n a1
+ a2
+ ... + an

for positive real numbers a1 , a2 , . . . , an . This is known as the AM-HM


inequality. and that
r
a21 + a22 + . . . + a2n a1 + a2 + . . . + an

n n
for positive real numbers a1 , a2 , . . . , an . This is known as the QM-
AM inequality, or sometimes the RMS-AM inequality. If we can
also show the GM-HM inequality, we can combine these to give the
QM-AM-GM-HM inequality chain.
6. Let a, b, c be positive reals such that a + b + c = 1. Prove that
r

r r
a a b b c c 1−a 1−b 1−c
+ + + + + + 6 ≥ 2 2( + + )
b c a c a b a b c
(JBMO 2012 #1)
7. Prove that
a21 a22 a2 (a1 + a2 + . . . + an )2
+ + ... + n ≥
b1 b2 bn b1 + b2 + . . . + bn
This is known as Titu’s Lemma or Engel form.
8. Let a, b, c, d, e be reals such that
a+b+c+d+e=8
a2 + b2 + c2 + d2 + e2 = 16
Find the maximum possible value of e. (USAMO 1978)
QED Monthly Volume 1 Alexander Katz Page 87

9. For real numbers a, b, c, prove that


a b c
+ + ≥1
b + 2c c + 2a a + 2b
(International Zhautykov Olympiad 2005)

10. Let a, b, c be positive real numbers. Prove that

a3 + 3b3 b3 + 3c3 c3 + 3a3 2


+ + ≥ (a2 + b2 + c2 ).
5a + b 5b + c 5c + a 3
(USAJMO 2012 #1)
10

Combinatorics 3

Induction is one of the most important tools in mathematics, finding ap-


plications not only in Combinatorics but also in Algebra, Number Theory,
and even Geometry. Induction, loosely speaking, demonstrates the truth of
a statement for a base case, or small example, and then utilizes a type of
recursion to extend this to all values for which the statement is defined (or
makes sense). The most common use of induction is to prove a statement
for all positive integers. For example, induction is used in the rigorous proof
of a familar statement:

n(n+1)
For all n, the sum of the first n positive integers is 2
.

We first explain what, in a sense, induction is. Imagine an infinite amount


of dominoes lined up in a straight line. If we want to knock down all these
dominos, we don’t need to tip over each domino individually. Rather, as-
suming some conditions hold, we can tip over only the first domino. This
will cause the remaining dominos to fall as well. However, this only happens
if the dominos are sufficiently ”close” to each other. Coming back to math-
ematical terms, the first step is proving a base case, or the existence of the
first domino. Usually this is a small example that is either self-evident or
easily computable. The second step, the inductive step, is proving that
each domino is within knocking distance of each other. This involves a sim-
ilar technique to recursion: reduce a problem to a smaller one. These form
the basis for all forms of induction, the first of which is described below.
The most basic form of induction is Simple Induction. This form of
induction uses one base case, and proves that any case of the problem fol-
lows by using only the previous case. For example, let’s look at the problem

88
QED Monthly Volume 1 Alexander Katz Page 89

given earlier in this article.

Problem 1: Prove that the sum of the first n positive integers is n(n+1)
2
.
Solution: We will proceed by induction. The first thing we need to do is
demonstrate a base case. In other words, we need to show that the statement
is true for some value. We choose n = 1. Clearly the sum of the first integer
is 1 = 1(1+1)
2
, as desired. Thus the base case is true, and we know the
statement is true for n = 1.
We now proceed with the inductive step. Assume that the statement is
true for some n = k > 0. In particular, assume that for some k we have
1 + 2 + . . . + k = k(k+1)
2
. We already know that this is true when k = 1.
Given this, we will attempt to prove that the statement is true for the case
n = k + 1. In other words, we wish to show that:

(k + 1)(k + 2)
1 + 2 + 3 + . . . + (k − 1) + k + (k + 1) =
2
However, by the inductive hypothesis we know that the statement is true
when n = k. In other words, we know that

k(k + 1)
1 + 2 + 3 + . . . + (k − 1) + k =
2
Plugging this in, we need only show that

k(k + 1) (k + 1)(k + 2)
+ (k + 1) =
2 2

k(k + 1) k(k + 1) 2(k + 1)


⇐⇒ + (k + 1) = +
2 2 2
k(k + 1) + 2(k + 1) (k + 2)(k + 1)
= =
2 2
which is clearly true. We now know that if the statement is true for n = 1
(which it is), then it is true for n = 2. Similarly, if the statement is true for
n = 2 (which it is), it is also true for n = 3. Continuing this ad infinitum,
the statement is true for all n. 
Every simple induction proof follows more or less the same format. We
first state that we are proceeding by induction, demonstrated that the base
case is true (in this case n = 1), and then showed that for any k > 0, the
k th case implies the k + 1th case. Thus, n = 1 implies n = 2, n = 2 implies
n = 3, and so on. In general, finding the appropriate base case is very easy.
QED Monthly Volume 1 Alexander Katz Page 90

Most statements are self-evident or easy to computationally verify for small


values. It’s determining the method of executing the inductive step that is
the difficult part.
Below we demonstrate another classic example, the difficulty of which is
usually associated with the Olympiad level.

Problem 2: For all n > 0, show that one can always tile a 2n × 2n grid of
squares that has one corner square removed with L-ominos (e.g. a 2 × 2 grid
of squares with a corner removed)
Solution: We will proceed by induction, clearly labeling our steps for illus-
trative purposes.

Base Case: n = 1 By the statement, this implies that we have a 2 by 2


board with one corner missing. This can easily be tiled by Ls as the remain-
ing shape is a L itself.

Inductive Step:
Assume that the statement is true for some k. We will now attempt
to prove that the statement is true for k + 1. In other words, we need to
show that we can tile a 2k+1 by 2k+1 board that has a corner missing with
L-ominos. Divide the board into 4 pieces by drawing both lines of symmetry.
This results in three 2k × 2k boards, and one 2k × 2k board with a corner
removed. Note that these 4 boards intersect at the center of the original
2k+1 × 2k+1 board. Furthermore, note that there are 4 unit squares which
surround this point. Now, place an L-omino on 3 of these 4 unit squares
such that the square that is left uncovered by the L-omino is part of the
2k by 2k board that is missing a corner. Each of the resulting 4 boards are
2k ×2k boards with one corner removed, and thus can be tiled with L-ominos
by the inductive hypothesis. Hence, the original 2k+1 × 2k+1 board can be
tiled with L-ominos, completing the induction. This proves the statement.

This exercise was very similar to the previous one. We established a
base case, then proved that for any k, k implies k + 1. However, making the
inductive step work required a great deal of intuition and work. This holds
true for the majority of Olympiad induction problems. After reading the
above solution a couple of times, try repeating the problem with the phrase
“one corner missing” replaced by “one square missing (not necessarily a
corner)”.
We now introduce a second form of induction, often found in Olympiad
QED Monthly Volume 1 Alexander Katz Page 91

induction problems. This form is called Strong Induction. While simple


induction uses the case n = k to prove the case n = k + 1, strong induc-
tion might use any or even all of the cases n = 1, 2, . . . , k to prove the case
n = k + 1. This occasionally involves establishing multiple base cases. Be-
sides this major difference, all else is essentially the same. We provide an
elementary example of how strong induction is used.

Problem 3: The game ”Last Stick” is played between two players. The
game begins with 2 piles of sticks, each of which contains the same num-
ber of sticks. The first player then removes any positive number of sticks
from either pile. The second player does the same. This continues, with the
players taking turns removing sticks. The winner is the player that removes
the last stick. Show that, assuming both players play optimally, the second
player will always win.

Proof: We will proceed by strong induction on the number of sticks in each


pile. We claim that the second player will always win with the following
strategy: Choose the pile that player 1 did not pick on his previous turn,
and remove the same amount of sticks as player 1 did on his previous turn.
For example, if player 1 removed 2 sticks from the 1st pile, the second player
should remove 2 sticks from the second.

Base Case: Choose n = 1. Whichever pile the first player chooses, the
second player will remove the other pile, which removes the final stick (and
follows our strategy above), winning.

Inductive Step: Assume that the statement is true for all 1 ≤ i ≤ k.


We need to prove that the statement is true for n = k + 1. If the first
player removes all k + 1 sticks in a pile, the second player removes all the
k +1 remaining sticks, thus winning. Otherwise, assume that the first player
removes x sticks from a pile. Then, the second player follows our strategy
and removes x sticks from the opposite pile. This results in k + 1 − x sticks
in each pile, which falls between 1 and k as 1 ≤ x ≤ k. We have reduced the
problem to the case when n = k + 1 − x and it is the first player’s turn. By
the inductive step, the second player is winning from here, so the original
position must be winning as well.
Therefore, the second player will always win. 
As we can see, induction is a very powerful and useful tool not only in
combinatorics, but in all areas of math. However, to use induction effectively,
QED Monthly Volume 1 Alexander Katz Page 92

we must proceed with caution, and have a fundamental understanding of the


induction concept.
One common pitfall is to use an incorrect base case. For example, con-
sider the statement ”All horses are the same color”. This is, of course,
ridiculous, yet we provide a “proof” below:
We proceed by induction.

Base Case: n = 1
f there is only one horse in the ”group”, then clearly all horses in the group
have the same color.

Inductive step: Assume that k horses are always the same color for some
n = k. Consider a group consisting of k + 1 horses. First, exclude the
last horse and look only at the first n horses. By the inductive hypothesis,
all these horses are the same color. Likewise, exclude the first horse and
look only at the last n horses. These too, must also be of the same color.
Therefore, the first horse in the group is of the same color as the horses in
the middle, who in turn are of the same color as the last horse. Hence the
first horse, middle horses, and last horse are all of the same color, and we
have proven that all k + 1 horses are the same color.
The induction is complete, and thus all horses must be the same color.
.
However, the flaw in this proof is the base case itself. When we attempt
to apply the method used in the inductive step to n = 2, we see that there
are no middle horses to apply the transitive property to. In particular, the
statment “Therefore, the first horse in the group is of the same color as the
horses in the middle, who in turn are of the same color as the last horse.”
is false for n = 2. This makes our inductive step faulty. Indeed, our base
case should actually be n = 2. If the statement ”any 2 horses are the same
color” were true, then our proof would be completely correct. However, this
statement is false (consider any two horses of different color), thus our proof
is faulty.
Like many advanced techniques, there is much more to say about the
subject. But, also like most advanced techniques, the best way to learn how
to properly apply them is to work on problems by yourself. Thus we close
the article with a few tips, and move to our exercises section.

• If you are using induction on a problem, always start your proof by


QED Monthly Volume 1 Alexander Katz Page 93

stating this. The term “We proceed by induction on (whatever vari-


able)” is fairly standard and quite sufficient.
• Your base case is not necessarily n = 1. Oftentimes a problem will
only lend itself to induction for sufficiently large n (for example, n ≥ 3
might be necessary for an equation to make sense), in which case you
need to change your base case. You may even require multiple base
cases. For example, if you are splitting the induction into cases based
on the parity of n, you should prove the base cases n = 1 and n = 2
(or similar).
• It is not always obvious what we want to induct on. For example,
if we want to prove something about an equation with two variables,
we could potentially choose either one to induct on. Identifying the
correct one is just as important as the rest of the proof. The target is
not even always this obvious - we could induct on things such as the
degree of a polynomial or the sum of the numerator and denominator
of a fraction. We do, however, always need to induct on an integer.

Summary:
Induction is an extremely powerful tool in mathematics, but it is also
one of the most difficult to conceptually visualize. One way to interpret it
is as a method to “formalize” patterns that appear to be self-evident. For
this reason, many students without notable experience in proofs are either
unfamiliar with or do not know how to properly utilize induction. As such,
induction has become a favorite of Olympiad problem writers all over the
world.

Below we present a list of exercises. Please note that unlike our lower-
level series, these exercises are very difficult in relation to the text. Addi-
tionally, these exercises are very rarely of the form ”What do you notice...”,
as we expect that the serious student will attempt extensions without prod-
ding. Full solutions, as would be written on an Olympiad, are expected.

Exercises:

1. Show that the sum of the angles in any n-gon (e.g. a polygon with n
sides) is equal to π(n − 2) radians, which is equivalent to 180(n − 2)
degrees.
2. Prove the following (well-known) formulas:
QED Monthly Volume 1 Alexander Katz Page 94

n(n+1)(2n+1)
• 12 + 22 + . . . + n2 = 6
n2 (n+1)2
• 13 + 23 + . . . + n3 = 4
= (1 + 2 + . . . + n)2
6n3 −3n2 −n
• 12 + 42 + 72 + . . . + (3n − 2)2 = 2

3. Prove the following binomial identities algebraically (using induction,


of course). Bonus points for coming up with a combinatorical expla-
nation, but we will get to these arguments in the future.
     
n n−1 n−1
• = +
k k−1 k
        X n  
n+1 n n−1 k i
• = + + ... + =
k+1 k k k i=k
k
• Let Fn be the nth Fibbonacci number. Show that
     
n−1 n−2 n−3
Fn = + + + ...
0 1 2
 
a
(note that = 0 if a < b)
b
4. Let n be a positive integer. Prove that
1 1 1 1 2n
+ + ... + + ≥ .
n+1 n+2 2n − 1 2n 3n + 1

5. Let f (n) be the number of ways to write n as a sum of powers of


2, where we keep track of the order of the summation. For example,
f (4) = 6 becuase 4 can be written as 4, 2+2, 2+1+1, 1+2+1, 1+1+2,
and 1 + 1 + 1 + 1. Find the smallest n greater than 2013 for which
f (n) is odd. (USAJMO 2013)

6. Let Fn be the Fibbonacci sequence, defined by F1 = F2 = 1 and


Fn = Fn−1 + Fn−2 for n ≥ 3. Show that every positive integer can be
written as the sum of distinct Fibbonacci numbers.

7. We can show that

1 3 2n − 1 1
· · ... · <√
2 4 2n 2n
QED Monthly Volume 1 Alexander Katz Page 95

by the following clever argument:


 2
1 3 2n − 1
· · ... ·
2 4 2n

1 2 3 2n − 1 1
< · · · ... =
2 3 4 2n 2n
but this is clearly not a very strong bound. Show that we can get the
stronger bound

1 3 2n − 1 1
· · ... <√ .
2 4 2n 3n + 1
8. Prove Bernouilli’s Inequality: If x ≥ −1 then (1 + x)n ≥ 1 + nx for all
nonnegative integers n.

9. Show that, for n > 2,

1 1 1
2
+ 2 + ... + 2 < 2
1 2 n
1 1 π2
(Do not use the fact that + + . . . = . That’s cheating!)
12 22 6
10. Show that
v s
u r

u q
t
1 + 2 + 3 + ... + n < 3

for all positive integers n.


11

Geometry 3

Especially in more difficult Geometry problems, it is almost impossible to


get by without a strong knowledge of angles and their relationships. We
use the term “angle chasing” to refer to the method of assigning a variable
to some unknown angle and filling in as many angles as we can in terms of
this variable (or variables). This may be as simple as filling in 180 − x for a
supplementary angle, but usually we require more insight.
We have already seen the strong relationship between angles and par-
allel lines. In fact, this relationship is so powerful that we often draw in
parallel lines solely to take advantage of this. But perhaps not as obvious is
the relationship between angles and circles. One famous theorem states the
following:

Theorem: Let AB be a diameter of circle O, and C be an arbitrary point


on the circle. Then ∠ACB is right.
Proof: Because A, B, C all lie on the circle, we have OA = OB = OC as
each are radii. Therefore ∠OAC = ∠OCA and ∠OBC = ∠OCB. Since
AB is a diameter, ABC is a triangle and so

∠ABC + ∠BCA + ∠CAB = 180◦


= ∠ABC + ∠BCO + ∠OCA + ∠CAB = 180◦
=⇒ 2(∠BCO + ∠OCA) = 180◦
=⇒ ∠BCO + ∠OCA = 90◦
=⇒ ∠ACB = 90◦ .

96
QED Monthly Volume 1 Alexander Katz Page 97

Although this is quite a useful theorem, its scope is very limited. It is


rare when working on problems that we find a diameter of a circle. Let’s see
if we can’t extend this a bit. Here we see our first example of angle chasing.
For convenience, we deal in degrees (and omit the ◦ when the intent is clear).
Let’s let ∠ABC = x. Because OB = OC, we also know that ∠OCB = x.
We already proved above that ∠ACB = 90◦ , so ∠OCA = 90 − x. Since
OC = OA, we also have ∠OAC = 90 − x. Finally, we can fill in the
only remaining angles. As the angles of a triangle add up to 180◦ , we have
∠COB = 180 − 2x and ∠COA = 2x.
At first glance, nothing about this diagram seems interesting. But we
may notice that ∠COA = 2x = 2∠CBA, and ∠COB = 180 − 2x =
2(90 − x) = 2∠CAB. This foreshadows the general case. At this point
we can make a reasonable conjecture:

Conjecture: Let A, B, C be points on circle O. Then ∠AOB = 2∠ABC,


and a similar result holds for the other angles.

This is well and good, but it’s not immediately clear how we should go
about proving this. We have already seen how to approach the problem in
the special case where AB is a diameter, so let’s try the same approach of
using radii to find isosceles triangles. We need to split our approach into two
cases: when ∠BCA > ∠BCO, and when ∠BCA < ∠BCO (why?). Note
that if ∠BCA = ∠BCO then AC is a diameter, a case we have already
dealt with.

Case 1: Let ∠BCO = x and ∠ACO = y. We thus have ∠BCA =


x + y. Furthermore, BO = OC, meaning that ∠OBC = ∠OCB = x,
and as such ∠BOC = 180 − 2x. Repeating this process on the other
side, ∠OAC = ∠OCA = y, implying that ∠AOC = 180 − 2y. Finally,
∠AOB = 360 − (180 − 2x) − (180 − 2y) = 2x + 2y = 2(x + y) = 2∠ACB,
as desired.
Case 2: Now ∠BCA = y and ∠ACO = x. Then ∠BCO = x + y. We
also know that OB = OC, so ∠OBC = ∠OCB = x + y. Thus ∠BOC =
180 − 2x − 2y. Similarly, since OA = OC we have ∠OAC = ∠OCA = x,
so ∠AOC = 180 − 2x. As a consequence, ∠AOB = 2y = ∠ACB, again as
desired.

If we rewrite the conclusion slightly, we now have an incredibly useful


result:
QED Monthly Volume 1 Alexander Katz Page 98

Inscribed Angle Theorem: Let ∠ABC be inscribed in circle O (this


means that A, B, C all lie on the circle). Then the measure of the inter-
cepted arc (or arc AC) is exactly twice the measure of the inscribed angle.

Note that the measure of the intercepted arc is the same as its central
angle, so this definition is equivalent (but slightly easier to remember)
You might notice that nothing in this theorem uses the placement of B.
Indeed, this is the most important consequence of the theorem. Wherever B
lies on the circle, the angle ABC is equal to half the arc AC. In other words,
if there exist points B and B 0 on the circle such that either both B and B 0
lie on the major arc AC or both B and B 0 lie on the minor arc AC, then
∠ABC = ∠AB 0 C. What happens if B and B 0 lie on opposite arcs? Well,
then ∠ABC and ∠AB 0 C are half the minor arc AC and half the major arc
AC (in some order), meaning that their sum is half the whole circle. This
means ∠ABC + ∠AB 0 C = 180◦ .
This gives us 2 of the most important qualities of cyclic quadrilater-
als. A cyclic quadrilateral is a quadrilateral ABCD for which there exists
a circle O that goes through each of the points A, B, C, D. In general, when
we refer to such a quadrilateral it is implied that A, B, C, D are in clockwise
(or counterclockwise in some cases) order. Because they subtend the same
arc, we know that ∠ABD = ∠ACD, and a host of other similar relations
such as ∠DBC = ∠DAC. Furthermore, we know that ∠ABC + ∠ADC =
1
2
(the whole circle) = 180◦ , and similarly ∠BCD + ∠DAB = 180◦ . What
is truly important, however, is that the converse of these statements is also
true. In other words, if ∠ABC + ∠ADC = 180◦ , then ABCD is a cyclic
quadrilateral. Similarly, if ∠ABD = ∠ACD, then ABCD is a cyclic quadri-
lateral. This means that if we discover ∠ABC + ∠ADC = 180◦ , we can
immediately conclude that ∠ABD = ∠ACD, or ∠BDC = ∠BAC, and
so on.
As usual when we have lots of equal angles, we can find a number of
similar triangles. Let’s draw the diagonals AC and BD of cyclic quadri-
lateral ABCD, and call their intersection point P . Becuase they subtend
the same arc, ∠ABD = ∠ACD. Similarly, ∠BAC = ∠BDC. This means
that 4ABP and 4DCP are similar, or BP CP
AP
= DP . Rearranging terms gives
BP · DP = AP · CP . Notice that B, P, D and A, P, C are collinear, so this
gives us a very useful result:

Theorem (Power of a Point): Let P be a point in circle O, and points A,


QED Monthly Volume 1 Alexander Katz Page 99

B lie on circle O such that A, P, B are collinear. Define the power of point
P to be AP · BP . Because of the above, the power of point P is independent
of our choice of points A,B.
If you drew a diagram for this, you might notice yet another useful fact.
Let ∠ABD = ∠ACD = x and ∠BAC = ∠BDC = y. Then ∠AP B =
180−x−y. But we also know that ∠ABP +∠BAP = x+y = 21 (AD d + BC),
d
so ∠AP B = 12 (ABd + CD).
d In other words, we can extend the concept of
inscribed angles as follows:

Extension: If AB and CD meet at a point P in circle O (where


A, B, C, D are all points on the circle), then ∠AP C (and angles CPB, BPD,
DPA) is equal to the average of the arcs it intercepts (e.g. AC and BD).
Finally, we can extend the Power of a Point concept to points outside
a circle. As usual, let’s begin with a cyclic quadrilateral ABCD, and let
AD ∩ BC = P (clearly P lies outside the circle). Notice that

∠P AB = 180 − ∠DAB = ∠P CD

∠P BA = 180 − ∠CBA = ∠P DC

and so 4P BA is similar to 4P DC. In other words, PP D B


= PP CA ⇐⇒
P B · P C = P A · P D. Notice the similarity between this relation and our
earlier one. If we imagine the line AP C as being a “string”, and “picking
up” P moving it outside of the circle, the result becomes quite natural.
A typical use of this involves tangents. Take a point P outside a circle
O, and let A, B, C lie on the circle such that P, A, B are collinear and P C is
tangent to the circle. If we consider a point D infinitely close to C such that
P, C, D are collinear, then we have P C · P D = P A · P B by the above. In
fact, if we let D = C, then we have P C 2 = P A · P B. This gives yet another
expression for the power of a point.
There is one final characterization of cyclic quadrilaterals that we can
make, namely Ptolemy’s theorem. Unlike the above characterizations, the
proof does not fit in with the theme of natural extensions and so we delegate
it to the exercises portion.

Ptolemy’s Theorem: Let ABCD be a quadrilateral. Then ABCD is


cyclic if and only if

AB · CD + BC · AD = AC · BD.
QED Monthly Volume 1 Alexander Katz Page 100

All of this above means that we have several equivalent conditions for a
quadrilateral to be cyclic. This means that if you are able to prove just one
of them, all of the others automatically hold (in each of these, ABCD is a
quadrilateral):

• ∠ABC + ∠CDA = 180◦

• ∠ABD = ∠ACD

• Let AC ∩ BD = P . Then P A · P C = P B · P D.

• Let AD ∩ BC = Q. Then QA · QD = QB · QC. If AD||BC, then let Q


be AB ∩ CD. If these are also parallel, then ABCD is a parallelogram
and can be cyclic only if also a rectangle.

• AB · CD + BC · AD = AC · BD.

We also know that the power of a point P with respect to a circle O


depends only on the placement of P . In other words,

• For any two lines AB, CD such that A, B, C, D lie on the circle and
AB ∩ CD = P , we have AP · BP = CP · DP . Note that this holds
whether P is inside or outside the circle.

• If point P lies outside the circle, and the line P Q is tangent to the circle
with Q lying on the circle, the power of point P is P Q2 . By extension,
if points A, B lie on the circle such that P, A, B are collinear, we have
P A · P B = P Q2 .

Inscribed angles, and by extension cyclic quadrilaterals, comprise the


main observations in many difficult Geometry problems. Let’s see how we
can apply these to problems.

Problem: Hexagon ABCDEF is inscribed in a circle. If ∠ACE = 35◦ and


∠CEA = 55◦ , then compute the sum of the degree measures of ∠ABC and
∠EF A. (NIMO 2012)
Solution: This one is pretty straightforward. We are directly given that
the quadrilaterals ACEF and ABCE are cyclic, so their opposite angles
sum to 180◦ . Thus ∠ABC = 180◦ − ∠CEA = 180◦ − 55◦ = 125◦ , and
∠AF E = 180◦ − ∠ACE = 180◦ − 35◦ = 145◦ . Their sum is 270.
QED Monthly Volume 1 Alexander Katz Page 101

Of course, things are not usually this direct. Usually we need to utilize
cyclicity to discover convenient equal angles, as in the following problem:

Problem: Let ABCD be a parallelogram and circle O pass through point


A. The circle intersects AB again at P , AD again at R, and AC at Q.
Prove that
AQ · AC = AP · AB + AR · AD
Solution: The given relation looks a lot like the statement of Ptolemy’s
theorem, but it’s not quite the same. Still, this should be a suggestion to us
that Ptolemy’s is somehow involved. The first obvious thing to notice is that
quadrilateral AP QR is cyclic. If we apply Ptolemy’s to this quadrilateral,
we get AQ · P R = AP · RQ + AR · P Q. We’re very close, but we’re not quite
there yet.
In the absence of other information, we should commence the angle chas-
ing. Obviously we’re not going to be able to write everything in terms of
a single variable, so we should choose ∠BAC = x and ∠DAC = y. We
can fill in the obvious equalities - because ABCD is a parallelogram we also
have ∠ACB = y and ∠ACD = x. But we can do more than this - because
AP QR is cyclic, we also have ∠RP Q = y and ∠P RQ = x. Now we have
multiple similar triangles! In particular, 4P QR is similar to 4CBA, which
in turn is similar (actually congruent) to 4ADC.
RQ PQ
Therefore we can write PACR = AB = AD (note that we implicitly use
BC = AD, which is true because ABCD is a parallelogram). Finally,

AQ · P R = AP · RQ + AR · P Q
AC AB AD
=⇒ AQ · P R · = AP · RQ · + AP · P Q ·
PR QR PQ
=⇒ AQ · AC = AP · AB + AP · AD
as desired.

We can look at an example now that uses the power of a point theorem
in a clever way. Note that there is often a strong relationship between right
angles and cyclic quads/power of a point.

Problem: ABC is a right triangle with right angle C. Points X, Y lie on


the extension of line AB such that XA = AB = BY . Point Z is the foot
of the perpendicular from X to CY (note that, of course, Z lies on the
extension of CY ). Show that CY · CZ = 2AB 2 .
QED Monthly Volume 1 Alexander Katz Page 102

Solution: At first glance, we have extremely little information. We do


know that ∠ACB = ∠XN Y = 90◦ , but it’s not obvious how to use the
equal length condition. The only straw we can grasp at is that the end
condition (CY · CN = 2AB 2 ) looks a lot like power of a point (though
you may have guessed this already from the intro text). Still, however, it’s
hardly obvious how to continue.
The “obvious” approach is to draw a circle that goes through N and Y
and attempt to somehow use the power of point C. However, this does little
in the way of invoking AB. Instead we need to be a bit more clever. Let’s
take a look instead at the other side of the equation - the 2AB 2 . If we want
this to be a power of some point, we’re likely trying to multiply together
AB and 2AB. Now the equal lengths conditions makes sense - we know that
XB = Y A = 2AB. Which point is more convenient to try and use? Since
Y also appears on the other side of the equation, it stands out as the clear
choice.
Now we’ve stumbled across the idea of utilizing the power of point Y . If
only we could somehow construct a circle going through A, B, and C, and
point Z were on this circle and line Y C, we’d be all set. But, of course, we
can do almost exactly this! If we construct the circumcircle of ABC, we can
call the second intersection point of the circle with Y Z point D. Then, by
power of a point, we have Y B · Y A = 2AB 2 = Y D · Y C. We’re so close!
It just remains to prove that Y D = CZ. Is there any given information we
haven’t yet used?
The answer is yes. We have not yet utilized the fact that ∠XN Y = 90◦ .
In fact, since ∠ACB = 90◦ , this means that the circumcircles γ1 and γ2
of ABC and XY N respectively are concurrent precisely at the midpoint of
AB, O. In other words, OY = OZ as both are radii of γ2 . Furthermore, if
we draw OZ and let it intersect γ1 at E, then OE = OB as both are radii
of γ1 . Let the radius of γ1 be r1 and the radius of γ2 be r2 . Then, again
utilizing power of a point, ZE · (ZO + r1 ) = ZC · CD. But ZO = Y O, so
ZO + r1 = Y O + r1 = Y O + OA = Y A. Additionally, ZE = ZO − r1 =
Y O−r1 = Y B. Thus we can write Y A·Y B = ZC·ZD. But we already know
that Y A · Y B = Y C · Y D, so Y C · Y D = ZC · ZD. Finally, Y C = Y D + CD
and ZD = ZC + CD, so we can write

Y D(Y D + CD) = ZC(ZC + CD)

=⇒ Y D2 + Y D · CD = ZC 2 + ZC · CD
=⇒ (Y D − ZC)(Y D + ZC + CD) = 0
QED Monthly Volume 1 Alexander Katz Page 103

=⇒ Y D = ZC
completing the problem.

Although this problem was relatively involved, it was quite typical of a


somewhat difficult geometry problem. The information we were given was
scant and it was hardly obvious how to make use of it. We had to not only
examine our given data, but also the intended conclusion. These insights
may seem like “magic”, but in reality they have a strong intuitive basis.
For example, in this problem the seemingly random equality of products
immediately suggests power of a point. From there, though the solution
hardly comes easily, the problem becomes a matter of hammering out the
details.
Struggling with problems on your own is the best (and, as you reach
higher and higher levels, only) way to develop such an intution. As such,
it wouldn’t make much sense to continue going through more problems at
this point as all of the key ideas have been introduced. This means we will
conclude the article here and move on to the exercises section.
Summary:
The process of “angle chasing” has become a necessity on the vast ma-
jority of high level geometry problems today. Although the relationship
between equal angles and parallel lines is very important, it is almost al-
ways insufficient by itself. Inscribed angles, a way of relating angles and
circles, becomes a vitally important tool. Their natural extension is to the
cyclic quadrilateral, a concept that has found a home in problems all across
the difficulty spectrum. Because of the relationship between equal angles
and similar triangles, it should come as only a little surprise that cyclic
quadrilaterals have a number of equivalent criterion, some based on angles
and some based on lengths. The most important length-based criteria is the
power of a point, which as we saw proved to be much more than a simple
subcase of cyclic quadrilaterals.

What follows is a series of exercises, typically 10, designed to enhance


the reader’s understanding of the topic through their own struggles with dif-
ficult problems. Full solutions, as would be expected on an Olympiad, are
expected, even when the problem does not appear to be a “proof” problem.

Exercises:

1. In the article, we gave the statement of Ptolemy’s theorem without


QED Monthly Volume 1 Alexander Katz Page 104

proof. Prove this theorem. In particular, if ABCD is a cyclic quadri-


lateral show that

AB · CD + BC · DA = AC · BD.

2. Kelvin the frog lives at point A, the origin, in the coordinate plane.
Points B, C, D, E lie in the first, second, third, and fourth quadrants
respectively such that AB = 1, AC = 4, AD = 24, AE = 6 and BD ∩
CE √= A. If BC is an integer, then the length of CD can be written
as a b, where a and b are positive integers greater than 1 and b has
no perfect square factors other than 1. Compute a + b. (AAST Mock
AIME/ASIA TEAM [paraphrased])

3. Let AB and CD be two perpendicular diameters of a circle with centre


O. Consider a point M on the diameter AB, different from A and B.
The line CM cuts the circle again at N . The tangent at N to the
circle and the perpendicular at M to AM intersect at P . Show that
OP = CM . (Pan African MO 2006)

4. Let ABC be a triangle and X, Y, Z be points on AB, BC, CA respec-


tively, where the 6 points A, B, C, X, Y, Z are distinct. Show that
the circumcircles of 4AXZ, 4BY X, 4CZY are concurrent. This is
Miquel’s Theorem, and the intersection point is called the Miquel
point.

5. Let ABCD be a square, and point E be a point inside the square such
that ∠BAE = 9◦ and ∠BCE = 36◦ . Compute ∠ADE.

6. Let ABC be a triangle with incenter I. Points D and E are the


tangency points of the incircle with BC and AC respectively, and
BI ∩ DE = F . Show that ∠AF B is right.

7. In triangle ABC, AB = 13, BC = 14, and CA = 15. Distinct points


D, E, and F lie on segments BC, CA, DE, respectively, such that
AD ⊥ BC, DE ⊥ AC, and AF ⊥ BF . The length of segment
DF can be written as mn
, where m and n are relatively prime positive
integers. What is m + n? (AMC 10/AMC 12 2013)

8. Let s be the semiperimeter


p of cyclic quadrilateral ABCD. Show that
the area of ABCD is (s − a)(s − b)(s − c)(s − d).
QED Monthly Volume 1 Alexander Katz Page 105

9. Let H be the orthocenter [intersection of altitudes] of the triangle


ABC, and let D be the foot of the altitude from A to BC. Show that
BD · DC = AD · HD.

10. Let A be a point outside circle O and AB, AC be the tangents from
A to O such that B, C lie on the circle. Let ` be a line through
A that intersects the circle at D and E, so that D lies between A
and E. Let line m be the perpendicular through D to OB, and let
m ∩ BC = F, m ∩ BE = G. Show that F is the midpoint of DG.
12

Number Theory 3

In the intermediate article, we briefly discussed quadratic residues. As a


brief reminder, an integer a is a quadratic residue modulo b if there exists
an x such that x2 ≡ a (mod b).
Let’s consider the special case when b = 5. Then we can check

02 = 0 ≡ 0 (mod 5), 12 = 1 ≡ 1 (mod 5), 22 = 4 ≡ 4 (mod 5),

32 = 9 ≡ 4 (mod 5), 42 = 16 ≡ 1 (mod 5)


So the quadratic residues modulo 5 are 0, 1, and 4. As we can see, it
is very easy to find the quadratic residues of a modulus n - we need only
check 02 , 12 , . . . , (n − 1)2 over modulo n. This leads to a natural question:
for which moduli is n a quadratic residue? Again looking at the special case
of modulo 5, we want to find n such that

x2 ≡ 5 (mod n)
Let the prime factors of n be p1 , p2 , . . . , pk . Then there exists an a such
that x2 = ap1 p2 . . . pk + 5, and so

x2 ≡ 5 (mod n) =⇒ x2 ≡ 5 (mod p)i


for 1 ≤ i ≤ k. In other words, it suffices to find which prime moduli have
n as a quadratic residue.
As it turns out, these two problems are very closely related. Let’s take
a look at the function f (x) = x2 − 5. Saying that x2 ≡ 5 (mod p) is
equivalent to saying that p|f (x), so we can look at a few values (and their
factorizations):

106
QED Monthly Volume 1 Alexander Katz Page 107

x f(x) f(x) factorized x f(x) f(x) factorized


1 -4 −22 11 116 22 · 29
2 -1 -1 12 139 139
3 4 22 13 164 22 · 41
4 11 11 14 191 191
2 2
5 20 2 ·5 15 220 2 · 5 · 11
6 31 31 16 251 251
2 2
7 44 2 · 11 17 284 2 · 71
8 59 59 18 319 11 · 29
2
9 76 2 · 19 19 356 22 · 89
10 95 5 · 19 20 395 5 · 79
We can make a note of the primes in this table - besides 2 and 5, they all
end in either 1 or 9. Now since a prime can’t end in 4 or 6, this is equivalent
to hypothesizing:

x2 ≡ 5 (mod p) iff p = 2 or p ≡ 0 (mod 5) or p ≡ 1 (mod 5) or p ≡ 4 (mod 5)


Note that p = 2 is a special case - every number is a quadratic residue
modulo 2. Thus p = 2 is not particularly interesting, and if we qualify p = 2
as its own special case we have

x2 ≡ 5 (mod p) ⇐⇒ p ≡ 0 (mod 5) or p ≡ 1 (mod 5) or p ≡ 4 (mod 5)


Let’s glance back at our earlier statement:

x2 ≡ n (mod 5) ⇐⇒ n ≡ 0 (mod 5) or n ≡ 1 (mod 5) or n ≡ 4 (mod 5)


Something’s up here! At this point we may be tempted to conclude the
following (again, ignoring p = 2):

n is a quadratic residue modulo p ⇐⇒ p is a quadratic residue modulo n


Unfortunately, we would be close but incorrect. To see why, let’s repeat
the process for p = 3. We know that

02 = 0 ≡ 0 (mod 3), 12 = 1 ≡ 1 (mod 3), 22 = 1 ≡ 1 (mod 3)


so the quadratic residues modulo 3 are 0, 1. Now, as before, we look at
the function f (x) = x2 − 3.
QED Monthly Volume 1 Alexander Katz Page 108

x f(x) f(x) factorized x f(x) f(x) factorized


1 -2 -2 11 118 2 · 59
2 1 1 12 141 3 · 47
3 6 2·3 13 166 2 · 83
4 13 13 14 193 193
5 22 2 · 11 15 222 2 · 3 · 37
6 33 3 · 11 16 253 11 · 23
7 46 2 · 23 17 286 2 · 11 · 13
8 61 61 18 321 3 · 107
9 78 2 · 3 · 13 19 358 2 · 179
10 97 97 20 397 5 · 79
One might notice that every prime in this table besides 2 and 3 is ±1
(mod 12), but while interesting this is not equivalent to our statement above.
But we don’t want to throw out our rule so easily, so perhaps we can slightly
modify our search by considering the function f (x) = x2 +3.
x f(x) f(x) factorized x f(x) f(x) factorized
1 4 22 11 124 22 · 31
2 7 7 12 147 3 · 72
2
3 12 2 ·3 13 172 22 · 43
4 19 19 14 199 199
2 2
5 28 2 ·7 15 228 2 · 3 · 19
6 39 3 · 13 16 259 7 · 37
7 52 22 · 13 17 292 22 · 73
8 67 67 18 327 3 · 109
9 84 22 · 3 · 7 19 364 22 · 7 · 13
10 103 103 20 403 13 · 31

Now we’ve hit gold. Besides 2, every prime on this list is 0 or 1 (mod 3).
This is exactly the quadratic residues modulo 3! Now note that

p | f (x) =⇒ pk = f (x) = x2 + 3 =⇒ x2 ≡ −3 (mod p)


so now, for p = 3, we have

n is a quadratic residue modulo p ⇐⇒ -p is a quadratic residue modulo n


This is almost the same statement we had above, the difference being
that one instance of p is replaced with −p. We may wonder when this holds.
QED Monthly Volume 1 Alexander Katz Page 109

Exercise: Produce the same table for n = 4. Do the same for any other
composite number. Do either of our statements hold?

Exercise: Produce the same table for n = 7 and n = 13. Which rules hold
in which cases?
After doing the two exercises above, we may conjecture:

Conjecture:

If a prime q satisfies q ≡ 1 (mod 4), then:

p is a quadratic residue modulo q ⇐⇒ q is a quadratic residue modulo p

If a prime q satisfies q ≡ 3 (mod 4), then:

p is a quadratic residue modulo q ⇐⇒ -q is a quadratic residue modulo p

This statement turns out to be true, and is known as Quadratic Reci-


procity. You may have seen this statement in a slightly different form,
which we illustrate in the exercises. This statement is sometimes called
Gauss’s version of Quadratic Reciprocity. We can combine these into a
q−1
concise but more complex form. Let q ∗ = (−1) 2 q. Then,

p is a quadratic residue modulo q ⇐⇒ q ∗ is a quadratic residue modulo p

Fermat’s Little Theorem, which we discuss and prove in a later article,


states that

For a prime p and integer a, ap ≡ a (mod p)


Therefore, when p - a,
p−1
ap−1 ≡ 1 (mod p) =⇒ a 2 ≡ ±1 (mod p)
p−1
Legendre, noting that the term a 2 comes up often, introduced the
notation
QED Monthly Volume 1 Alexander Katz Page 110

 
N c−1
= ±1 ≡ N 2 (mod c)
c
where N and c are relatively prime.
The proof of quadratic reciprocity is relatively involved, but not alto-
gether overly difficult with some guidance. Several of the exercises below
guide the solution.

Summary:
Unlike our other articles, Quadratic Reciprocity is a topic that is gen-
erally useful only on olympiad problems. We include it here, however, as
an example of both a high-level article and the far-reaching applications of
Number Theory. The process of deriving and proving the result is the impor-
tant part, which develops a great deal of useful intuition. We do, however,
freely admit that it is more of a “for fun” article than one that may prove
to be useful on competitions.

What follows is a series of exercises, typically 10, designed to enhance


the readers’ understanding of the text. Unlike our lower-level series, these
exercises are generally quite difficult in relation to the text, and are rarely
of the form ”What do you notice...” as we expect that the serious student
who has reached this level will explore generalizations without prodding. In
general, full solutions as would be written on an Olympiad are expected, or
at least an outline of how to write such a rigorous solution.

Exercises:

1. Quadratic reciprocity gives us a relation for p, q odd primes, but often


we come across cases when this is insufficient. In particular, a case
of quadratic residues that comes up often is finding when −1 is a
quadratic residue. Prove, or at least convince yourself, that −1 is a
quadratic residue modulo p if and only if p ≡ 1 (mod 4).

2. Recall from earlier that 2 is given it’s own special case as it is not equiv-
alent to either 1 or 3 (mod 4). Prove, or at least convince yourself,
that 2 is a quadratic residue modulo p if and only if p ≡ ±1 (mod 8),
and −2 is a quadratic residue modulo p if and only if p ≡ 1, 3 (mod 8).

3. We’ve already defined a quadratic residue modulo p, but it is usual


to treat the residue 0 as a special case. Define a quadratic nonresidue
QED Monthly Volume 1 Alexander Katz Page 111

modulo p to be an a for which there exists no x such that x2 ≡ a


(mod p). Ignoring 0, prove that the number of quadratic residues
modulo p is equal to the number of quadratic nonresidues modulo p
(for example, 1 is the only quadratic residue modulo 3 and 2 is the
only quadratic nonresidue modulo 3)

4. Working over modulo p, prove that the product of any two quadratic
residues is a quadratic residue, the product of any two quadratic non-
residues is a quadratic residue, and the product of a residue and a
nonresidue is a nonresidue.

5. Legendre’s version of Quadratic Reciprocity is as follows (as usual, p


and q are odd primes):

If p ≡ 1 (mod 4) or q ≡ 1 (mod 4), then

q is a quadratic residue modulo p ⇐⇒ p is a quadratic residue modulo q

If p ≡ q ≡ 3 (mod 4), then

q is a quadratic residue modulo p ⇐⇒ p is a quadratic nonresidue modulo q

Show that Gauss’s version and Legendre’s versions are equivalent.

6. Legendre denoted primes equivalent to 1 modulo 4 by a and A, and


primes equivalent to 3 modulo 4 by b and B. He described 8 theorems
that combine to form quadratic reciprocity. Prove each, or at least
prove the first as the methods are similar.

If it follows that
a−1 b−1
b2 ≡ 1 (mod a) a2 ≡ 1 (mod b)
b−1 a−1
a 2 ≡ −1 (mod a) b 2 ≡ −1 (mod a)
A−1 a−1
a 2 ≡ 1 (mod A) A 2 ≡ 1 (mod a)
A−1 a−1
a 2 ≡ −1 (mod A) A 2 ≡ −1 (mod a)
b−1 a−1
a 2 ≡ 1 (mod b) b 2 ≡ 1 (mod a)
a−1 b−1
b 2 ≡ −1 (mod a) a 2 ≡ −1 (mod b)
B−1 b−1
b 2 ≡ 1 (mod B) B 2 ≡ −1 (mod b)
B−1 B−1
b 2 ≡ −1 (mod B) b 2 ≡ 1 (mod b)
QED Monthly Volume 1 Alexander Katz Page 112

7. Show that
  
   q
p p
: p ≡ 1 (mod 4) or q ≡ 1 (mod 4)
=  
q  − q : p ≡ 3 (mod 4) and q ≡ 3 (mod 4)
p
 
p
where q
is the Legendre symbol.

8. Show that the ”nicest” form of quadratic reciprocity follows:


  
p q p−1 q−1
= (−1) 2 · 2
q p
9. Gauss’s lemma (in context!) states that for any prime p and integer a
relatively prime to p, then after considering the least positive residues
of the numbers

p−1
a, 2a, 3a, . . . , a
2
and letting n be the number of these residues greater than p2 , we have
 
a
= (−1)n
p
For example, when p = 11 and a = 7, we consider the numbers
7, 14, 21, 28, 35. Reducing these modulo 11 gives 7, 3, 10, 6, 3, of which
6, 7, and 10 are greater than 112
. Thus Gauss’s lemma tells us that
7
11
= −1, which is correct as 7 is a quadratic nonresidue modulo 11.
10. With the help of the 8 theorems above, we can now prove quadratic
reciprocity if the following lemma is true. Prove it:

If p is a prime such that p ≡ 1


(mod 8),
 
√ p
then there exists a prime q < 2 p − 1 such that = −1.
q
11. Prove Quadratic Reciprocity. You should use strong induction for each
of the 8 cases in Legendre’s theorems, but you may assume that the
law is true for ±3, ±5 as in the article.
13

Credits and Acknowledgements:

We owe a great deal of gratitude to a number of people for making this


possible. First and foremost, we owe the Art of Problem Solving a great
deal. Without this website, I personally would probably never have seriously
gotten into competition mathematics, and certainly never reached the level
that I am at today. We also wish to acknowledge all the students involved
with the Mathtime project, which, while short lived, provided the inspiration
for this magazine. Finally, we wish to thank all of the people involved with
the organization of math competitions for providing an excellent way of
learning mathematics. One thing that has been proven in our society is that
competition works, and math is no different. We also would like to thank
everyone on the Art of Problem Solving forums who directly or indirectly
provided material for this magazine.
Specific article credits go out to:

• Algebra 1: Alexander Katz

• Algebra 2: Justin Stevens and David Altizio

• Algebra 3: Alexander Katz

• Combinatorics 1: Alexander Katz

• Combinatorics 2: Alexander Katz

• Combinatorics 3: Kelvin Wang and Alexander Katz

• Geometry 1: Alexander Katz

• Geometry 2: Alexander Katz

113
QED Monthly Volume 1 Alexander Katz Page 114

• Geometry 3: Alexander Katz


• Number Theory 1: Justin Stevens and Alexander Katz
• Number Theory 2: Alexander Katz
• Number Theory 3: Alexander Katz
And other credits:
• LaTeX/Typesetting work: Justin Stevens
• Naming of the magazine: Kelvin Wang
Most of the problems are taken from various competitions, including but
not necessarily limited to
• The AMC series, namely the AMC 10, AMC 12, AIME, USAJMO,
and USAMO
• The olympiads of various countries, which are too many in number to
mention specifically
• HMMT, the Harvard-MIT Mathematics Tournament
• PUMaC, the Princeton University Mathematics Competition
• NIMO and OMO, the National Internet Mathematics Olympiad and
Online Mathematics Olympiad respectively
• SMT, the Stanford Math Tournament
• USAMTS, the USA Mathematics Talent Search
• MATHCOUNTS, a middle-school competition
• Various authors on the AoPS forums, again too many in number to
mention specifically
And lastly, but hardly least importantly, to all the readers of the maga-
zine. Obviously you are an extremely important part of the magazine, as if
there were no readers there wouldn’t be much point to production!
We hope that you find the magazine enjoyable and will spread the word
to your friends. The more people who read this magazine, the more people
may become interested or develop their already existing interest in math.
This is, of course, our overall goal, and we hope you will help us to achieve
this.
Thanks for reading, and enjoy!

You might also like