If you were really smart
you wouldn't need a calculator
to know there was something wrong...
"Fermat's Last Theorem & Homer Simpson" Numberphile Films by Brady Haran
There was a short story called The Devil and Simon Flagg,
where Simon Flagg makes a deal with the devil
and part of the deal is that he can keep his soul
if the devil can prove Fermat's Last Theorem.
Of Course, the devil can't prove Fermat's Last Theorem.
Fermat's Last Theorem crops up in Star Trek
x^n+y^n=z^n.
It crops up in Dr Who - The eleventh doctor
in order to prove himself rewrites Fermat's original proof.
It pops up in Bedazzled, the film with Liz Hurley,
where she plays the devil as well.
So there's quite a devilish link to Fermat.
It pops up in Arcadia played by Tom Stoppard.
So, it's very much a bit of math that people can use
in novels and films and plays,
because it's sort of has a bit of glamour around it,
and people have perhaps vaguely heard of it.
Recently I spotted it in an episode of The Simpsons.
There's an episode called "The Wizard of Evergreen Terrace",
where Homer Simpson wants to become an inventor,
and he has a blackboard.
We see him scribbling things on the blackboard.
And one of the equations Homer Simpson writes on the blackboard
is an apparent solution to Fermat's Last Theorem.
It's some 4-digit number to the 12'th power
plus a 4 digit number to the 12'th power
equals a 4-dight number to the 12'th power.
Now, Fermat's Last Theorem says that should not exist.
So, Homer is defying Fermat and Andrew Wiles.
Now, if you have an old phone calculator and you type in the digits,
and you check Homer's solution, which should not exist,
it turns out it's a perfect valid solution.
BRADY HARAN: Hang on a second, this is a problem...
SIMON SINGH: [laughs] This is a big problem. Um, the solution to the problem is...
It's called a near miss solution,
which means that if you've got a phone calculator
with only 10 decimal places you won't see the problem.
But if you go to 15 or 20 decimal places
you'll see that the equation doesn't quite balance.
It's very very close but not quite there.
His solution is 3,987^12+4,365^12=4,472^12
Try that at your phone calculator
it will kind of make sense.
It's not the only near miss in The Simpsons.
There's another one in an episode called "Homer Cubed"
which is part of the "Treehouse of Horror VI" episode of The Simpsons.
And when I saw the second one I remember thinking:
There's somebody on The Simpsons who clearly likes math.
And the culprit is a chap called David X. Cohen.
David X. Cohen did physics at Harvard.
I did physics as well, and physicists like math,
so that kind of explains David's obsession with mathematics.
He then did a Master's degree in Computer Science,
and then went on and published research papers in mathematics.
In fact, there is a whole area of mathematics known as "pancake flipping",
which is a whole other story.
But David X. Cohen is a serious mathematician
who finds his way into The Simpsons.
And so every so often in The Simpsons he would drop in little bits of mathematics.
When David X. Cohen drops in these false solutions to Fermat's Last Theorem,
he is kind of nodding back to his past and his love of mathematics.
And the really weird thing is he's not the only mathematician on The Simpsons.
There is Al Jean who did mathematics at Harvard.
There's a guy called Ken Keeler, who has a Ph.D. in Applied Math.
There's a guy called Mike Reiss,
who is corresponding with the great mathematician Martin Gardner,
the great recreational mathematician Martin Gardner,
when he was a young kid.
So there are a lot of mathematicians on The Simpsons,
and they all drop in bits of math in The Simpsons.
BRADY HARAN: What should we read into the fact
that all these mathematicians are on The Simpsons writing stuff?
SIMON SINGH: It's tricky. I spoke to them, I met them last year.
And I said to them: "Why have you all ended up as being comedy writers?"
And they gave me various theories.
One theory that many of them share
is that mathematicians love logic,
and therefore they love breaking logic and playing with logic,
and they love the illogical, and a lot of humor is based on that.
One explanation that Al Jean gave me
as to why they work in animation, in particular,
is that animation is all about control.
What you storyboard, what you script appears on screen.
In mathematics what you write down on paper is what happens.
We can contrast that with a real action sitcom,
where you don't have control.
You know, the actors put in their ideas,
scripts will change, scenes will change, everything is up for grabs.
And science is a bit like that as well.
When you do a science experiment things change,
things go wrong, test tubes break, etc.
So there does seem to be a very strong link
between mathematicians and comedy,
and mathematicians who write comedy, who then work in animation.
When we took our near misses,
we're looking at..., kind of proportionally, is at a near miss.
So, we're looking at 4-digit numbers to the 12'th power.
So we're looking at 48-digit numbers.
And so if they're out by millions of millions,
that's only a tiny amount,
because we're looking at such massive digits.
And, so, on most calculators you won't see the error.
If you were really smart, you wouldn't need a calculator
to know there was something wrong in one of these.
If you look at the second one, now this one is obviously wrong.
Now, the reason it's obviously wrong is because this is an even number,
that's an odd number, that's an even number.
An even number to the 12'th power must still be an even number.
An odd number to the 12'th power must be an odd number.
An even number plus an odd number is an odd number.
So that cannot equal that.
BRADY HARAN: You were talking about this near miss,
or these two near misses that were put in,
Is he paying tribute to something here?
Or is he trolling? Is he being a troll?
SIMON SINGH: No, it's very much...
When you love something,
and I thing David X. Cohen loves comedy,
he loves comedy writing and he loves mathematics,
it's natural to try and bring the two together.
You don't force them together.
And the mathematics on The Simpsons never gets in the way of the plot.
But if there is an opportunity to drop something in that you love...
In the very first episode of The Simpsons
one of the kids has a lunch box with Anatoly Karpov's picture on it.
Now, I remember Anatoly Karpov as a great chess player of the early 70's.
Now, I guess somebody on The Simpsons writing team is also a fan of chess,
and also a fan of Anatoly Karpov.
And so these things get dropped in.
And as there were so many mathematical writers on The Simpsons,
they dropped in an awful lot of these mathematical knobs.
Brady Haran: If you like to help Simon buy some new monkeys
to hang on those bookshelves of his,
why don't you have a look at his book?
It's out this week, it's all about mathematics in The Simpsons,
Of course, I'll put a link so you can check out the book in the video description.
There will also be links to our other videos about Fermat's Last Theorem,
that we filmed with Simon and released earlier this week,
And lastly, I'm also including a link to a Sixty Symbols video I uploaded this week,
all about the physics of water balloons and filming them in slow motion.
It's really good, and I know a lot of people were having problems
with their subscription boxes on YouTube this week.
So, if you subscribe to Sixty Symbols,
which is like our sister channel but about physics,
and you missed that one, well, now you've got no excuse.