Why 1 is not a prime number Image: David Eppstein (CC0)

Why 1 is not a prime number

Ask a class whether 1 is prime and most hands go up for yes. The reasoning is sound as far as it goes: a prime is a number divisible only by 1 and itself, and 1 is divisible only by 1 and itself. Then the teacher says that 1 is not prime, by convention, and the class files that away as one more arbitrary rule. The rule is not arbitrary. It took mathematicians about a century to settle on it, and they settled on it for a reason that is worth knowing, because the reason is the most important theorem in elementary number theory.

What the modern definition says

A prime number is an integer greater than 1 whose only positive divisors are 1 and itself. The clause "greater than 1" is part of the definition, written out, in every textbook published in the last hundred years. The integers greater than 1 that are not prime are called composite. The number 1 is neither: it is in a category of its own, and the usual name for it is the multiplicative identity, since multiplying by 1 changes nothing.

So 1 is excluded by fiat. The question is why anyone would write the definition that way, when "divisible only by 1 and itself" is shorter and includes 1 without further comment.

The theorem that decides it

The fundamental theorem of arithmetic says that every integer greater than 1 can be written as a product of primes, and that this can be done in only one way apart from the order of the factors. For example, 360 = 2 × 2 × 2 × 3 × 3 × 5, and however you go about splitting 360 into factors, you end up with three 2s, two 3s, and one 5. The theorem is the reason prime numbers matter at all. Primes are the atoms of multiplication, and the theorem says that every integer is a molecule built from atoms in exactly one way.

Now suppose 1 were a prime. Then 360 would also equal 1 × 2 × 2 × 2 × 3 × 3 × 5, and 1 × 1 × 2 × 2 × 2 × 3 × 3 × 5, and so on without end. The factorization would no longer be unique. You could repair the theorem by adding a clause ("unique apart from the order of the factors and apart from any number of factors equal to 1"), but every theorem that uses unique factorization would need the same clause, and there are hundreds of them. The formula for the number of divisors, the formula for Euler's totient function, the whole theory of multiplicative functions in Unit 6 of the masterclass: each one would carry an exception for the prime 1. The cleaner choice is to keep the theorem clean and exclude 1 from the primes once, in the definition.

The same logic excludes 1 from being composite. A composite number is a product of two smaller integers greater than 1, and 1 is not. So 1 stands alone, and the integers greater than 1 split into primes and composites with nothing left over.

A century of disagreement

The exclusion was not always standard. Euclid, writing around 300 BC, did not count 1 as a number at all; for him the numbers started at 2 and 1 was "the unit" from which numbers were made, so the question did not arise. The Greek view held through the Middle Ages. The trouble began when 1 became a number like any other and authors had to decide what to do with it.

Christian Goldbach, in his letter to Euler of 7 June 1742, stated his conjecture about sums of primes in a form that needs 1 to be prime: every integer greater than 2 is a sum of three primes, which for 4 = 1 + 1 + 2 only works if 1 counts. Euler, replying, treated 1 as prime in the same spirit. A century later the question was still open in practice. Derrick Norman Lehmer's table of primes to ten million, published by the Carnegie Institution in 1914, begins with 1. G. H. Hardy's A Course of Pure Mathematics, in editions up to the 1930s, listed 1 among the primes in one passage. Chris Caldwell and Yeng Xiong traced the history in a paper in the Journal of Integer Sequences in 2012 and found authors on both sides well into the twentieth century, with the modern convention winning out as the abstract point of view, in which primes are defined by their role in factorization, replaced the older view in which primes were defined by their divisors.

Henri Lebesgue is sometimes named as the last professional mathematician to call 1 prime, in a paper of the 1930s. Whether or not he was the last, by the middle of the century the matter was closed in research mathematics, and the textbooks followed.

Three places where the convention shows up

Once you know why 1 is excluded, you start to see the convention doing its work.

The sieve of Eratosthenes starts at 2. Write the numbers from 2 to 100, circle 2, cross out its multiples, circle the next number not crossed out, and continue. If you started at 1 and crossed out all multiples of 1, you would cross out everything. The algorithm only makes sense because 1 is not on the list.

Euclid's proof that there are infinitely many primes multiplies a finite list of primes together and adds 1. The number so formed has a prime factor, and that factor is not on the list. If 1 were a prime, "has a prime factor" would be true of every integer trivially, and the argument would lose its point. With the modern definition, the statement "every integer greater than 1 has a prime factor" is a real theorem, proved by taking the smallest divisor greater than 1.

The product formulas of arithmetic functions all run over the primes dividing n. Euler's function φ(n), which counts the integers up to n that share no factor with n, is n times the product of (1 - 1/p) over the primes p dividing n. For n = 1000 the primes are 2 and 5 and the formula gives 1000 × (1/2) × (4/5) = 400. If 1 were a prime dividing everything, every such product would contain the factor (1 - 1/1) = 0, and every function would be identically zero.

What about the number 2?

A related question comes up in the same conversations: is 2 really prime, given that it is even? It is. The only positive divisors of 2 are 1 and 2, so 2 satisfies the definition, and it is the only even prime, since every other even number is divisible by 2. Many theorems about primes have to treat 2 separately, which is a nuisance, but a nuisance is not a reason to change a definition. The case of 1 is different: including it would break a theorem, and that is a reason.

A convention with content

There are conventions in mathematics that could have gone either way. Whether 0 belongs to the natural numbers is one; this masterclass takes the positive integers 1, 2, 3, ... as the natural numbers and says so once, and a book that includes 0 is not wrong, only different. The status of 1 is a convention of a different kind, because one of the two choices makes a central theorem false as stated. If you want a one-sentence answer for the class, this is it: 1 is not prime because if it were, numbers would not factor into primes in only one way.

Unit 3 of the masterclass proves the fundamental theorem of arithmetic in full, existence by strong induction and uniqueness by Euclid's lemma, and then shows a system of numbers, the integers of the form 4k + 1, in which uniqueness fails and 441 = 9 × 49 = 21 × 21 has two factorizations into "primes". Seeing uniqueness fail somewhere is the best way to appreciate why we protect it in the integers, down to the smallest detail of the definition.

Study the integers properly

The NT Masterclass: weekly units, quizzes, a final exam, and a certificate.
About the program