You are on page 1of 31

Copyright 2016 Looking Glass Ventures.

All rights reserved. This book or parts thereof may not be reproduced in any form, stored in any
retrieval system, or transmitted in any form by any meanselectronic, mechanical, photocopy,
recording, or otherwisewithout prior written permission of the publisher, except as provided
by United States of America copyright law. For permission requests, write to the publisher, at
support@edfinity.com.

Zen Series High School Number Theory

Contents

Introduction

Section 1: Prime Factorization

12

Section 2: Divisibility Criteria

15

Section 3: More on Divisibility

19

Section 4: Modular Arithmetic

22

Section 5: Dierent Number Bases

25

Section 6: Diophantine Equations

28

Zen Series High School Number Theory

Introduction
Purpose
If you are reading this, you probably like
math and enjoy thinking about challenging
problems. The purpose of this book is to
help you develop a robust set of strategies
for solving a broad range of problems. These
strategies are suciently broad-based to be
of value in the course of your education, and
possibly in your career, but our focus will be
on mathematics competitions.

problems are significantly harder than, or


at least dierent from, those that you are
likely to encounter in a homework
assignment. Finally, we assume that you
are willing to commit about an hour a day
for twenty weeks in order to achieve
greater success on the contests.

We assume that you are familiar with the


topics that are typically covered in high
school geometry and first- and secondyear algebra. However, you can still use
this book if there are gaps in your
knowledge. Each section will contain a
list of the tools (i.e. facts, formulas, and
techniques) that you will need to solve
the problems in the section. The internet
abounds with web sites that can help
you develop the needed tools.

If the above is at least somewhat descriptive


of you, then how are we defining success?
Well, to be clear from the outset, we do not
define it as getting a perfect score on a
national math contest. In fact, if you are
among the small group of students for whom
a perfect score is a realistic goal, you are
well beyond the level of what is being taught
here. Of course, if you enjoy the process of
participating and doing your best, you are
already having a successful experience in a
meaningful way. What this book and its
companion volumes can oer you in addition
is an opportunity to develop the techniques
and strategies needed to place among the
top 5-10% of the participants in a typical
contest. We hope you will agree that this is a
significant measure of success in the world
of math contests.

We assume that you have attempted, or


at least seen, a national high school
math contest. If not, you can obtain
mock contests, similar to the American
AMC 10 and AMC 12 contests, at
edfinity.com/catalog. We also assume
that you have had limited success in
solving the problems on the contests.
This is because the majority of contest

Each volume in this series is divided into six


sections, each of which illustrates the
application of a general problem-solving
method to problems in a specific content
area. Because each section is designed to
be mastered in about three hours, you
should be able to finish each volume in
about four weeks by devoting about an hour
a day to it.

Because no book can be appropriate for


students at all levels, we are making a few
assumptions about you:

Zen Series High School Number Theory

The volumes can be read in any order, but we recommend the following sequence:

Weeks

1-4

Volume 1 (algebra)

Weeks

5-8

Volume 2 (geometry)

Weeks

9-12

Volume 3 (discrete math)

Weeks

13-16

Volume 4 (number theory)

Weeks

17-20

Volume 5 (advanced topics)

If youre still reading, youre ready to begin. Heres wishing you many hours of hard, but
enjoyable, work.

Zen Series High School Number Theory

An Organized Approach to Problem Solving


There is no magical formula that will allow you to solve every mathematical problem that
you may encounter. However, problems are more likely to give up their solutions to you if
you approach them methodically, using thought processes that have proven to be
eective. The general four-step method described here is based on one developed by the
Hungarian mathematician George Polya (1887-1985) and has been adapted to apply to the
types of problems that commonly appear in contests. You should feel free to modify and
add to it as you gain experience with it.
Step 1:

Understand the problem.

In order to solve any problem, you must have a clear understanding of the question you
are being asked to answer. Even when the question is clear to you, but especially when it
isnt, you should take some time to organize your thoughts and focus on the problem
before starting to solve it.
Read through the problem once without focusing too much on the details. Just
recognize the subject area it appears to be dealing with and notice your gut feeling
about how dicult the solution is likely to be. If it seems especially hard, remind
yourself that a systematic approach can make seemingly hard problems easier.
Read the problem again more carefully, and make an eort to understand the
question. At this stage some or all of the following strategies may be helpful.
Break the problem statement down into short sentences or phrases, and
make a mental (or physical) note of the information given by each. A similar
strategy is to break the problem into parts.
Draw a picture. This is helpful in most geometry problems, but sketches are
also often useful for problems that involve graphs or are set in a physical
context.
Substitute numbers for symbols. For example, if the problem statement
contains a complicated condition placed on integers m and n, you might ask,
What does the condition mean when m = 2 and n = 3?
Restate the problem in your own words. Can you ask the question in
language that is easier for you to understand?
Choose a tool. That is, recall the facts and formulas that might be related to the
solution of the problem. If the problem is about right triangles, you may well need the
Pythagorean Theorem. Look for key words and expressions in the problem statement
Zen Series High School Number Theory

that might suggest the use of certain tools. Also keep in mind that other tools might
suggest themselves to you as you proceed.
Step 2:

Devise a plan.

