false counterexamples to Fermat’s last theorem

Like Martin Gardner’s famous 1975 joke that eπ163 is an integer, hoax counterexamples to Fermat’s last theorem typically depend on the loss of machine precision. The following false counterexamples should check out on most scientific calculators.

178212+184112 = 192212
61076+89196 = 90666
398712+436512 = 447212

Executing the left side of the first equation on a typical scientific calculator and then taking the 12th root of that result will yield 1922. But on software calculators, such as the Mac OS Calculator, the 12th root is given as 1921.99999995495. Rising points out that it is not necessary to carry out any calculations in order to see that the first equation is false: “The left side adds an even numberMathworldPlanetmath and an odd numberMathworldPlanetmath; thus that sum must be odd. The right side is even.” In fact, modular arithmeticMathworldPlanetmathPlanetmath can be used to show all these equations are false: the left side of the second one is congruentMathworldPlanetmath to 5mod9 while the right side is congruent to 3mod9; casting out nines also disproves the third equation.

Taxicab numbersMathworldPlanetmath involving 1x in one of the expressions, like Ramanujan’s friend 1729, can be used to benchmark machine precision. Any scientific calculator will readily show that 103+93123, since 1729312.002314, and for some larger taxicab number a false counterexample will appear. A computer algebra system, on the other hand, can determine the falsehood of a counterexample even if it lacks the machine precision to resolve the numerical difference. For example, on Mathematica, assuming x, y, z, n have been defined: TrueQ[x^n + y^n == z^n] should return False.

Some of these false counterexamples have appeared on episodes of The Simpsons, such as the first one, which appeared in the Homer3 segment of “Treehouse of Horror VI,” first aired October 29, 1995, more than a year after Andrew Wiles and his colleagues announced the corrected proof of Fermat’s last theorem.


  • 1 Gerald R. Rising, Inside Your Calculator: From Simple Programs to Significant Insights. Hoboken, New Jersey: John Wiley & Sons (2007): Appendix D
  • 2 Ray Richmond & Antonia Coffman, The Simpsons: A Complete Guide to Our Favorite Family. New York: HarperCollings (1997): 187
Title false counterexamples to Fermat’s last theorem
Canonical name FalseCounterexamplesToFermatsLastTheorem
Date of creation 2013-03-22 18:05:46
Last modified on 2013-03-22 18:05:46
Owner PrimeFan (13766)
Last modified by PrimeFan (13766)
Numerical id 8
Author PrimeFan (13766)
Entry type Example
Classification msc 14H52
Classification msc 11D41
Classification msc 11F80