Chapter
1

Number Theory and Proof

Whole numbers are the oldest objects in mathematics, and they still hold some of its deepest secrets.

In this chapter

  1. 1.1 A Prime Factory STEP II 2002 Worksheet
  2. 1.2 How Thinly Spread Are the Primes? STEP III 2016 Worksheet
  3. 1.3 The Smallest Counterexample STEP III 2015 Worksheet
  4. 1.4 \(e\) Is Irrational, and So Is \(e^2\) STEP III 2024 Worksheet
  5. 1.5 Infinite Descent STEP III 2022 Worksheet
  6. 1.6 Sums of Two Squares STEP II 2023 Worksheet
  7. 1.7 When Factorisation Fails STEP I 2016 Worksheet
  8. 1.8 Counting the Rationals STEP III 2020 Worksheet
  9. 1.9 Tangents to a Cubic STEP I 2009 Worksheet
  10. ✔ Looking back: what we have learned
Chapter 1 \(\cdot\) Introduction

Why Whole Numbers?

Mathematics is the queen of the sciences, and number theory is the queen of mathematics.

— Carl Friedrich Gauss

Whole numbers are the first mathematical objects anyone meets. You learned to count before you could read. And yet the simplest questions about them can be fiendishly hard. Is every even number greater than 2 the sum of two primes? Nobody knows: Christian Goldbach asked in 1742, computers have checked it beyond \(4 \times 10^{18}\), and it has still never been proved. Are there infinitely many pairs of primes that differ by 2, like \(11\) and \(13\), or \(101\) and \(103\)? Nobody knows that either, although in 2013 an almost unknown mathematician called Yitang Zhang stunned the world by proving that there are infinitely many pairs of primes differing by at most \(70\) million, a number since brought down to \(246\). Pierre de Fermat scribbled in a margin in 1637 that \(x^n + y^n = z^n\) has no solutions in positive whole numbers when \(n \geq 3\). It took more than 350 years, and some of the most sophisticated mathematics ever created, before Andrew Wiles proved him right in 1994.

This mixture of questions a child can understand and answers that can take centuries is what makes number theory addictive. It is also why number theory has always been the training ground for proof. When you cannot check every case, because there are infinitely many whole numbers, you have to find an argument that covers them all at once. Most of the proof techniques you will use for the rest of your mathematical life were first sharpened on questions about whole numbers.

Pure, useless, and running the internet

In 1940 the Cambridge mathematician G. H. Hardy wrote, with some pride, that number theory was the purest of all mathematics, too remote from ordinary life to be put to any practical use, and so too remote to be put to any harmful use either. He could hardly have been more wrong. Every time you buy something online, send a secure message or unlock your phone, you are relying on number theory. The RSA system (1977) depends on the fact that multiplying two large primes is easy but recovering them from their product seems to be impossibly hard. Modern systems use the arithmetic of the very curves you will meet at the end of this chapter. The “useless” mathematics of the eighteenth and nineteenth centuries became the security of the twenty-first.

What you will meet at university

If you study mathematics at university, number theory will be one of your first destinations and one of your last.

  • In your first term you will almost certainly take a course with a name like Numbers and Sets or Foundations. It will teach you to write proofs properly, and much of its raw material is number theory: induction, the Euclidean algorithm, modular arithmetic, Fermat’s Little Theorem, the Chinese Remainder Theorem, and the surprising fact that some infinite sets are bigger than others.

  • In group theory, usually in the first year, you will discover that many number-theory facts are shadows of a single theorem about symmetry, Lagrange’s Theorem.

  • In the second year a course in Number Theory typically covers quadratic reciprocity (Gauss’s “golden theorem”), continued fractions and Pell’s equation.

  • Later you can go further: algebraic number theory, where new number systems such as the Gaussian integers rescue unique factorisation; analytic number theory, which uses calculus and complex analysis to count primes; and the theory of elliptic curves, which lies behind the proof of Fermat’s Last Theorem and one of the seven million-dollar Millennium Prize Problems.

The questions that run through this chapter

The nine STEP questions in this chapter circle around three big questions. Keep them in mind as you work; we will come back to them at the end.

  1. How many primes are there, and how are they spread out? Everyone knows there are infinitely many. But how thinly do they thin out, and what kind of argument can tell us?

  2. How can you prove that a number is not a fraction? Showing that a number is rational just needs an example. Showing that it is irrational means ruling out infinitely many possibilities. How is that ever done?

  3. Which equations have whole-number solutions, and what happens when we change the number system? Sometimes we can show an equation has no solutions at all. Sometimes the best way to understand whole numbers is to step outside them, into the complex numbers or onto a curve.

A chapter about proof

Running underneath those three questions is a fourth theme: how to prove things. Each section has been chosen partly because it shows a different method of proof in action, and between them they make a fair toolkit for a first-year undergraduate.

§ Topic Way of thinking
1.1 Fermat numbers An infinite family that needs infinitely many primes
1.2 Products of primes Strong induction; information hidden in binomial coefficients
1.3 \(\sqrt2\) again “Take the smallest one”: the well-ordering principle
1.4 \(e\) and \(e^2\) Trapping a whole number strictly between 0 and 1
1.5 Impossible equations Infinite descent; working modulo \(n\)
1.6 Sums of two squares Changing the setting: complex numbers
1.7 A strange number system Questioning what you take for granted
1.8 Listing the fractions Building a bijection; descent in reverse
1.9 Cubes and curves Geometry solving arithmetic

How to read this chapter

Each section starts with a STEP question exactly as it was set. Try it yourself first, for at least half an hour, before you read on. You will learn far more from a question you have struggled with than from one you have only read about. When you do read on, the Ask yourself boxes are invitations to stop and think before the answer arrives, and the Pause and try boxes mark the moments where the key idea is within your reach. Then the What’s really going on part of each section looks past the exam to the mathematics you will meet at university.

The sections increase roughly in sophistication, but they are largely independent. If one doesn’t grip you, move on and come back to it later.