Sometimes you will be pretty sure that you know how to answer the question. It may be
clear, for example, that you need to create a system of two linear equations in two
variables and then solve the system. If so, then that is your plan. Often, however, there is
no obvious path to the answer. At such times, one or more of the following strategies may
help you to recognize a path to follow.
Look for structures and patterns. This strategy can take several forms, including
the following:
Name the unknowns. If the problem contains several statements that give
information about one or more unknown quantities, give symbolic names to
each unknown. If the problem involves quantities that can vary, name the
variables.
Look for relationships among the given quantities. If some given number is
the sum or product of two others, then how, if at all, might that be important?
Does the problem describe a triangle with side lengths in a familiar ratio such as
3:4:5?
Look for symmetry. Does a geometric figure have lines of symmetry? Do two
or more variables play identical roles in an equation or a system of equations?
Make a table. What sort of relationship exists between two variables in the
problem? Is it linear, quadratic, exponential, or something else?
Make a conjecture. If you observe a pattern in a problem, especially in a sequence
or an iterative process, make an educated guess about how the pattern might
continue. If possible, test your guess by examining a few cases.
Explore a related problem. This strategy can also take several forms, including the
following:
Change the conditions. Have you encountered problems that looked similar,
but with a slightly dierent set of conditions? If so, how did you solve those?
Might some aspects of the solution process be applicable here?
Use smaller numbers. When a problem involves large numbers, such as the
current year, you can often gain insight into the solution by solving the same
problem with a smaller number.
Zen Series High School Number Theory

Use simpler expressions. When a problem involves a complicated


expression, you can often gain insight into the solution by solving a similar
problem with a simpler expression.
Look at particular cases. One form of this strategy is to look at extreme
cases. For example, suppose you are told that a point P is located on side AB of
a triangle. If P is not specified as, say, the midpoint of AB or the foot of an
altitude, it might pay to ask what happens if P coincides with A or B.
Choose convenient numbers. If a question asks for the ratio of the areas of two
circles, you are often free to assume that one circle has radius 1. A similar strategy is
to choose convenient units.
Work backwards. Try to form a sentence like, I could answer the question if I
knew the answer to __________ (some other question), Then work on finding the
answer to the other question.
Take a possible step. If all else fails, think of some conclusion you can draw from
the given information, even if it doesnt appear to point toward an answer to the
question. Remember that any step you take allows you to view the problem from a
dierent perspective and may let you see features that were previously hidden.
Step 3:

Carry out the plan.

If your activities in Step 2 reveal a sequence of calculations and logical implications that
will lead to the solution of the problem, then carry them out. For more dicult problems,
you may recognize how to begin and then get stuck in mid-solution. When that happens,
you can always reuse some of the strategies in Step 2. The following additional strategies
may also be helpful.
Reread the problem. Make sure you remember the problem statement correctly.
Also be on the lookout for any given information that you have not yet used in your
solution. Any piece of unused information is likely to be an important part of the rest
of the solution.
Know when to hold em, know when to fold em. This line is from an old popular
song, The Gambler. What it means is that there are times when it pays to persevere
with a plan and other times when it pays to cut your losses and formulate a new plan.
Knowing when to do each is largely a matter of experience, but when youre stuck,
try to make a judgment about whether you are on the right track.

Zen Series High School Number Theory

Step 4:

Look back.

When you are pressed for time, as you are in most contests, you may be forced to record
your answer and move on to the next problem. However, if time permits:
Check your work. There is a reason that your teachers have always told you to
check your solutions of problems. Even the best students (and teachers!) make
careless mistakes, and because no partial credit is possible in most contests,
mistakes can be expensive.
Make sure your answer makes sense. Did you find that the boy in the problem is
running at a speed of 100 miles per hour? Does the triangle in the problem turn out to
have a negative area? If so, you have probably made a mistake.
The process of checking your work is essentially the same for each problem, so we wont
keep reminding you to do that. Our solutions will refer to Step 4 only if there is a quick way
to see whether your answer makes sense.
The solutions of the problems in these volumes will not always mention every strategy
that is being employed. For example, you should always read through a problem, and
you should always make sure your answer makes sense. However, each strategy that
appears in bold type above will be pointed out often enough to let you see when and
how to apply it.
Please dont misunderstand the purpose of this method. One of the statements from
above is worth repeating: there is no magical formula that will allow you to solve every
mathematical problem that you may encounter. Brilliant mathematicians from Newton to
Einstein often experienced failures, so when your hard work fails to produce a solution,
remember that you are in good company. However, if you use the method and tailor it to
your own learning style, you should find that you are failing at increasingly more dicult
problems and experiencing success more frequently.

Addendum: A Bit of Gamesmanship


If a math contest has a multiple-choice format, the given answer choices sometimes
provide a hint about the solution. If the choices for a geometry problem all involve 3,
chances are that the solution involves a 30 or 60 angle. Also, a bit of thought can
sometimes allow you to eliminate some of the choices. Perhaps you can see that the
answer must be an even integer and all but two of the choices are odd, and perhaps you
can also see that one of the two even choices is too big to be correct. In that case you can
choose the correct answer without ever solving the problem! Of course, you should read
and understand the solution later to improve your problem-solving skills, but in the
meantime you will have disposed of a contest problem with a minimum of eort.
Zen Series High School Number Theory

Edfinitys Zen Masters Series


