# Is there a way of finding out the remaining two numbers of pythagorean triple if one of the side is given

I am solving one question related to right triangle and I have to find out the remaining two numbers of the pythagorean triple if one of the number is given. I know there can be many triples possible , but I just need to find one triple. Thank you for your help :)

• If you look up the reference in my answer below, you will see how to find all Pythagorean triplets that have the side you are given or you will be able to prove that no such triplet exists. – poetasis Mar 14 at 17:46

If your number $x$ is even, then any factorization $x/2=m\cdot n$, with $m>n$, gives a triple $(m^2+n^2, m^2-n^2,x)$.

It $x$ is odd, then again factor it as $x=m\cdot n$, with $m>n$, and a triple is $\left({m^2+n^2\over2},{m^2-n^2\over2},x\right)$.

If $x$ is not prime and $d$ is one of its divisors, then you can find other triples by considering the triples generated by $x/d$ and multiplying them by $d$

This works, however, as long as $x$ represents the length of a cathetus.

If the number is odd, its square can be represented as $2k+1$. Then one triple is $k, \sqrt{2k+1}, k+1$. If the number is even, it is $2k$ and you can use $k^2-1, 2k, k^2+1$

• To ask, what if the number is 3 that is known and 4 and 5 aren't known (for the sake of argument). If you represent that as 2k+1, k=1. No matter which way I slice that, I come up with something that's not a triple. Can you explain what I'm seeing wrong with your response? – Johnq Jun 10 '17 at 5:05
• @Johnq If the number is $3$, then $2k + 1 = 3^2 = 9$, so $k = 4$. The desired triple is then $k = 4$, $\sqrt{2k + 1} = \sqrt{9} = 3$, and $k + 1 = 5$. I suspect you overlooked the fact that Ross Millikan stated that the square can be represented as $2k + 1$. – N. F. Taussig Jun 10 '17 at 9:59
• I did indeed. Oops. – Johnq Jun 10 '17 at 13:38
• The part about even numbers is wrong. Should be kk-1,2k,kk+1 – edc65 Jul 26 '17 at 10:27

See my answer to another question which includes original functions for the generation of sides A,B,C. If you solve any of these for $$k$$, you can use them to find a side matching one you seek. All values of n where f(n) yields an integer for $$k$$ will yield a valid triplet with $$that$$ side matching.