Number Theory

Number theory is the study of the whole numbers — 1, 2, 3, \dots — and the astonishingly deep patterns hiding inside them. It asks the most childlike questions in all of mathematics ("which numbers are prime?", "when is one number a multiple of another?", "which sums of squares are possible?") and discovers that the answers run breathtakingly deep, connecting to almost every other branch of the subject.

Carl Friedrich Gauss called it the queen of mathematics. Its questions are easy to state and often fiendishly hard to answer — some, like the Riemann Hypothesis, have resisted the finest minds for over a century. And for two thousand years it was prized as the purest, most useless of mathematics — until it quietly became the machinery that keeps every online secret safe.

The big idea: divisibility and primes

One thread runs through the whole subject: divisibility — which numbers divide which. From it grow the primes, the indivisible atoms every other number is built from, and the whole edifice of modular arithmetic, the "clock arithmetic" of remainders. Master those two ideas and the rest of number theory unfolds as a series of ever-more-surprising consequences.

The shape of the journey

The course climbs in nine stages, each resting on the last.

Stage 1 — Divisibility & the integers

  1. The Division Algorithm
  2. The Greatest Common Divisor
  3. The Euclidean Algorithm
  4. Bézout's Identity
  5. The Extended Euclidean Algorithm
  6. The Least Common Multiple
  7. Linear Diophantine Equations

Stage 2 — Primes

  1. The Fundamental Theorem of Arithmetic
  2. The Infinitude of Primes
  3. The Sieve of Eratosthenes
  4. The Distribution of Primes
  5. Mersenne and Fermat Primes
  6. Primality Testing

Stage 3 — Congruences

  1. Modular Arithmetic
  2. Arithmetic mod n
  3. Linear Congruences
  4. Modular Inverses
  5. The Chinese Remainder Theorem
  6. Fast Modular Exponentiation

Stage 4 — The multiplicative world

  1. Fermat's Little Theorem
  2. Euler's Totient Function
  3. Euler's Theorem
  4. Wilson's Theorem
  5. The Order of an Element
  6. Primitive Roots
  7. The Discrete Logarithm

Stage 5 — Quadratic residues

  1. Quadratic Residues
  2. The Legendre Symbol
  3. Euler's Criterion
  4. The Law of Quadratic Reciprocity
  5. The Jacobi Symbol

Stage 6 — Arithmetic functions

  1. Multiplicative Functions
  2. The Divisor Functions
  3. Perfect Numbers
  4. The Möbius Function
  5. Möbius Inversion
  6. The Euler Product

Stage 7 — Diophantine equations & Gaussian integers

  1. Pythagorean Triples
  2. Sums of Two Squares
  3. The Gaussian Integers
  4. Continued Fractions
  5. Pell's Equation
  6. Fermat's Last Theorem

Stage 8 — Analytic number theory

  1. The Riemann Zeta Function
  2. The Euler Product for Zeta
  3. Dirichlet Series
  4. The Prime Number Theorem
  5. Dirichlet's Theorem on Arithmetic Progressions
  6. The Riemann Hypothesis

Stage 9 — Algebraic number theory

  1. Number Fields
  2. Algebraic Integers
  3. Ideals and Unique Factorization
  4. The Ideal Class Group
  5. p-adic Numbers

Let's get started

We begin where all of number theory begins — not with primes, but with the humble act of division with remainder. Everything else is built on it.

Let's get started → The Division Algorithm