Edfinitys Zen Masters series is a collection of 10 digital titles (5 each for Middle and High
School) created for the modern educator and student. The titles are available only in digital
form and consist of carefully crafted problem collections designed to help students master
problem solving. Each title guides students through the themes of a specific topic (such as
Algebra or Probability), presenting concise expository content, select examples illustrating
specific problem solving techniques, and between 150-200 problems for middle school
and 60-75 problems for high school, expertly arranged to help the user achieve complete
mastery.
The volumes are each accompanied with optional access to an Edfinity digital
companion presenting all the problems in the title as a self-paced, online course with
auto-grading and performance analysis. Educators may enroll their students to track their
progress, or students/parents may enroll individually at edfinity.com/catalog. Access to
the guides provides educators access to rich, supplemental problem collections for
classroom use.
The Zen Masters Series is designed to serve broad usage by educators and students
alike, oering substantive general enrichment, development of foundational skills in
problem solving, and contest preparation. In addition to helping students prepare
eectively for local and major international contests, the problems provide robust attention
to standards and guidelines of the Common Core State Standards in Mathematics (USA),
GCSE (UK), Singapores Math curriculum, Australian Curriculum, and most other
international syllabi.

Zen Masters High School Series


Algebra, by David Wells

Geometry, by David Wells

Discrete Mathematics, by David Wells

Number Theory, by David Wells

Advanced Topics, by David Wells

Solutions Manual for each title by David Wells

Zen Series High School Number Theory

10

Zen Masters Middle School Series


8 Tips to Solve Any Problem, by James Tanton


Numbers and the Number System, by James Tanton

Structure, Patterns and Logic, by James Tanton

Counting and Probability, by James Tanton

Relationships and Equations, by James Tanton

Geometry, by James Tanton

Solutions Manual for each title by James Tanton

Zen Series High School Number Theory

11

1. Prime Factorization
Prerequisites
Facts and formulas
(Fundamental Theorem of Arithmetic)
Every positive integer greater than 1 can be expressed in a unique way as a product of
one or more prime numbers, not necessarily distinct.

Basic skills
Before beginning this section, you should be able to do all of the following.
Decide whether a positive integer of reasonable size is prime.
Find the prime factorization of a positive integer of reasonable size.

Tools for Solving Contest Problems


If an equation asserts that two positive integers are equal, then every prime factor of
either integer must also be a prime factor of the other.
EXAMPLE 1: Let n be the smallest positive integer such that 150n is a perfect square. What is the
smallest positive integer k such that k n is a perfect cube?

A. 30B. 36C. 180D. 900E. 4500

Answer B

Solution
Step 1:

Understand the problem

This is really two problems in one, so you will need to break the problem into parts. First
you need to find the smallest positive integer n such that 150n is a perfect square. Then for
that value of n, find the smallest positive integer k such that kn is a perfect cube.

Zen Series High School Number Theory

12

Step 2:

Devise a plan

Choose a tool and recall that in the prime factorization of a perfect square, the exponent
on each prime is even. Similarly, in the prime factorization of a perfect cube, each
exponent is a multiple of 3. If you find the prime factorization of 150, you should be able to
find the smallest positive integer n such that each exponent in the prime factorization of
150n will be even. Then you should be able to find k in a similar manner.
Step 3:

Carry out the plan

First calculate that 150 = 2 3 52, so if 150n is a perfect square, then n must contain
at least a factor of 2 and a factor of 3. Conversely, if n = 2 3 = 6, then 150n = 22 32 52,
which is a perfect square. Now you need to find the smallest positive integer k such that
kn is a perfect cube. If 6k is a perfect cube, then k must contain at least 2 factors of 2 and
2 factors of 3. Conversely, if k = 22 32 = 36, then kn = 23 33, which is a perfect cube.
Therefore k = 36.
Step 4:

Look back

To check your work, at least in part, you can verify that 150n = 150 6 = 900 = 302 and
kn = 36 6 = 216 = 63.
The solutions of contest problems sometimes require the observation that 2 is the only
even prime.
EXAMPLE 2: For certain positive integers b and c, the solutions of the equation x 2 (2b + 1)x + c = 0
are both prime integers. Which of the following is equal to c?

A. 4b 2B. 4b 1C. 4bD. 4b + 1E. 4b + 2

Answer A

Solution
Step 1:

Understand the problem

You might restate the problem in your own words in order to get a clue about possible
paths to the answer. The integers 2b + 1 and c are coecients in a quadratic equation, and
you need to express c in terms of b. In order to do that, you will apparently need to make
use of the fact that both solutions of the equation are prime integers.

Zen Series High School Number Theory

13

Step 2:

Devise a plan

Choose a tool and recall what you know about quadratic equations. Will the quadratic
formula help? The solutions of the equation are

2b + 1

(2b + 1)2 4c

. Does that
2
expression provide a way to tell when both solutions will be prime numbers? Maybe, but it
doesnt seem to be obvious. Set the expression aside for now and pick up another tool.
The problem gives you information about the solutions of the equation and asks you to
conclude something about the coecients, so a more likely path to the answer is to use
the fact that the sum of the solutions is 2b + 1 and their product is c. Take a possible step
and see what conclusions you can draw from that observation.
Step 3:

Carry out the plan

