VerityPrep School Support

Math Olympiad Number Theory: Book 3

Learn olympiad number theory: modular arithmetic, Fermat's and Euler's theorems, lifting the exponent, Pell equations and quadratic reciprocity.

  • School Support
  • Olympics
  • Olympics
Book 3 — Olympiad Number Theory cover

About this book

This is Book 3 of the Math Olympiad series and covers number theory for competition students. It assumes basic algebra and builds the tools that appear repeatedly in olympiad problems.

It begins with divisibility, GCD and LCM, coprimality and GCD identities. The modular arithmetic chapter covers congruences, linear congruences, systems of congruences, Fermat's little theorem, Euler's theorem and multiplicative order. The chapter on primes and valuations covers prime factorisation, factorials, p-adic valuation and the lifting the exponent lemma.

The Diophantine equations chapter compares factorisation, modular and bounding methods, infinite descent, Pell equations, exponential Diophantine equations and Pythagorean triples. The final chapter introduces modular squares, quadratic residues, the Legendre symbol and quadratic reciprocity. Each chapter ends with a revision section, so the book can be used both for first study and for review before a competition.

Look inside

Preview this book

Browse the full contents and read the opening topic.

Sample · 09-Divisibility and GCD

Chapter 9 Overview

Book 3 — Olympiad Number Theory · CHAPTER 09: Divisibility and GCD

"Mathematics is the queen of the sciences, and number theory is the queen of mathematics." — Carl Friedrich Gauss (as reported by Sartorius von Waltershausen, 1856)

8 4 4 12 8 gcd(12, 8) = 4 The smallest square's side is the gcd.

Welcome to Book 3. Number theory studies the integers — and it begins, as Euclid did, with a single relation: divisibility. We write \( d\mid n \) ("\( d \) divides \( n \)") when \( n=dk \) for some integer \( k \). Everything in this chapter grows from that one idea: greatest common divisors, coprimality, and the beautiful identities that let you compute the gcd of enormous expressions without ever factoring them.

The organising engine of the chapter is the Euclidean algorithm, pictured above. To find \( \gcd(12,8) \), tile a \( 12\times8 \) rectangle with the largest squares that fit: an \( 8\times8 \), then two \( 4\times4 \). The side of the smallest square is the gcd. That geometric picture is exactly the arithmetic of repeated division \( a=qb+r \) — and it powers everything from Bezout’s identity to the RSA cryptosystem.

The four sections below build in order: divisibility and factor structure (09.1), the gcd/lcm machinery of Euclid and Bezout (09.2), coprimality and its consequences (09.3), and the gcd identities for expressions and powers (09.4). Use the map to see where a problem lives.

What are you working with?divisibility and factorcountsDIVISIBILITY 09.1primes and divisorstructurefind a gcd or an lcmGCD and LCM 09.2Euclid, then Bezoutare two numbers coprime?COPRIMALITY 09.3gcd = 1 and its powergcd of a whole formula?GCD IDENTITIES 09.4expressions and powers

📋 How this chapter works

The familiar rhythm, tuned for number theory.

SectionWhat it gives you
📋 Strategy Cornerthe definitions, the key lemma, and the standard computation
Decision flowchartthe method as a procedure, with the self-check that confirms the answer
🌍 Math in the Real Worldwhere the idea powers cryptography, computing, and more
⚠️ Common Trapthe specific way strong students lose the mark
Worked Examplea full solution, with the divisibility check that catches errors
🚀 Challenge Yourselfa harder problem with a hint but no solution

The golden rule of this chapter: when in doubt, reduce. The Euclidean step — replacing a pair by a smaller one with the same gcd — is the most reliable move in all of elementary number theory. Almost every identity here is that one idea in disguise.


09.1 Divisibility

09.1 Divisibility

An integer \( d \) divides \( n \), written \( d\mid n \), if \( n=dk \) for some integer \( k \). This single relation obeys a handful of rules that you will use constantly: if \( d\mid a \) and \( d\mid b \), then \( d\mid(a\pm b) \) and \( d\mid ka \) for any integer \( k \); and divisibility is transitive, \( a\mid b \) and \( b\mid c \) give \( a\mid c \).

The deepest fact about the integers — the Fundamental Theorem of Arithmetic — says every integer greater than \( 1 \) factors uniquely into primes. That unique factorisation is what turns divisibility questions into counting questions: once you know \( n=p_1^{e_1}\cdots p_k^{e_k} \), the entire divisor structure of \( n \) is determined.

📋 Strategy Corner — Divisibility Properties · Reading Factorisation

From \( n=p_1^{e_1}\cdots p_k^{e_k} \), the divisor data follows a formula:

Continue reading — 5 chapters, worked examples and practice.

Sign in to buy

Built for Olympics preparation

Topics follow the Olympics syllabus with visual explanations and worked solutions close to the lesson content.

Readable in the portal

The book opens in the VerityPrep reader with chapter navigation, search and reading controls.

Share-ready link