I'm sure you guys can tell by now that I am especially interested in math in pop culture, so of course I decided to look up Fermat's Last Theorem.

Here are some interesting references I found on Wikipedia:

(http://en.wikipedia.org/wiki/Fermat%27s_Last_Theorem_in_fiction)

"A sum, proved impossible by the theorem, appears in an episode of The Simpsons, "Treehouse of Horror VI". In the three-dimensional world in "Homer^3", the equation 1782^12 + 1841^12 = 1922^12 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; notice that the left hand side is odd, while 1922^12 is even, so the equality cannot hold. The values agree to 9 of 40 decimal digits. A second 'counterexample' appeared in a later episode, "The Wizard of Evergreen Terrace": 3987^12 + 4365^12 = 4472^12. These agree to 10 of 44 decimal digits, but notice simple divisibility rules show 3987 and 4365 are divisible by 9 so that a sum of their powers is also. A similar rule reveals 4472 is not divisible by 3, so that this cannot hold either."

"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. The story was first published in 1954 in The Magazine of Fantasy and Science Fiction."

"Fermat's equation also appeared in the movie Bedazzled with Elizabeth Hurley and Brendan Fraser. Hurley played the devil who, in one of her many forms, appeared as a school teacher. In this particular scene the blackboard behind her reads: "Tonight's homework: Prove a^n + b^n = c^n, solve for n>2"."

"The rock metal band KINETO has a song entitled "Theorem" that describes Fermat's Last Theorem."

"In Poul Anderson's book The Boat of a Million Years, the main character Hanno writes the statement of Fermat's Last Theorem on the graffiti covered wall of a restroom in a hospital, and below the statement he writes that he has a marvelous proof of this theorem, but there's not enough space on the wall to write it."

I like how there are so many references to the devil haha.