Generating Pythagorean triples where the legs are Hypotenuses of other Pythagorean triples

224 Views Asked by At

I know how to generate regular Pythagorean Triples given two positive integers P and Q such that $$a=2*p*q$$ $$b=p^2-q^2$$ $$c=p^2+q^2$$ where $p>q$, but I want to find scenarios where $a$ and $b$ can also be written in the format $p^2+q^2$. Specifically, I am looking for a generalized way of finding all situations where the hypotenuses of the first two triples form the legs of the third triple. $$$$ I want to be able to generate a formula for finding these special triples.

So far, I have been able to find four cases where this holds true by using the brute force method.

$P_1$ $Q_1$ $A_1=2P_1Q_1$ $B_1=P_1^2-Q_1^2$ $C_1=A_3$
10 2 40 96 104
16 4 128 240 272
15 9 270 144 306
21 3 126 432 450
$P_2$ $Q_2$ $A_2=2P_2Q_2$ $B_2=P_2^2-Q_2^2$ $C_2=B_3$
12 3 72 135 153
12 9 216 63 225
12 8 192 80 208
20 12 480 256 544
$P_3$ $Q_3$ $A_3=2P_3Q_3=C_1$ $B_3=P_3^2-Q_3^2=C_2$ $C_3=C_1^2+C_2^2$
13 4 104 153 185
17 8 272 225 353
17 9 306 208 370
25 9 450 544 706

As you can see, the third chart shows Pythagorean triples with legs that are also hypotenuses of the previous charts. For example, the right triangle with sides (104, 153,185) corresponds to the right triangles with (40,96,104) and (72,135,153). The P and Q vales show $P_1^2+Q_1^2=2P_3Q_3$ ($10^2+2^2=2*13*4=104$), and $P_2^2+Q_2^2=P_3^2-Q_3^2$ ($12^2+3^2=13^2-4^2=153$).

I gathered this information using the highly inefficient and laborious method of inputting a table of P and Q values into Google sheets up to P and Q being less than or equal to 25. Then, I searched the data by using vlookup and countif functions, after sorting it a bit.

$$$$ I think there must be a way of simplifying this process, but it eludes me. How can I (in a much less time consuming way) generate these special Pythagorean triples where each side of the triangle is a hypotenuse of another Pythagorean triple?

Edit: While the Euclidean formula for Pythagorean triples relies on the value of $p$ and $q$ to generate legs $a$ and $b$ with hypotenuse $c$, I am looking for a generalized way of finding the special "triple triples" for lack of a better term given integer inputs $(input_1...input_k)$ that I can input into functions $$f_A(input_1...input_k)=A$$ $$f_B(input_1...input_k)=B$$ $$f_C(input_1...input_k)=C$$ Where A and B are hypotenuses of other Pythagorean triples, and (A,B,C) forms a Pythagorean triple in and of itself.

1

There are 1 best solutions below

0
On

With Euclid's formula $\quad A=m^2=n^2\quad B=2mn\quad C=m^+n^2\quad a$ primitive Pythagorean triple with side-$A\,$ equal to the hypotenuse of any other triple can be generated using $\quad m=\dfrac{C+1}{2},\,n=\dfrac{C-1}{2}.\quad$ For example, with $\,(5,12,13),\,$ $C=13\longrightarrow m=7,\,n=6\longrightarrow F(7,6)=(13,84,85).$