# Fun With Numbers - Right Angle Triangles (again)

The side lengths in a right angle triangle follow a nice pattern - the square of [the length of] the hypotenuse = the sum of the squares of [the lengths of ] the other two sides. The cool kids refer to this as the Gougu Rule.
For example, 3^2 + 4^2 = 5^2.
If you are given the length of the base or height and it's a whole number, you can always find two lengths for the other sides which are whole numbers.
This is pretty easy.
If the known side length is an odd number, a possible answer for the other two sides is "(known side length^2)/2 +/- 0.5".
So for known side 7, 7^2 = 49, 49 ÷ 2 = 24.5, 24.5 - 0.5 = 24 and 24.5 + 0.5 = 25.
Check: 49 + 576 = 625 = 25^2
If the known side length is an even number, a possible answer for the other two sides is  "(known side length^2)/4 +/- 1"
So for shortest side 8, 8^2 = 64, 64 ÷ 4 = 16, 16 - 1 = 15 and 16 + 1 + 17.
Check: 64 + 225 = 289 = 17^2.
Fuller explanation here.
Whether you start with 3 or 4, if you apply these two similar rules, you end up with 3-4-5. Unless you start with "4" for the known side, the other two sides will always be longer than the known side.
It's also only the ratios that matter, so if 3-4-5 is an answer, so is 6-8-10, or 9-12-15 and so on.
So far so dull!
---------------------------------
The trickier bit is working backwards and assuming the known side is not the shortest side.
Say you are given side length 24.
A possible answer is 24-143-145, which is a bit dull.
If you have time for some trial and error, you could first try 24 with hypotenuse 22, 23, 25 or 26.
22 and 23 don't work, but 25 and 26 do.
Check: 100 + 576 = 676 = 26^2
Check: 49 + 576 = 625 = 25^2.
This doesn't work for most numbers, so don't be too disappointed if you draw blanks. But these answers still follow the two basic rules if you start again with the shortest side (10 or 7).
--------------------------------
I set up a spreadsheet with side lengths 1 to 100 to find combinations where the hypotenuse is a whole number and filtered out the ones can be worked out using the two basic rules  (or by scaling up one of those answers). The only ones I could find are as follows (unsurprisingly, none of the three side lengths in any possible answer have a common denominator):
Shortest side - other side - hypotenuse - perimeter
20 - 21 - 29 - 70
28 - 45 - 53 - 126
33 - 56 - 65 - 154
36 - 77 - 85 - 198
39 - 80 - 89 - 208
48 - 55 - 73 - 176
60 - 91 - 109 - 260
65 - 72 - 97 - 234
Hypotenuses which are prime numbers are interesting, so I put them in bold. None of the other side lengths in the above table are prime, which is a bit disappointing.
I underlined 176 and 234 which are also interesting. The other perimeters go up in step with the shortest side length, but these buck the trend, because 48-55 and 65-72 are close to being equilateral triangles. 20-21-29 is the closest to being an equilateral triangle, so 29/20.5 is *very* close to being the square root of 2.
-------------------------------
There's no real point to this, it's just Fun With Numbers to brighten up your Friday.

See more