# Fermat's Penultimate Theorem

Pierre de Fermat was often mocked by other mathematicians for his large, bubbly handwriting. Blaise Pascal famously said that he "writes like a cheerleader", and Gérard Desargues once wrote to a friend "I once tried to follow a Fermat proof, but his $\rho$s have as many chins as he does."

Fermat's Penultimate Theorem is the name of the statement in number theory that

For any seven non-zero integers $a$, $b$, $c$, $p$, $x$, $n$, and $m$ where $a^{p}+b^{p}=c^{p}$ and where $log_{{x}}a and $log_{{x}}b, $log_{{x}}c\leq n+m$.[1]

This theorem and its proof are rather unremarkable; the most surprising thing about it is that Fermat was not aware of a previously existing, more concise, proof of "his" theorem. The fact that the problem's statement and solution is understandable by schoolchildren makes it all the more frustrating that Fermat wasted over three and a half pages on the subject, leaving him no room to prove his last theorem. Among math nerds, Fermat's Penultimate Theorem has achieved almost cult status, and "making up Fermat proofs", the practice of making up new, convoluted proofs to simple mathematical problems, is one of the most pervasive memes at Wolfram Mathworld, a wiki dedicated to math satire.

## Fermat's Last Proof

Fermat's Last Proof, the proof to Fermat's Penultimate Theorem, was famously first written in Fermat's copy of Arithmetica, an ancient Greek book on math given to him by his wife (who thought he might like it) for his 30th birthday. He'd been using the margins as a diary, since he figured it would be a waste to just throw the book away.

Dear Diary,
I was thinking today about this problem I'd scribbled down on a napkin a few years ago. I hunted down the napkin (it was in my coat pocket) and tried to decipher it but it didn't make any sense. But while I was doing that, I thought of something pretty interesting that I would like to call Fermat's Most Recent Theorem. (I'll have to rename that last one...) It goes like this:

For any seven non-zero integers $a$, $b$, $c$, $p$, $x$, $n$, and $m$ where $a^{p}+b^{p}=c^{p}$ and where $log_{{x}}a and $log_{{x}}b, $log_{{x}}c.

I don't know where that came from but I think it might be because I found a brand new Pythagorean Triplet this morning while taking a bath. It is 65, 72, and 97. I don't think anyone's found that one yet. (I should take baths more often. I get good ideas when I do.) I'm almost out of room in this book but I should have enough room to prove it.

$a^{2}+b^{2}=c^{2}$ so let's say $\log _{{x}}(a^{2}+b^{2})=log_{x}{c^{2}}$

$2\log _{{x}}(a+b$ um...
$\log _{{x}}(a^{2})+\log(b^{2})=log_{x}{c^{2}}$

$65^{2}+72^{2}=92^{2}$

$\log _{{10}}(65^{2})+\log _{{10}}(72^{2})=\log _{{10}}(92^{2})$
$3.6+3.7=$

FUCK[2]

$a^{2}+b^{2}=c^{2}$
$a
$b
$n (arbitrary, but you can just switch them if you want to)

$c^{p}<(x^{n})^{p}+(x^{m})^{p}$

It's dinner time. I'll finish this later.

Back. What the hell was I writing? Okay, so...

$c^{p}<(x^{{np}}+x^{{mp}})=x^{{np}}(1+x^{{p(m-n)}})$
$p\log _{{x}}(c)<\log _{x}(x^{{np}}(1+x^{{p(m-n)}}))$
$p\log _{{x}}(c)
$p\log _{{x}}(c)
$\log _{{x}}(c)
and since n is positive, $\log _{{x}}(c)

I don't know how to solve this when $x=1$ but I will write a letter to Joo-boy[3] and find out. I haven't talked to him in a while. I wonder how he's doing.

At the time the proof was written, Fermat was pursuing post-graduate studies in math, but shortly afterwards, his father convinced him to get a real job, saying that over a decade ago, he'd promised to pay his father back for sending him to law school. He died 28 years later having never proved another mathematical theorem.

## The Preexisting Proof

$a$ is an $n$-digit number (in base $x$[4]) and $b$ is an $m$-digit number. $a^{p}$ and $b^{p}$ will have at most $np$ and $mp$ digits. The sum of two numbers has no more than one digit more than the larger of the two numbers. Regardless of which is bigger, $np+1$ and $1+mp$ are both smaller than (or equal to in the degenerate case) $np+mp$ meaning $c^{p}$ has at most $p(n+m)$ digits and $c$ has at most $n+m$ digits. Duh.[5]

## Fermat's Penultimate Theorem in Popular Culture

4chan thinks this is funny.

There are very few math references in actual popular culture, but there are often references to Fermat's Penultimate Theorem in more nerdy subcultures.

• On Star Trek: The Next Generation, a prop nameplate lists a room belonging to "Frenchie McLastProof" and "Joo-boy".
• An early Barenaked Ladies demo features a song called "Maybe I'm Dumb" with lyrics made up almost entirely of stupid things historical intellectuals have said. It ends with the line "It's dinner time, I'll finish this later." and a sudden cut. The song was dropped from their repertoire in the early 90s.
• Nerdcore rap group Optimus Rhyme has a song titled "Take a Log" that makes a few direct references to Fermat's Penultimate Theorem and Last Proof.
• If you attempt to take the log of a number in base 1 in Matlab, you get an error message that reads "Go back to bed, Fermat." Unfortunately, this error is rarely seen because the most common trigger, attempting to convert to base 1, also triggers a divide by zero error, crashing the program.
• Almost every Wolfram Mathworld article begins with a proof attributed to Fermat. Many are subtle changes to his Last Proof, some are simply in the same style, and some were just pulled out of the contributor's ass. This meme has not yet spread to the rest of the internet, apart from an image macro of a chimpanzee "taking a log" that is popular on 4chan.

It is unclear if any of these reference are well-known or how many people outside of mathematics academia get them.

1. It is worth noting that by Fermat's Last Theorem, $p=2$ or $p=1$, which makes the problem a lot easier to grasp. Of course, at the time when Fermat's Penultimate Theorem was proven, Fermat's Last Theorem had not yet been proven.
2. To be fair, logarithms hadn't been used in math at all until 1614, just 13 years before this proof was written.
3. Swiss mathematician Joost Bürgi died a few years prior. This is likely who Fermat was referring to as he was one of the few people at the time who understood logarithms.
4. If you don't know what that means, pretend $x=10$.
5. This proof ignores the case where $x=1$, as it should.