The solutions must be two prime numbers whose sum is 2b + 1. Look for structures and
patterns to notice that 2b + 1 must be odd, so one of the primes must be even, and the
only even prime is 2. Therefore the solutions are 2 and 2b 1, and their product is
c = 2(2b 1) = 4b 2.
Note 1: There are infinitely many equations that fit the given description. For any odd
p+1
prime p, let b =
and c = 4b 2.
2

Exercises
Solve problems 1 to 10 in the Edfinity problem set Zen Series High School Number
Theory Section 4.1 Prime Factorization (edfinity.com/catalog).

Zen Series High School Number Theory

14

2. Divisibility Criteria
Prerequisites
Facts and formulas
A positive integer n:
is divisible by 2 if and only if its last digit is even,
is divisible by 4 if and only if its last two digits form a multiple of 4,
is divisible by 8 if and only if its last three digits form a multiple of 8, and in general,
is divisible by 2k if and only if its last k digits form a multiple of 2k,
is divisible by 5 if and only if its last digit is either 0 or 5,
is divisible by 25 if and only if its last two digits form a multiple of 25, and in general,
is divisible by 5k if and only if its last k digits form a multiple of 5k,
is divisible by 3 if and only if the sum of its digits is a multiple of 3, and
is divisible by 9 if and only if the sum of its digits is a multiple of 9.
A positive integer with decimal representation d1d2d3 dk is divisible by 11 if and only if its
alternating digit sum d1 d2 + d3 dk is a multiple of 11.
The following facts are useful when the integer n is large.
A positive integer n is divisible by 7, 11, or 13 if and only if n 1001k is divisible by 7, 11,
or 13, respectively for any integer k.
A positive integer n is divisible by 37 if and only if n 999k is divisible by 37.

Zen Series High School Number Theory

15

Tools for Solving Contest Problems


It is common for the solution of a contest problem to rely on the criteria for divisibility
by 3 or 9.
EXAMPLE 1: The first 30 positive integers are written side by side to form the single integer
N = 123456789101112131415161718192021222324252627282930.
What is the remainder when N is divided by 12?

A. 0

B. 2

C. 4

D. 6

E. 10

Answer D

Solution
Step 1:

Understand the problem

Even though the number N is intimidatingly large, the question is clear.


Step 2:

Devise a plan

Performing the division would be both dull and time-consuming, so there must be a less
cumbersome path to the answer. An observation that might be useful is that 12 = 3 4,
so you might gain some insight into the problem if you choose a tool and recall the criteria
for divisibility by 3 and 4. Take a possible step and see whether N is divisible by either
3 and 4.
Step 3:

Carry out the plan

To see whether N is divisible by 3, you will need to find the sum of the digits of N. The units
digits have a sum of 3(0 + 1 + 2 + + 9), which is a multiple of 3, and the tens digits have
a sum of 10 1 + 10 2 + 3 = 10 3 + 3, which is also a multiple of 3.
Because N is a multiple of 3 and is even, it must leave a remainder of either 0 or 6 when
divided by 12. If the remainder is 0, then N is a multiple of 12, implying that it is also a
multiple of 4. However, the last two digits of N are 30, which is not a multiple of 4, so N is
also not a multiple of 4. Therefore the remainder when N is divided by 12 is 6.

Zen Series High School Number Theory

16

Contest problem solutions occasionally make use of the factorization 1001 = 7 11 13.
EXAMPLE 2: Let rn be the positive integer that has n digits, all of which are 1s. For how many
values of n with 1 n 1000 is rn divisible by 13?

A. 76

B. 83

C. 166

D. 250

E. 333

Answer C

Solution
Step 1:

Understand the problem

If you look at particular cases, the question becomes clear. The first few integers rn
are r1 = 1, r2 = 11, and r3 = 111. It isnt hard to see that none of these is divisible by 13.
You need to determine how many of the first 1000 numbers rn are divisible by 13.
Step 2:

Devise a plan

If you cant see a clear path to the answer, you might take a possible step by examining
rn for the first several values of n. You might then be able to look for structures and
patterns in the sequence (rn ) in order to answer the question.
Step 3:

Carry out the plan

You already know that r1 = 1, r2 = 11, and r3 = 111 = 3 37 are not divisible by 13. It is also
easy to calculate that r4 = 1111 = 11 101 is not divisible by 13. To see whether r5 = 11, 111
is divisible by 13, you can perform the division, but if you look for shortcuts, you can write
r5 = 11, 011 + 100 = 11 1001 + 100. You know that 1001 is divisible by 13 and 100 is not, so
r5 is not divisible by 13 either.
Should you continue from here? The numbers will soon get awkwardly large. However,
know when to hold em and try to keep going until you find at least one number rn that is
divisible by 13. Continuing, you can recognize that r6 = 111, 111 = 111 1001, so r6 is
divisible by 13. Can you use this observation to your advantage? You might notice that
r7 = 1, 111, 111 = 1, 000, 000 + r6. The second of those terms is divisible by 13, but the first is
not, so r7 is not divisible by 13.

Zen Series High School Number Theory

17

Now you can generalize the reasoning that you used to analyze r7. You can write
r7 = 1, 000, 000 + r6 = 1, 000, 000r1 + r6,

r8 = 11, 000, 000 + r6 = 1, 000, 000r2 + r6,


