Math and Life

Fibonacci Pythagorean Triples

A little while ago, I wrote a blog post defending the Fibonacci sequence from an unnecessary, unwarranted, and unprovoked attack from Matt Parker, who opted instead for the Fibonacci sequence's cousin, the Lucas numbers.

He found that post on reddit. This was his response:

Matt Parker.jpg
Ok, so you raise a very good point. Consider me now scribbling in my notebook until I come up with a good counter-argument.

OMGOMGOMGOMGOMGOMGOM...it’s him......Matt Parker..........sjd;lfkjasdlfjsfas1



I haven't heard from him since, so I'll just assume that he has accepted my clearly superior argument, and moved on with life.

Instead of gloating over my victory, I'm going to share an interesting fact about the Fibonacci sequence that I think we can all appreciate. The fact that this property doesn’t apply to the Lucas numbers is entirely coincidental.

Here we are:

For all odd integers n, n ≥ 5, F(n) is the hypotenuse of a pythagorean triple.

Think about that for a second. Every other number in a sequence generated by breeding rabbits results in the hypotenuse of an integer-sided right triangle. Now, you can't just take my word for it, this is a math blog after all. We'll need a proof:

To start off, I'm going to make an intermediate claim (or lemma): for any two positive integers, m and n, (m>n), the triple (m^2 - n^2, 2mn, m^2 + n^2) is a pythagorean triple.

This is easy enough to verify. Just plug it into the pythagorean theorem (below). If you're interested in how this result comes about, watch 3blue1brown's video on the topic.

proof of lemma.PNG

Depending on your disposition towards symbol shuffling, the next part requires either a pleasing or an arduous amount of working out.

Keeping in mind the fibonacci identity2 F(2n) = F(n+1)F(n) + F(n)F(n-1), we’ll prove that F(n)^2 + F(n+1)^2 = F(2n + 1) using strong induction.


Basis step: n = 1

basis step.PNG

Now assume that this holds for n = 1, 2, 3,…., k, and prove it holds for k + 1. To save space, note that by expanding F(n), then squaring it, you get F(n)^2 = F(n-2)^2 + 2F(n-1)F(n-2) + F(n-1)^2.



So why is this useful? Well, going back to my first claim, for any two positive integers, m and n, m^2 + n^2 is the hypotenuse of a pythagorean triple.

Wait a second. F(n) and F(n+1) are both integers. So, by my lemma, F(n)^2 + F(n+1)^2 is the hypotenuse of a pythagorean triple!

I’ve just proved that F(n)^2 + F(n+1)^2 = F(2n+1), so we can plug anything in for n and get F(2n+1) as this value. 2n+1 represents all odd numbers, so it would seem that this holds for all odd numbers greater than 0.

There is one small wrinkle: In our lemma, we stipulated3 that m ≠ n. This means that we can’t plug in 1 for n, because F(1) = F(2).

Plugging in n = 2 has no such problems. F(2) = 1 and F(3) = 2, and indeed 1^2 + 2^2 = 5 = F(5).

Because the Fibonacci sequence is strictly increasing after F(2), no successive terms will be equal, so our fact holds: for all odd n, n ≥ 5, F(n) is the hypotenuse of a pythagorean triple:4

better examples.PNG

And just like that, Pythagoras appears out of nowhere.

1if you zoom in, you can see he actually is scribbling about my stuff

2For the thoroughly pedantic and the pedantically thorough, here is a link to a proof of this identity.

3This should make sense, as the resulting "right" triangle would have one side with length 0

4There’s actually another pattern here that I’ll leave you to untangle