Existence of a Pythagorean Triple with one side given.

Does there exists a pythagorean triple with $n$ as one of the sides for all $n\geq 3$ ?.

• I know this is old, but for anyone interested, see my answer to this question Aug 18 '21 at 21:44

If $n$ is odd, we have $$n^2 + \left(\dfrac{n^2-1}{2}\right)^2 = \left(\dfrac{n^2+1}{2}\right)^2$$ If $n$ is even we have $$n^2 + \left( \dfrac{n^2}{4}-1 \right)^2 = \left( \dfrac{n^2}{4} + 1 \right)^2$$

We have

$n^2 + (\frac{n^2-1}{2})^2 = (\frac{n^2+1}{2})^2$.

When $n$ is odd and greater than or equal to $3$, the second and third terms are both positive integers.

When $n$ is even and not a power of $2$, we can write $n=2^kn'$ where $n'$ is odd and greater than or equal to $3$. Take a solution for $n'$ and then multiply through by $2^k$.

Finally, for any $k\geq 2$ we have

$(2^k)^2 + (2^{2k-2}-1)^2 = (2^{2k-2}+1)^2$.,

where the second and third terms are positive integers by our assumption on $k$. This covers all powers of $2$ greater than or equal to $4$.

• The answer is yes, thanks a lot kevin Feb 6 '15 at 22:51
• This construction yields $n$ as the smallest of the three sides (except in the $k=2$/$n=4$ case above). Are there also constructions that let you choose an arbitrary $n\geq n_0$ as the middle or largest (hypotenuse) for some $n_0$? Feb 7 '15 at 17:20
• @R.. I believe that a positive integer can be the hypotenuse of an integer-sided right triangle if and only if it has at least one prime factor congruent to $1 (mod 4)$. This condition is sufficient and I think it's necessary, but haven't checked the details Feb 7 '15 at 20:36