Math · 14

Number Theory

← Partial Differential EquationsCombinatorics →

Problems first

Attempt these before you open a book or a video. Write the argument in the work box and the conclusion in the answer box. Check counts the problem only when both pass, and it does not open the solution. The solution stays locked for twenty minutes after you start the timer.

Attack 1

Prove there are infinitely many primes.

Timer not started. Twenty minutes of real work before a solution.

Attack 2

Solve \(3x\equiv 1\pmod{10}\).

Timer not started. Twenty minutes of real work before a solution.

Attack 3

State Fermat’s little theorem and use it to compute \(2^{10}\mod 11\).

Timer not started. Twenty minutes of real work before a solution.

Prerequisites

What this actually is

Elementary number theory is the arithmetic of the integers: divisibility, primes, congruences, and the multiplicative group of units modulo \(n\). The theorems you use forever are Euclid’s lemma, the Euclidean algorithm, the Chinese remainder theorem, Fermat’s little theorem, and the existence of primitive roots modulo primes. Quadratic reciprocity is the first theorem that feels deeper than the definitions. Analytic number theory, which counts primes, is a later life. This page stops at reciprocity and at the contest problems that use only this machinery.

William Stein’s Elementary Number Theory is a free PDF and it is the working book. Ireland and Rosen is the paid next book; no edition was verified. Contest number theory at the AIME and early Putnam level is the ceiling that matches this page. Algebraic number theory waits until the abstract-algebra page is real.

If you cannot compute a modular inverse by hand, you do not know the Euclidean algorithm, regardless of how many theorems you can name.

Core results

Statements only. Write the argument before you reveal it. A revealed proof you did not attempt is a paragraph you will not be able to rebuild at 2am.

  1. Divisibility. The Euclidean algorithm computes \(\gcd\). Bézout: \(\gcd(a,b)=ax+by\) for some integers \(x,y\). Euclid’s lemma: if a prime divides a product, it divides a factor. Unique factorization follows.

  2. Congruences. \(ax\equiv b\pmod n\) has a solution iff \(\gcd(a,n)\) divides \(b\), and then there are exactly that many solutions modulo \(n\). The Chinese remainder theorem: if the moduli are coprime in pairs, the system has a unique solution modulo the product.

  3. Units. \((\mathbb{Z}/n\mathbb{Z})^\times\) is a group of order \(\varphi(n)\). Euler’s theorem: \(a^{\varphi(n)}\equiv 1\pmod n\) when \(\gcd(a,n)=1\). Fermat is the prime case. For an odd prime \(p\), the multiplicative group mod \(p\) is cyclic.

  4. Quadratic residues. The Legendre symbol \(\left(\frac{a}{p}\right\)\) is 1, −1, or 0 according as \(a\) is a quadratic residue, a nonresidue, or 0 mod an odd prime \(p\). Euler’s criterion and the law of quadratic reciprocity compute it.

  5. Diophantine samples. Linear Diophantine equations are Bézout. The equation \(x^2+y^2=z^2\) is solved by rational points on the circle, or by the standard parametrization. Fermat’s theorem on sums of two squares characterizes primes that are sums of two squares as 2 and those congruent to 1 mod 4.

The ladder

Four rungs, in order. Do not skip a rung because the next one looks more serious.

Tier 0 / First contact

Watch or read once. Do not study from this.

Stein, Elementary Number Theory, the PDF’s table of contents
Read once, do not study from this. Skim the contents so you see the path from gcd to reciprocity. Then start at chapter 1 and do the exercises.

Tier 1 / Main text

The thing you work through.

William Stein, Elementary Number Theory: Primes, Congruences, and Secrets
Free PDF. This is the main text. It includes computation, which keeps the theorems honest.

Tier 2 / Hard problems

The problem book.

AIME number theory and Stein’s exercises
AIME is the right hard-problem layer. Stein’s later exercises are the other half.

Tier 3 / The ceiling

The hardest questions that exist at this level.

Putnam number theory via Borisov and Kedlaya
The sorted list plus the archive https://kskedlaya.org/putnam-archive/ . Ireland and Rosen is the paid graduate-leaning book; no edition was verified.

Hardest questions

Names and links. The problem text stays on the source site. Copyrighted contest problems are not copied here. What follows is where they are and why they hurt.

  1. AIME number theory, problems 10–15
    Modular arithmetic under a requirement that the answer is a three-digit integer.
  2. Borisov, number theory section
    Putnam number theory is olympiad number theory with less time and cleaner writing demanded.
  3. Quadratic reciprocity computations in Stein
    The symbol is easy to mis-multiply. The exercises catch that.
  4. Prove the multiplicative group mod p is cyclic, as far as you can
    This is the structural theorem of the page. A citation is not a proof.
  5. Infinitely many primes congruent to 3 mod 4
    Euclid’s proof with one extra idea. If you cannot find the idea, you do not yet own congruences.

Mastery gate

Pass: Euclidean algorithm and inverse, from memory; proof of infinitely many primes; proof of Euler’s theorem from Lagrange; five AIME number-theory problems numbered 10 or higher. Fail if quadratic reciprocity is a formula you cannot evaluate on a small prime.

Diagrams

primes
The Euclidean algorithm is the whole elementary theory in one loop.

Escalating sets

Five sets. Finish a set before you touch the next. Full sentences, not a circled answer.

Set 1. Arithmetic

  1. Euclidean algorithm for 252 and 198.
  2. Bézout coefficients for that pair.
  3. Prove Euclid’s lemma.
  4. Infinitely many primes.
  5. Infinitely many primes congruent to 3 mod 4.

Set 2. Congruences

  1. Solve \(3x\equiv 1\pmod{10}\).
  2. Solve the system \(x\equiv 2\pmod 3\), \(x\equiv 3\pmod 5\).
  3. State the Chinese remainder theorem.
  4. Compute \(\varphi(100)\).
  5. Euler: last two digits of \(3^{40}\), or say why you need a sharper tool.

Set 3. Structure

  1. Fermat mod 11 on \(2^{10}\).
  2. Find a primitive root mod 7.
  3. Prove Euler from Lagrange.
  4. Show \((\mathbb{Z}/8\mathbb{Z})^\times\) is not cyclic.
  5. Order of 2 mod 13.

Set 4. Residues

  1. Legendre symbol \((2/7)\) by listing.
  2. Euler’s criterion for that symbol.
  3. One reciprocity computation Stein assigns.
  4. Which primes are sums of two squares? State the theorem.
  5. A Pythagorean triple that is not a multiple of 3-4-5, generated by the parametrization.

Set 5. Ceiling

  1. Five AIME number-theory problems, number ≥ 10.
  2. Three Borisov problems.
  3. Primitive root existence, outline.
  4. Infinitely many primes 3 mod 4, memory.
  5. Oral Euclidean algorithm.

Return bank

Ten problems to meet again. Logging a writeup schedules them at 1 day, 7 days, and 30 days in this browser.

  1. Infinitely many primes.
  2. Inverse of 3 mod 10.
  3. Fermat mod 11.
  4. Chinese remainder, two moduli.
  5. \(\varphi(100)\).
  6. Primitive root mod 7.
  7. Units mod 8 are not cyclic.
  8. Euclid’s lemma.
  9. Primes 3 mod 4, infinitely many.
  10. One AIME #12 on congruences.

Oral pass

Prove there are infinitely many primes, compute a modular inverse with the Euclidean algorithm, and state Fermat’s little theorem. No notes.

← Partial Differential EquationsCombinatorics →