r9 = 111, 000, 000 + r6 = 1, 000, 000r3 + r6,

and so on. Because none of the integers r1 through r5 are divisible by 13, none of the
integers r7 through r11 are, either. However, r12 = 1, 000, 000r6 + r6 is divisible by 13.
Now you can see that rn is divisible by 13 exactly when n is a multiple of 6. Because
1000 = 166 6 + 4, the number of multiples of 13 among the first 1000 numbers rn is 166.

Exercises
Solve problems 1 to 10 in the Edfinity problem set Zen Series High School Number
Theory Section 4.2 Divisibility Criteria (edfinity.com/catalog).

Zen Series High School Number Theory

18

3. More on Divisibility
Prerequisites
Definitions
The least common multiple of a set {n1, n2, n3, , nm} of positive integers is the smallest

positive integer that is a multiple of each of n1, n2, n3, , nm. This number is sometimes
denoted by lcm(n1, n2, n3, , nm).

The greatest common factor, or greatest common divisor, of a set {n1, n2, n3, , nm} of

positive integers is the largest positive integer that is a divisor of each of n1, n2, n3, , nm. This
number is sometimes denoted by gcf(n1, n2, n3, , nm) or gcd(n1, n2, n3, , nm).

Facts and formulas


If a positive integer n has the prime factorization p1k1p2 k 2p3k3 pm km, where
p1, p2, p3, , pm are distinct primes, then the number of positive integers that divide
n is (k1 + 1)(k2 + 1)(k3 + 1)(km + 1).

Basic skills
Before beginning this section, you should be able to do all of the following.
Find the least common multiple of a set of positive integers of reasonable size.
Find the greatest common factor of a set of positive integers of reasonable size.

Tools for Solving Contest Problems


Contest problems sometimes ask you to determine which combinations of prime powers
will give a positive integer exactly N divisors, where N is a fixed positive integer.
EXAMPLE 1: A positive integer n is divisible by both 11 and 13 and has exactly 6 positive integer
divisors, including 1 and n. What is the dierence between the largest and smallest possible
values of n?

A. 121

B. 143

C. 169

D. 286

E. 866

Answer D
Zen Series High School Number Theory

19

Solution
Step 1:

Understand the problem

Read through the problem to identify the question. Then read the problem again,
focusing on the conditions that are placed on n. First, n must be divisible by both 11 and
13. There are infinitely many positive integers that meet that requirement, so there is no
largest one. However, n must also have exactly 6 positive integer divisors. You will need to
see how that condition limits the number of possible value of n.
Step 2:

Devise a plan

Choose a tool and recall how to calculate the number of divisors of a positive integer. You
know that the prime factorization of n includes at least one factor of 11 and one factor of 13.
However, if n = 143 = 11 13, then n has only (1 + 1)(1 + 1) = 4 positive integer divisors.
What other prime factors can n have? Take a possible step and explore the possibilities.
Step 3:

Carry out the plan

Can n be divisible by any primes other than 11 or 13? No, because if the other prime
is p, then n is a multiple of 11 13 p, so it has at least (1 + 1)3 = 8 positive integer
divisors. What if n = 112 13? Yes, that number has (2 + 1)(1 + 1) = 6 positive integer
divisors. Another possible value of n is 11 132, and in fact those are the only possibilities.
Now reread the problem and recall that you need to find the dierence between the
largest and smallest possible values of n. To do that, you dont need to evaluate either
of the possible values of n. Instead, look for shortcuts to calculate the dierence as
11 132 112 13 = 11 13 (13 11) = 286.
You can sometimes shorten the solution of a problem by making use of the least
common multiple of a set of positive integers.
EXAMPLE 2: How many of the first 1000 positive integers are divisible by at least three of the
numbers 2, 3, 4, and 5?

A. 128

B. 131

C. 133

D. 134

E. 136

Answer D

Zen Series High School Number Theory

20

Solution
Step 1:

Understand the problem

The question is clear. You need to count the integers from 1 through 1000 that are divisible
by any three of the four numbers 2, 3, 4, and 5, including those that are divisible by all four.
Step 2:

Devise a plan

Break the problem into parts and consider the possible cases. To find the numbers
that are divisible by 2, 3, and 4, you will need to choose a tool and calculate that
lcm(2, 3, 4) = 12. You can then count the multiples of 12 between 1 and 1000. Similarly, you
can calculate that lcm(2, 3, 5) = 30, lcm(2, 4, 5) = 20, and lcm(3, 4, 5) = 60, then count the
multiples of each of those numbers between 1 and 1000. Finally, you will need to account
for the numbers that have been counted more than once. For example, every multiple of
60 is also a multiple of 12, 20, and 30.
Step 3:

Carry out the plan

You can use the Inclusion-Exclusion Theorem to carry out the plan you devised in Step 2,
but you can save some of the work if you look for shortcuts. The least common multiple
of 12, 20, 30, and 60 is 60, so every set of 60 consecutive integers contains the same
number of integers that satisfy the given requirement. Between 1 and 60, inclusive, the
multiples of 12 are 12, 24, 36, 48, and 60. In addition to 60, only 20 and 40 are multiples of
20, only 30 is a multiple of 30, and there are no other multiples of 60. Therefore 8 of the first
60 positive integers satisfy the requirement.
Now one way to calculate the number of positive integers among the first 1000 that
satisfy the requirement is to notice that 1000 = 16 60 + 40 and 1020 = 17 60. Therefore
out of the first 1020 positive integers, there are 17 8 = 136 that satisfy the requirement.
Of those, 16 60 + 48 = 1008 and 16 60 + 60 = 1020 are greater than 1000, leaving a total of
136 2 = 134.

