What Number Theory Studies and Why It Fascinates People
A tour of number theory: divisibility, primes, remainders and whole-number equations, and why simple questions here can be so hard.
Key takeaways
- Number theory studies the integers, especially divisibility, primes, remainders and whole-number solutions of equations.
- Many of its questions are easy to state and extraordinarily hard to settle, and several famous ones remain open.
- Primes are the multiplicative building blocks: every whole number above 1 factors into them in essentially one way.
- Ideas once pursued purely out of curiosity now support check digits, secure communication and error handling in computers.
Number theory is the study of the whole numbers and the patterns among them. It asks which numbers divide which, how the prime numbers are spread out, what remainders do under arithmetic, and which equations can be solved using integers alone. (The integers are the whole numbers together with their negatives and zero.)
The subject fascinates people because you can state many of its deepest questions to a ten-year-old. Answering them can take centuries, and some still have no answer. The raw material is 1, 2, 3 and so on, yet the arguments reach into nearly every part of modern mathematics.
Divisibility, the starting point
We say that a whole number a divides b when b equals a times some whole number. So 7 divides 91, because 91 = 7 × 13, while 7 does not divide 90. Much of the subject grows from this single relation.
When division does not come out even, you get a remainder. For any integer a and any positive integer b, there is exactly one pair q and r with a = bq + r and 0 ≤ r < b.
100 = 7 × 14 + 2 quotient 14, remainder 2 From that humble fact comes a fast method for finding the largest number dividing two others, called the greatest common divisor. The Euclidean algorithm is more than two thousand years old and still runs inside modern software.
Primes, the atoms of multiplication
A prime number is a whole number greater than 1 whose only positive divisors are 1 and itself. The first few are 2, 3, 5, 7, 11 and 13. Every larger whole number is either prime or can be broken into primes, as in 360 = 2 × 2 × 2 × 3 × 3 × 5.
Better still, that breakdown is unique apart from the order of the factors. This is the reason primes matter so much: a question about multiplication can often be turned into a question about each prime separately. The article on unique factorization shows why the uniqueness is a real theorem and needs proof.
Primes never run out, which Euclid showed with a famous short argument. How they are spaced is another matter. Up close they look erratic, with some pairs separated by only 2 and some stretches containing none for a long way. Seen from far off, they thin out at a remarkably regular rate.
Remainders and clock arithmetic
Suppose it is 9 o'clock and you wait 5 hours. A 12-hour clock reads 2, because 14 leaves remainder 2 on division by 12. Number theorists write 14 ≡ 2 (mod 12), read "14 is congruent to 2 modulo 12".
Congruences let you replace huge numbers with small ones while keeping the information you care about. What is the last digit of 7¹⁰⁰? The last digits of powers of 7 run 7, 9, 3, 1 and then repeat. Since 100 is a multiple of 4, the answer is 1, even though 7¹⁰⁰ has 85 digits.
The same idea explains why divisibility rules work, such as adding digits to test for 3 or 9. Modular arithmetic is the language behind much of what follows.
Equations that demand whole numbers
An equation such as x² + y² = z² has endlessly many solutions if x, y and z may be any real numbers. Insist on positive integers and it becomes a puzzle with structure: (3, 4, 5), (5, 12, 13), (8, 15, 17) and infinitely many more.
Equations to be solved in integers are called Diophantine equations, after Diophantus of Alexandria. A tiny change can transform the answer. Raise the exponent from 2 to any whole number n ≥ 3 and there are no positive integer solutions at all. This is Fermat's Last Theorem, claimed by Pierre de Fermat in the 1600s and finally proved by Andrew Wiles in the 1990s, with a key step completed together with Richard Taylor.
Here are a few questions of this kind that show how varied the outcomes are.
| Question in whole numbers | What is known |
|---|---|
| Which x, y, z satisfy x² + y² = z²? | Infinitely many, with a formula for all of them |
| Is every whole number a sum of four squares? | Yes, proved by Lagrange in 1770 |
| Which primes are a sum of two squares? | 2 and those leaving remainder 1 on division by 4 |
| Can x³ + y³ = z³ with positive integers? | No |
Easy to ask, hard to answer
Part of the pull of number theory is the gap between a question and its solution. Consider these, all open as of the mid-2020s.
- The Goldbach conjecture says every even number greater than 2 is a sum of two primes. Computers have confirmed it far beyond 10¹⁸, with no proof.
- The twin prime conjecture says infinitely many pairs of primes differ by 2, such as 41 and 43.
- The Collatz problem says that if you halve even numbers and send odd n to 3n + 1, you always reach 1 eventually.
- No one knows whether an odd perfect number exists, a number equal to the sum of its smaller divisors.
Open problems do get solved, and progress on several has been rapid at times, so check a current reference for their status. What these examples teach is that a pattern holding for billions of cases may still await a reason. Checking many cases is not a proof, and number theory supplies some of the sharpest warnings.
The main branches
The subject is usually divided by the tools used more than by the questions asked.
"Elementary" means that the methods avoid advanced machinery. It does not mean easy, since some elementary proofs are very intricate. Analytic number theory uses limits and complex analysis, and algebraic number theory enlarges the integers to include numbers such as √−5.
A taste of a number theory argument
Here is a small theorem you can prove completely, to see the style of reasoning. Claim: the square of any odd number leaves remainder 1 on division by 8. Testing gives 9, 25, 49 and 81, and each is one more than a multiple of 8.
An odd number can be written 2k + 1 for some integer k. Squaring it gives 4k² + 4k + 1, which equals 4k(k + 1) + 1. Of the two neighbors k and k + 1, one must be even, so k(k + 1) is even and 4k(k + 1) is a multiple of 8. That finishes the proof for every odd number at once, including negative ones.
The theorem has consequences. A sum of three odd squares leaves remainder 3 on division by 8, so it can never itself be a perfect square, since odd squares leave remainder 1. A few lines about remainders have ruled out infinitely many possibilities, and no amount of searching through examples could have done that.
Notice the ingredients: a general way of writing the numbers in question, a little algebra and one observation about divisibility. Much of elementary number theory is a patient and sometimes ingenious use of exactly these.
From pure curiosity to daily use
For a long time number theory was admired as mathematics pursued for its own sake. The English mathematician G. H. Hardy famously took some comfort, in his 1940 book A Mathematician's Apology, in how remote it seemed from practical and military use.
Things changed with digital communication. Public-key cryptography, developed in the 1970s, relies on arithmetic with very large integers. In one well-known system, multiplying two large primes is quick, while recovering them from the product appears to be very hard for ordinary computers. You can follow a toy version in RSA worked with small primes, keeping in mind that small teaching examples offer no security.
Quieter uses are everywhere. The final digit on many identification numbers is a check digit computed by modular arithmetic, so that a mistyped digit is likely to be caught. Computers use remainders to scatter data into storage slots and to generate patterns that look random.
How to start exploring
You can do real number theory with paper and patience. The habit that matters is to experiment, guess and then ask for a reason.
- Pick a simple operation, such as adding the odd numbers in order: 1, 1 + 3, 1 + 3 + 5.
- Record the results: 1, 4, 9, 16, 25.
- State a guess: the sum of the first n odd numbers is n².
- Test a case you did not use to form the guess: 1 + 3 + 5 + 7 + 9 + 11 = 36 = 6².
- Look for an explanation: each new odd number adds an L-shaped border of dots that grows one square into the next.
That last step turns an observation into a theorem. If you want a method for such arguments, mathematical induction is a natural next skill, along with a willingness to hunt for the case that breaks your guess.
Good first topics are divisibility, primes and congruences, in that order. Each rests on the one before, and none asks for more than arithmetic, a little algebra and careful reasoning. Keep a notebook of conjectures, including the failed ones. A guess that collapses at the eleventh case often teaches more than one that survives, because finding out why it failed shows you which feature of the numbers was doing the work.
Common questions
Is number theory the same as arithmetic?
Arithmetic is about carrying out calculations. Number theory asks why the results behave as they do and proves statements covering infinitely many numbers at once. Older writers sometimes called it "higher arithmetic".
Do you need advanced mathematics?
Not to begin. A first course needs school algebra and a readiness to read proofs. Research at the frontier draws on a great deal of analysis, algebra and geometry.
Why do mathematicians care about problems with no obvious use?
Understanding is the first goal. History also shows that methods invented for one stubborn question often become tools elsewhere, though nobody can predict which ones or when.