TJUSAMO Practice #4: Basic Number Theory: 1 Modular Arithmetic
TJUSAMO Practice #4: Basic Number Theory: 1 Modular Arithmetic
HMao
August 19th, 2006
Number theory is one of the four major topics of math olympiads. Unfortunately,
most school curricula do not cover number theory at all, leaving many people clueless about
the subject. In general, number theory is the study of the integers and their properties. This
article will go over the theorems and concepts of number theory everyone absolutely must
know to get anywhere in number theory, as well as provide some practice.
1 Modular Arithmetic
Mods should naturally spring to mind while working with number theory. Basically,
”a (mod b)” is the remainder when a is divided by b. For all integers n > 1, we say that
modulo n is a ”congruence class.” You don’t really need to know the technicalities of the defi-
nition of a congruence class for now. Basically, we have a ≡ a+kn (mod n) for all integers k.
2 Five Theorems
These theorems should be second nature to you.
1
Note that φ(n) is defined as the number of naturals less than n and relatively prime to n.
If n is a prime, we have the subsidiary Fermat’s Little Theorem, which states that
an ≡ a (mod n).
3 Diophantine Equations
A very common type of number theory problem in many math olympiads is the
diophantine equation(DE). This is any equation in which the solution set is comprised of
only integers. Generally, a problem will present a system of diophantine equations and ask
you to find all the solutions, and prove that you have found every one of them.
2
3.1.2 Show that your answers all work
You can usually get away with saying ”It is trivial to show that these answers satisfy
the given equation(s).” This step could even be omitted if it is really obvious.
2. Take the equation(s) in some mod. Mod 2 is a good starting point. If you see a n-th
power, try using mod n+1 or mod 2n+1. If you see squares, also try mod 4 and mod 8.
If you see cubes, try mod 8, or mod 9. If you see fourth powers, try mod 16. Sometimes
the key step to a problem is finding the right mod.
7. Can you show that there cannot be any solutions if one of the variables approaches
infinity?
9. WOP and infinite descent often work together with mods to solve a problem.
11. Think about what theorems might be applicable to the problem, and try to use them.
12. Think about what would happen if one of the variables was prime.
14. Assume the guy next to you has already solved the problem, and think about what he
could have done.
15. Revisit some of the previous progress you made and try to build off of it.
16. Start over; pretend you have never seen the problem yet.
3
3.3 Classics
There are some diophantine equations you just have to know. Here they are for you
to absorb.
4 Problems
I challenge you to solve ALL of the following 15 problems by the time the advanced
number theory lecture rolls around. I know you have enough time to do this, and you are
welcome to ask me for help. All of the problems can be solved by things you should know.
If you give up, you are a noob. If you succeed, then you will be ready for the next level...
1. {1.5} Prove Wilson’s theorem.
2. {2.5} Prove Euler’s theorem.
21n+4
3. {1} [IMO 1959] For natural n, prove that 14n+3
is irreducible.
4. {1.5} (DE) Solve across naturals:
a2 + b2 + c2 + 1 = (a + b + c)!
5. {1.5} [Leningrad 1984] Find all prime unordered pairs (a, b) such that ab + ba is prime.
6. {1.5} [MOP ’05] N is a number with has exactly 3n digits. If these digits are all equal,
prove that N is divisible by 3n .
7. {1.5} [USAMO 1979] Solve across the nonnegative integers:
4
8. {2} [USAMO 1972] (In this problem, parenthesis denote GCD and brackets denote
LCM) Prove that for all naturals a, b, c,
a2 + b2 + c2 = a2 b2
n
10. {2} (For any natural n, the nth Fermat number is 22 + 1) Find all Fermat numbers
that are also perfect cubes.
12. {2.5} Prove that for every n, there are an infinite number of Fibonacci numbers that
are divisible by n.
13. {2.5} [IMO SL 2005] Find the smallest number n such that there exist n cubes that
add up to 20022002 .
14. {3} [IMO 1998] Find all ordered pairs of integers (a, b) such that
ab2 + b + 7 | a2 b + a + b
15. {3.5} [USAMO 2005] (DE) Prove that there are no solutions to the following system:
x6 + x3 + x3 y + y = 147157
x3 + x3 y + y 2 + y + z 9 = 157147