Exercises
Solve problems 1 to 10 in the Edfinity problem set Zen Series High School Number
Theory Section 4.3 More on Divisibility (edfinity.com/catalog).

Zen Series High School Number Theory

21

4. Modular Arithmetic
Prerequisites
Definitions
If integers a and b leave the same remainder when divided by an integer n, it is said that
a and b are congruent modulo n. This condition is expressed symbolically by writing
a b(modn).

Facts and formulas


Let a1, a2, b1, b2, and n be integers such that a1 b1(modn) and a2 b2(modn). Then:
a1 + a2 b1 + b2(modn),
a1 a2 b1 b2(modn), and
a1a2 b1b2(modn).

Tools for Solving Contest Problems


If a, b, and n are integers, then a b(modn) if and only if b a is a multiple of n.
EXAMPLE 1: Ali is visiting a city where taxis charge a fixed base fare plus an additional charge of
m cents for each tenth of a mile. That is, the fare jumps by m cents after every tenth of a mile.
During his visit Ali takes taxis three times and pays fares of $6.35, $8.10, and $10.60. What is the
largest possible value of m?

A. 5

B. 15

C. 20

D. 25

E. 35

Answer D

Solution
Step 1:

Understand the problem

In order to understand the question, you might look at particular cases. In order to
work with whole numbers, choose convenient units and express Alis fares in cents as

Zen Series High School Number Theory

22

635, 810, and 1060. Then look for structures and patterns to notice that each of the three
fares is a multiple of 5, so that is a possible value of m. You need to find the largest
possible value of m.
Step 2:

Devise a plan

You can verify that the greatest common factor of 635, 810, and 1060 is 5. Does that mean
that 5 is the largest value of m? Before reaching that conclusion, reread the problem and
recall that each fare includes the base fare. Name the unknowns and let the base fare be
b cents. Then the mileage charges in cents for the three trips are 635 b, 810 b, and
1060 b. The mileage charge must be a common factor of these 3 numbers. Can you
answer the question without knowing the value of b? Subtracting one of these expressions
from another eliminates b from the result. Does it make sense to do that? Take a possible
step and think about it.
Step 3:

Carry out the plan

Subtracting the mileage charge for the first trip from that of the second trip gives a
dierence of 175. That means that the mileage charge for Alis second trip was $1.75 more
than the mileage charge for his first trip, so m must be a factor of 175. Similarly, the
mileage charge for his third trip was $2.50 more than the mileage charge for his second
trip, so m must be a factor of 250. The greatest common factor of 175 and 250 is 25, so that
is the largest possible value of m.
Step 4:

Look back

Even if time doesnt permit you to check your work, take a moment to make sure your
answer makes sense. Can you find a value of the base fare b that will make Alis three
fares possible? The total fares all leave a remainder of 10 when divided by 25, so b must
do the same. For example, if the base fare is $3.10, then Ali paid mileage charges of $3.25,
$5.00, and $7.50, each of which is a multiple of 25 cents.
If a and b are integers, then when the numbers a, a 2, a 3, are divided by b, the
remainders form a periodic (that is, repeating) sequence. In particular, the rightmost digits
of a, a 2, a 3, form a periodic sequence.
EXAMPLE 2: What is the remainder when 72015 + 512015 is divided by 100?

A. 2

B. 15

C. 50

D. 58

E. 94

Answer E
Zen Series High School Number Theory

23

Solution
Step 1:

Understand the problem

The problem may look intimidating, but at least the question is easy to understand.
Step 2:

Devise a plan

Actually carrying out the addition and division is out of the question. The solution of the
problem will probably require you to calculate some smaller powers of 7 and 51, then look
for structures and patterns in the remainders when the powers are divided by 100.
Step 3:

Carry out the plan

It is not too much trouble to calculate that 71 = 7 7(mod100), 72 = 49 49(mod100),


73 = 343 43(mod100), and 74 = 492 2401 1(mod100). You can also calculate that
511 = 51 51(mod100) and 512 = 2601 1(mod100). The calculations are going to get ugly
if you have to continue, but know when to hold em. Notice that 74 and 512 are each
congruent to 1 modulo 100. Maybe this is what you were meant to notice. Can you make
use of this observation?
You can continue the pattern of remainders by observing that
75 = 74 7 1 7 = 7(mod100), 76 = 74 72 1 49 = 49(mod100), and so on.
n
In fact, you can conclude that 74n = (74) 1(mod100) for all positive integers n.
n
Therefore 72015 = 72012 73 1 43 = 43(mod100). Similarly, 512n = (512) 1(mod100)
for all positive integers n, so 512015 = 512014 51 51(mod100). Finally,
72015 + 512015 43 + 51 = 94(mod100).

Exercises
Solve problems 1 to 10 in the Edfinity problem set Zen Series High School Number
Theory Section 4.4 Modular Arithmetic (edfinity.com/catalog).

Zen Series High School Number Theory

