Number Theory
Lesson 1 of 3 9 min +55 XP

Divisibility & Primes

The atoms of arithmetic.

What you'll learn

  • State the division algorithm
  • Define primes and unique factorization
  • Prove there are infinitely many primes
The unsplittable numbers

You can split 12 candies among 2, 3, 4, or 6 friends, but 7 candies only split evenly among 1 or 7. Primes are those unsplittable numbers — the atoms every other whole number is built from by multiplying.

The atoms of the integers

Number theory studies the whole numbers on their own terms. Its bedrock is the division algorithm: for any integers a and b > 0 there are unique q and r with a = qb + r and 0 ≤ r < b. Everything — divisibility, greatest common divisors, modular arithmetic — flows from tracking that remainder r.

A prime is an integer greater than 1 whose only divisors are 1 and itself. The Fundamental Theorem of Arithmetic says every integer greater than 1 factors into primes in exactly one way (up to order). Primes are the atoms; every number is a molecule.

360 = 2³ · 3² · 5 — and no other bag of primes multiplies to 360.
Euclid's gem (c. 300 BCE)

Suppose only finitely many primes exist: p₁, …, pₙ. Let N = p₁·p₂···pₙ + 1. Each pᵢ leaves remainder 1 dividing N, so N's prime factors are new — a contradiction. The primes never run out.

Lab · Sieve of Eratosthenes
  1. Write the numbers 2 through 100 in a 10×10 grid.
  2. Circle 2, then cross out every multiple of 2. Circle the next survivor (3) and cross out its multiples.
  3. Repeat with 5 and 7. Why can you stop at 7 when sieving up to 100?
  4. Count the circled survivors — these are all 25 primes below 100.

What you should see: You extracted every prime under 100 with no division at all, and saw why sieving only needs primes up to the square root of n.

Knowledge Check

+15 XP / correct

1. Dividing 47 by 6, the division algorithm gives q and r as…

2. In Euclid's proof, the number N = p₁···pₙ + 1 matters because…