Number Theory for Olympiads — IOQM, RMO and INMO
Weightage: Number theory is one of the four olympiad areas (with algebra, combinatorics and geometry) and routinely supplies one or two problems in every stage from the IOQM to the INMO. The tools below are short, but a problem is solved by choosing the right one, so each section ends with a worked example.
1. Divisibility and the Euclidean algorithm
Write when for an integer . The greatest common divisor satisfies , which is the Euclidean algorithm. Its reverse gives Bezout's identity: integers exist with .
Two consequences recur constantly:
- and imply .
- has an integer solution exactly when .
Also , and .
2. Modular arithmetic
Congruence means , and it respects addition, multiplication and powers. Division needs care: you may cancel a factor only if .
Squares are restricted. A square is or , or , and or . A cube is . These facts kill many equations at once.
Worked example. The last two digits of : since and , we get , so the last two digits are .
3. Fermat, Euler and Wilson
For a prime and :
Euler's theorem generalises it: if then , where
Wilson's theorem: for a prime .
The order of modulo is the smallest with , and it divides . Whenever , the order divides . This single fact solves most "find the smallest exponent" questions.
Worked example. Prove . Factor as . It is even (consecutive integers), divisible by 3 (three consecutive integers), and by 5 because by Fermat. Since 2, 3 and 5 are coprime, divides it.
4. The Chinese remainder theorem
If the moduli are pairwise coprime, the system has a unique solution modulo .
Worked example. Solve , , . From the first and third, , so . Testing : . So .
CRT also lets you prove statements prime by prime and combine them.
5. Valuations and lifting the exponent
Let be the exponent of the prime in . Legendre's formula gives:
The lifting the exponent (LTE) lemma: for an odd prime with and ,
For with even, .
Worked example. Find . Here , so the lemma gives . For the answer is 3.
6. Diophantine equations: the toolkit
Try these in order.
- Factor. becomes . The positive pairs give .
- Parity and residues. Reduce modulo a small number to show there is no solution, such as .
- Bounding. Show the sides are close for large variables, then check the few remaining cases.
- Descent and Vieta jumping. For with positive integers, assume a minimal pair , treat the equation as a quadratic in , and replace by its other root . Minimality forces eventually, and that makes a perfect square.
Pythagorean triples are all of the form up to scaling, with coprime and of opposite parity.
7. Number theory in the IOQM
The IOQM asks for integer answers from 00 to 99, so these problems often end with a reduction modulo 100 or a count. Work out the structure, then compute carefully. In a count, test small cases first to confirm the pattern before generalising.
Common traps
- Cancelling a factor that shares a divisor with the modulus. gives only.
- Applying Euler's theorem when .
- Using LTE without the condition .
- Concluding from small cases. A pattern for is not a proof.
- Forgetting negative factor pairs in a factoring argument.
Memory aids
- "Order divides every exponent that gives 1": the order lemma.
- "Factor, reduce, bound, descend": the Diophantine checklist.
- "Squares: 0 or 1 mod 4": the most used residue fact.
Summary
Number theory rests on divisibility and gcd, congruences with Fermat and Euler, CRT for combining moduli, valuations with Legendre and LTE, and a Diophantine toolkit.
The skill is selection: look at the equation, pick the modulus or factorisation that exposes its structure, and prove every case.
Exam protocol
- Test small values to guess the structure before proving.
- State which theorem you use and check its conditions.
- Handle negative integers and zero explicitly.
- In the IOQM, double-check the final reduction modulo 100.