24

5. Different Number Bases


Prerequisites
Definitions
For each integer b 2, a string of digits am am1am2 a1a0 represents a positive integer in
the number base b if the digit ak represents ak b k. For example, in base 5 the digit string 3204
represents the number 3 53 + 2 52 + 4 = 429. If a digit string is intended to represent a
number in any base other than 10, the base will be indicated with a subscript. In the above
example, 32045 = 429.

Basic skills
Before beginning this section, you should be able to do all of the following.
Convert a positive integer to base 10 from any other base b.
Convert a positive integer from base 10 to any other base b.

Tools for Solving Contest Problems


Some problems involve an arithmetic equation with all numbers written in an unknown
base b. You can use the definition of number base to convert the equation to a polynomial
equation in the unknown b.
EXAMPLE 1: Positive integers n and b have the property that n and n 2 have base-b
representations 24b and 554b, respectively. What is n?

A. 16

B. 20

C. 28

D. 32

E. 36

Answer C

Solution
Step 1:

Understand the problem

Read through the problem to identify the question, then read the problem again to see
that it involves 2 unknowns, namely n and b. There are 2 conditions placed on the
Zen Series High School Number Theory

25

unknowns, namely that n = 24b and n 2 = 554b. In order to find n, you will probably need to
use the 2 given conditions to find both n and b.
Step 2:

Devise a plan

You can often solve a system of 2 equations in 2 unknowns, but how can you work with
these equations that involve an unknown number base? You can eliminate this diculty if
you choose a tool and recall what you know about number bases. That will allow you to
write the two equations as n = 2b + 4 and n 2 = 5b 2 + 5b + 4. Now you should be able to
solve that system of equations and answer the question.
Step 3:

Carry out the plan

Because n = 2b + 4, you can write n 2 = (2b + 4)2 = 4b 2 + 16b + 16. Setting this equal to
5b 2 + 5b + 4 and simplifying gives b 2 11b 12 = 0, and the only positive solution is b = 12.
The corresponding value of n is 2 12 + 4 = 28.
Step 4:

Look back

Even if time doesnt permit you to check your work, take a moment to make sure your
answer makes sense. You can calculate that 55412 = 5 122 + 5 12 + 4 = 784, which is
282, so your answer does satisfy the given conditions.
When a positive integer n is represented in base b, the rightmost k digits are the base-b
representation of the remainder when n is divided by b k.
EXAMPLE 2: When the integer n = 2015 is written in a number base other than 10, it does not
always end in the digit 5. For example, in base 9, n = 26789. For how many positive integers b does
the base-b representation of n end in the digit 5?

A. 6

B. 8

C. 12

D. 15

E. 16

Answer C

Solution
Step 1:

Understand the problem

The given example makes the question clear. When the number 2015 is rewritten in base b,
it may or may not end in the digit 5. You need to find the values of b with the property that
2015, written in base b, has a units digit of 5.

Zen Series High School Number Theory

26

Step 2:

Devise a plan

To gain some insight into the question, you might explore a related problem. Why does
2015 have a units digit of 5 when written in base 10? If you write 2015 = 2 103 + 1 10 + 5,
you can recognize that the units digit is 5 because 2015 leaves a remainder of 5 when it is
divided by 10. Look for structures and patterns to see that you can answer the question
by finding all positive integers b such that 2015 leaves a remainder of 5 when it is divided
by b.
Step 3:

Carry out the plan

If 2015 leaves a remainder of 5 when it is divided by b, then 2015 5 = 2010 must be a


multiple of b. You can factor 2010 as 2 3 5 67, then choose a tool to calculate that 2010
has (1 + 1)(1 + 1)(1 + 1)(1 + 1) = 16 positive integer divisors.
Step 4:

Look back

Because 16 is one of the answer choices, you might be tempted to choose it and move
on. However, before doing that, make sure your answer makes sense. One divisor of
2010 is 1, which is not a possible number base. Do all of the other choices make sense?
If b = 2, then the reminder when 2015 is divided by b is not 5, but 1. With this observation,
you should be able to see that b must be greater than 5, so you should exclude 1, 2, 3,
and 5 as possible values of b. The other 12 divisors of 2010 are all possible values of b.

Exercises
Solve problems 1 to 10 in the Edfinity problem set Zen Series High School Number
Theory Section 4.5 Dierent Number Bases (edfinity.com/catalog).

Zen Series High School Number Theory

27

6. Diophantine Equations
Prerequisites
Definitions
A Diophantine equation is an algebraic equation in which the unknowns are understood
to represent integers, usually positive integers.

Basic skills
Before beginning this section, you should be able to:
Use basic factoring techniques to factor a polynomial.

Tools for Solving Contest Problems


You can often establish an upper bound for the values of the unknowns in a Diophantine
equation.
In a Diophantine equation, if all of the terms except one are divisible by a positive integer
n, then the remaining term must also be divisible by n.
EXAMPLE 1: The degree measures of the interior angles of a convex hexagon form a
non-constant arithmetic sequence of positive integers. Let m be the measure of the largest
interior angle of the hexagon. How many values of m are possible?

A. 11

B. 12

C. 13

D. 14

E. 15

Answer A

Solution
Step 1:

Understand the problem

