In a Treehouse of Horror episode, Homer gets sucked into a bizarro dimension where he becomes 3D. Take a closer look at that equation behind Homer: 1782^12+1841^12=1922^12. Looks relatively simple, right? If you were to pull out a pocket calculator, it would confirm that this equation is true. And yet, not only would your pocket calculator be wrong, it would belie a mathematical enigma that went unsolved for 358 years.

We are all taught in geometry class about Pythagoras’s discovery of the special nature of right triangles. The relationship of the two legs of the triangle to the hypotenuse is a^2+b^2=c^2. Duh. A-squared plus b-squared equals c-squared has the familiar ring of E equals MC squared…even if you don’t exactly know what it all means.

In 1637, mathematician Pierre de Fermat wondered if such a relationship would be possible, though, when values are raised to a power higher than 2. After some study, he conjectured that in fact *no* three positive integers a, b, and c can fulfill the equation a^n+b^n=c^n where n is greater than 2.

When I heard about this theory, later termed Fermat’s Last Theorem, it seemed irrational. I thought through the order of cubed numbers (numbers raised to the third power): 1, 8, 27, 64, 125, 216, 343…surely if you went far enough, you would find two cubes that could be added to each other and result in a third cube? But no–it’s impossible. Even so, though, it seemed like the explanation for this should be obvious. It should, it seemed to me, be an elegant solution that matches the elegance of the original conjecture (and I wasn’t the only one who thought this–the fictional Lisbeth Salander from the wildly popular Stieg Larsson series is obsessed with finding her own proof for the theorem).

And yet, while Fermat was correct in his conjecture, it took several hundred years and extremely elaborate proofs to show why. Andrew Wiles, a British mathematician, submitted a proof in 1993 that was based on numerous other proofs that had already gone up against the theorem. His theorem contained a major error, but with another year of diligent work and vetting from other mathematicians, Wiles submitted a finalized proof in 1994, published in 1995. The proof is more than 100 pages long and draws from such esoteric concepts as absolute Galois groups, Hecke eigenforms, and abelian variety. Wiles’s proof has many ramifications in algebraic geometry and number theory, and he was knighted for his work.

I think they just should’ve sent Matt Damon in to solve the thing: