FactorizationMethod Intermediate

Problem - 2318
For any given positive integer $n > 2$, show that there exists a right triangle with all sides' lengths are integers and one side's length equals $n$.

It is sufficient to prove that $x^2 + n^2 = z^2$ is solvable in positive integers when $n > 2$. This equation is equivalent to $(z-x)(z+x)=n^2$. It is obvious that $(z+x)$ and $(z-x)$ have the same odd-even parity. If $n$ is odd, setting $(z-x, z+x) =(1, n^2)$ leading to a positive integer solution $$(x, z) = \Big(\frac{n^2 -1}{2}, \frac{n^2+1}{2}\Big)$$ If $n$ is even, setting $(z-x, z+x)=(2, \frac{n^2}{2})$ leading to a positive solution $$(x, z) = \Big(\frac{n^2-4}{4}, \frac{n^2+4}{4}\Big)$$

report an error