Fermat's Last Theorem in fiction

The problem in number theory known as "Fermat's Last Theorem" has repeatedly received attention in fiction and popular culture.

Television
 In the Doctor Who episode "The Eleventh Hour", the Doctor transmits a proof of Fermat's Last Theorem by typing it in just a few seconds on a laptop, to prove his genius to a collection of world leaders discussing the latest threat to the human race.
 "The Royale", an episode (first aired 27 March 1989) of Star Trek: The Next Generation, begins with Picard attempting to solve the puzzle in his ready room; he remarks to Riker that the theorem had remained unproven for 800 years. The captain ends the episode with the line "Like Fermat's theorem, it is a puzzle we may never solve." Wiles' proof was released five years after the episode aired. The theorem was again mentioned in a subsequent Star Trek: Deep Space Nine episode called "Facets" in June 1995, in which Jadzia Dax comments that one of her previous hosts, Tobin Dax, had "the most original approach to the proof since Wiles over 300 years ago."
 A sum, proved impossible by the theorem, appears in an episode of The Simpsons, "Treehouse of Horror VI". In the three-dimensional world in "Homer3", the equation  is visible, just as the dimension begins to collapse. The joke is that the twelfth root of the sum does evaluate to 1922 due to rounding errors when entered into most handheld calculators; the left hand side is odd, while  is even, so the equality cannot hold. (The twelfth root of the left-hand side is not 1922, but approximately 1921.99999996.) A second "counterexample" appeared in a later episode, "The Wizard of Evergreen Terrace": . These agree to 10 of 44 decimal digits, but simple divisibility rules show 3987 and 4365 are multiples of 3 so that a sum of their powers is also. The same rule reveals that 4472 is not divisible by 3, so that this "equation" cannot hold either.

Theater
 In Tom Stoppard's play Arcadia, Septimus Hodge poses the problem of proving Fermat's Last Theorem to the precocious Thomasina Coverly (who is perhaps a mathematical prodigy), in an attempt to keep her busy. Thomasina responds that Fermat had no proof and claimed otherwise in order to torment later generations. Shortly after Arcadia opened in London, Andrew Wiles announced his proof of Fermat's Last Theorem, a coincidence of timing that resulted in news stories about the proof quoting Stoppard.
 Fermat's Last Tango is a stage musical by Joanne Sydney Lessner and Joshua Rosenblum. Protagonist "Daniel Keane" is a fictionalized Andrew Wiles. The characters include Fermat, Pythagoras, Euclid, Newton, and Gauss, the singing, dancing mathematicians of "the aftermath".

Prose fiction
 Arthur Porges' short story "The Devil and Simon Flagg" features a mathematician who bargains with the Devil that the latter cannot produce a proof of Fermat's Last Theorem within twenty-four hours. The devil is not successful and is last seen beginning a collaboration with the hero. The story was first published in 1954 in The Magazine of Fantasy and Science Fiction.
Jorge Luis Borges's 1939 essay titled "The Total Library", a precursor to the short story "The Library of Babel", mentions "the proof of Pierre Fermat's theorem" in an imaginative list of texts that would exist in a total library. Borges also alluded to Fermat's Last Theorem in his detective story "Ibn-Khakam al-Bokhari, Murdered in His Labyrinth".
 In the book The Oxford Murders by Guillermo Martinez, Wiles's announcement in Cambridge of his proof of Fermat's Last Theorem forms a peripheral part of the action. Its 2007 film version shows "Professor Henry Wilkins"' (Martin Nigel Davey) proof of "Bormat"'s Last Theorem at Cambridge.
Arthur C. Clarke and Frederik Pohl's novel The Last Theorem tells of the rise to fame and world prominence of a young Sri Lankan mathematician who devises an elegant proof of the theorem.
 In Jasper Fforde's book First Among Sequels, 9 year-old Tuesday Next, seeing the equation on the sixth-form's math classroom's chalkboard, and thinking it homework, finds a simple counterexample.
 In Stieg Larsson's 2006 book The Girl Who Played With Fire, the main character Lisbeth Salander is mesmerized by the theorem. Fields medalist Timothy Gowers criticized Larsson's portrayal of the theorem as muddled and confused.
 In Robert Forward's 1984/1985 science fiction novel Rocheworld, Fermat's Last Theorem is unproved far enough into the future for interstellar explorers to describe it to one of the mathematically inclined natives of another star system, who finds a proof.
 The theorem plays a key role in the 1948 mystery novel Murder by Mathematics by Hector Hawton.

Movies
 Fermat's equation also appears in the movie Bedazzled with Elizabeth Hurley and Brendan Fraser. Hurley plays the devil who, in one of her many forms, appears as a school teacher who assigns Fermat's Last Theorem as a homework problem.

Music
 The Kineto song "Theorem", which is the theme for the Skeptic's Guide to the Universe podcast, describes Fermat's Last Theorem.

References

Category:Science in fiction
Category:Fermat's Last Theorem