Read through the problem to identify the question. The unknown m is the degree measure
of the largest of the 6 angles in a convex hexagon. Recall what you know about convex
hexagons and choose a tool. You are likely to need the fact that the sum of the degree
measures of the 6 angles is 180(6 2) = 720. Then read the problem again to notice that

Zen Series High School Number Theory

28

the 6 angles form a non-constant arithmetic sequence. Now you can restate the problem
in your own words. You are looking for non-constant 6-term arithmetic sequences of
positive integers that have a sum of 720.
Step 2:

Devise a plan

Once again choose a tool and recall what you know about arithmetic sequences. Name
the unknowns and let the sequence have a common dierence of d. Then the terms of
the sequence are m 5d, m 4d, m 3d, m 2d, m d, and m. The sum of the terms is 720,
so 6m 15d = 720. Take a possible step and see if you can find all the ordered pairs (m, d )
of positive integers that satisfy this equation.
Step 3:

Devise a plan

5
d, implying
2
that d is even and m is a multiple of 5. Reread the problem to decide which multiples of 5
are possible values of m. Recall that m is the degree measure of the largest of the 6 angles
of the hexagon, so 120 < m < 180. There are 11 multiples of 5 between 120 and 180.
Dividing both sides of the equation by 3 gives 2m 5d = 240, so m = 120 +

Step 4:

Look back

Before entering an answer of 11, take a moment to make sure your answer makes
sense. Are all 11 multiples of 5 between 120 and 180 suitable values of m? The equation
5
m = 120 + d implies that d is a positive integer for each value of m. Furthermore, the
2
smallest angle of the hexagon has degree measure m 5d = 240 m, which is also a
positive integer for each value of m. Therefore there are in fact 11 possible values of m.
A Diophantine equation x y + a x + by = c can be rewritten as x y + a x + by + ab = c + ab,
and then as (x + b)(y + a) = c + ab. The positive integer solutions can then be found by
finding all pairs of factors of the integer c + ab.
EXAMPLE 2: Tyler has a large set of square white tiles and a large set of square black tiles, all of
the same size. He wants to use a number of white tiles to make a rectangle and an equal number
of black tiles to create a border one tile wide around the rectangle. How many non-congruent
white rectangles can he construct?

A. 1

B. 2

C. 3

D. 4

E. 5

Answer B

Zen Series High School Number Theory

29

Solution
Step 1:

Understand the problem

Draw a (mental) picture of the white rectangle and the black border. You can look at
extreme cases to see that if the rectangle is very large, Tyler will need to use more white
tiles than black tiles. On the other hand, if the rectangle is very small, he will need to use
more black tiles than white tiles. Now you can understand the question, even if you cant
see a clear path to the answer.
Step 2:

Devise a plan

Choose convenient units by assuming that each tile has side length 1. Then name the
unknowns by letting the rectangle have dimensions a and b with a b. You should be able
to express the area of the rectangle and the area of the border both in terms of a and b.
The two expressions must be equal, so you can create an equation in a and b. After
creating the equation, you can look for positive integer solutions.
Step 3:

Carry out the plan

The area of the rectangle is ab. The border contains a tiles along each of the longer sides
of the rectangle, b tiles along each of the shorter sides, and 4 corner tiles, so its area is
2a + 2b + 4. The two areas must be equal, so ab = 2a + 2b + 4. (See Note 1 for another way
to arrive at this equation.) Now how can you find all ordered pairs (a, b) of positive integers
with a b that satisfy the equation?
One approach is to write the equation as ab 2a 2b 4 = 0. Look for structures and
patterns to notice that if you were to change 4 to +4, you could factor the left side.
Take a possible step and rewrite the equation as ab 2a 2b + 4 = 8, then factor to get
(a 2)(b 2) = 8. Because a b, there are two possible ordered pairs (a 2, b 2),
namely (8, 1) and (4, 2). The corresponding ordered pairs (a, b) are (10, 3) and (6, 4), so the
number of non-congruent white rectangles that Tyler can construct is 2. (See Note 2 for
another way to arrive at this conclusion.)
Step 4:

Look back

You can check your work, at least in part, by verifying that both of your solutions satisfy
required conditions. If the white rectangle is 10 3, then the rectangle plus the border form
a 12 5 rectangle. The two rectangles have areas 30 and 60, implying that the white
rectangle and the border have the same area. Similarly, if the white rectangle 6 4, then
the rectangle plus the border form an 8 6 rectangle. The two rectangles have areas 24
and 48, again implying that the white rectangle and the border have the same area.
Zen Series High School Number Theory

30

Note 1: Another way to arrive at your equation is to notice that the white rectangle plus
the border form a larger rectangle with dimensions a + 2 and b + 2. The larger rectangle
must have twice the area of the smaller, so (a + 2)(b + 2) = 2ab, and simplifying gives
ab = 2a + 2b + 4.
Note 2: Another way to find the positive integer solutions of the equation is to solve it for
2b + 4
8
=2+
one of the unknowns, say a, to get a =
. Then b 2 must be a divisor
b2
b2
of 8, and b a, so the only possible values of b are 1 and 2.

Exercises
Solve problems 1 to 10 in the Edfinity problem set Zen Series High School Number
Theory Section 4.6 Diophantine Equations (edfinity.com/catalog).

Zen Series High School Number Theory

31

You might also like