Prime Patterns
Math · Advanced · Lesson 6 of 7

Sums of Two Squares

Fermat’s Christmas theorem

An interactive lesson with 7 steps, about 6 minutes: you predict, drag and solve, with instant feedback on every answer. It runs in your browser and needs JavaScript.

What you’ll learn

  • A prime is a sum of two squares exactly when it is 2 or of the form 4k+14k + 1.
  • Squares leave remainder 0 or 1 mod 4, so 4k + 3 numbers can never work.
  • The number of grid points inside a circle of radius rr is about πr2\pi r^2.

Steps

  1. Points on a circle
  2. Which primes?
  3. Why 4k + 3 fails
  4. Fermat’s Christmas theorem
  5. Multiplying sums
  6. Counting inside the circle
  7. Spot the sum