Why there is no solution
Fermat's Last Theorem says that no three positive integers a, b and c satisfy aⁿ + bⁿ = cⁿ when n is an integer greater than 2. It looks like a puzzle about powers. It took 358 years to prove.
The margin note
In 1637 Pierre de Fermat wrote, in his copy of Diophantus's Arithmetica, that he had a remarkable proof that aⁿ + bⁿ = cⁿ is impossible for an exponent above 2, and that the margin was too narrow to hold it. The note was published after his death. For centuries it was the most famous unsolved problem in mathematics. The only argument of his that survives is the special case n = 4, proved by infinite descent.
Squares are different
For n = 2 the equation is Pythagoras, and it has infinitely many solutions. From two integers m > k > 0, set a = m² − k², b = 2mk and c = m² + k². With m = 2 and k = 1 this is 3, 4 and 5; with m = 5 and k = 2 it is 20, 21 and 29. Nothing of that form gives a solution for cubes or higher powers. One power can still fall very close to a sum of two others, which is why checking a single example by eye, or with a rounded calculator, is not enough.
Near misses
9³ + 10³ = 1,729, which is 12³ + 1. 13⁵ + 16⁵ is only 12 more than 17⁵. And 3,987¹² + 4,365¹², the sum written on a blackboard in The Simpsons, matches 4,472¹² on the first 10 digits. The sum is larger by 1,211,886,809,373,872,630,985,912,112,862,690, about 1.21 × 10³³, which is 1.89 × 10⁻¹¹ of the power. Exact integer arithmetic shows the gap. The theorem says that for an exponent above 2 the gap is never zero.
The proof
Single exponents fell one by one. Fermat proved n = 4. Euler proved n = 3, with a step that was repaired later. Dirichlet and Legendre proved n = 5, and Lamé n = 7. Sophie Germain's work covered a whole family of exponents. In 1995 Andrew Wiles, with a correction written with Richard Taylor, proved that every semistable elliptic curve over the rationals is modular. A solution of Fermat's equation would have produced a curve that is not, so there is no solution for any integer exponent above 2.
Frequently asked questions
Did Fermat really have a proof?
Almost certainly not for the general case. The proof uses mathematics from the 20th century, and the only complete argument Fermat left is for n = 4. He never mentioned the general claim again, which suggests the margin note was a proof he later found to be wrong.
What about a sum of more than two powers?
The theorem is about exactly two powers adding to a third. Sums of more terms are a different question. Euler guessed that a kth power needs at least k kth powers, and that guess is false: 27⁵ + 84⁵ + 110⁵ + 133⁵ = 144⁵.
Is zero allowed?
No. The statement is about positive integers. With a zero, 0ⁿ + cⁿ = cⁿ, which is true and says nothing. Negative bases are a different question for odd exponents, since a negative number to an odd power is negative, and the theorem is stated for positive integers.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Check a sum of powers