Introduction
I have two set reactions to any post I see on LinkedIn: I either scoff at it for its awful quality, or I scoff at it to mask my jealousy of someone else’s success. However, earlier today I was doing my usual scoffing (as illustrated below) at another boring arrangement of characters and I realised that the post I was looking at actually had something of interest for once. It spoke of near-Pythagorean triples, that is, the set of integer triples that solve the equation You can see why they’re called “near-Pythagorean”, because they’re not quite of the form , but they’re near. This is something that interested me because each triple that solves the equation is “primitive”, meaning that no matter what.

Unfortunately, because the post was from LinkedIn I presume the post would’ve been banned if it actually explored anything insightful, so all it really gave was an example of such a triple, and asked if you (the reader) can find one. Given the fact that we can quite easily generate a primitive Pythagorean triple from Euclid’s formula for Pythagorean triples, I wondered if we can do the same but with near-Pythagorean triples. It turns out we can, and today dear reader, you shall learn how.
Parametrising evens and odds
Suppose we want to generate a triple using an even number , by writing , we can then find .
By simple substitution, we see that
as desired.
To do the same but with an odd number, we only need write and then find .
We do the following,
which establishes the result.
The Thought Process
If I stopped the article with the proof, then the introduction would be half the article. To prevent this, I might as well tell you how I came about finding the method. It was based in the idea of the aforementioned formula of Euclid, where I asked myself “what if I fixed and worked out some numbers from there?” I noticed that for any odd number , you can write which if you write then , and so by writing for any even , we get an odd and so can find a desired triple.
But this doesn’t translate so easily for an even because the average of and is odd, giving non-integer solutions. So I asked myself, what’s a factor that isn’t or that divides every possible even , the clear answer was two. The problem that remained though was that if was not a multiple of four, then the average of two and it’s paired factor would not be an integer. If that’s unclear, here’s an argument that may convince you:
Set so that it is not a multiple of four but is even, then . Note that ) and , and so if we use the exact same logic as last time, then we get
This does not get us a proper triple because the values in the brackets are not integers, so our and wouldn’t be whole numbers as desired.
Thankfully, one can observe that every even number one less than an odd square is a multiple of four, so the issue resolves itself. As such, we have our generators. As for whether ALL near-Pythagorean triples are of the forms I proposed, that’s an unanswered question on this website, but I’ll think about it and get back to you. I should add that when I looked up the problem further, it turns out that there’s another type of near-Pythagorean triple which the LinkedIn post did not mention, they’re integer triples that solve . I’ve since found a generator for when we force to be even, and discovered something even more interesting about when we force to be odd. Though I could barely get this out given how busy I am right now so be prepared to wait. If you spot any typos let me know because I haven’t been bothered to properly proof-read this. Love you all, xoxo.

Leave a Reply