How to compute the Pythagorean triple by one of the numbers that belonged to it? I have a positive number $n>2$. How to compute the Pythagorean triple containing $n$? $n$ may be the hypotenuse and leg.

So thanks to @Henning Makholm, I realized that it does hold for every integer $n >2$.
Case 1. Suppose $n$ is an odd integer, say $n=2k+1$. ($k\geq1$)
\begin{align*}
n&=2k+1\\
c&=2k^2+2k+1\\
b&=2k^2+2k\\
c^2&=b^2+n^2
\end{align*}
Case 2. Suppose $n$ is two times an odd integer, say $n=4k+2$.($k\geq1$)
\begin{align*}
n&=4k+2\\
c&=4k^2+4k+2\\
b&=4k^2+4k\\
c^2&=b^2+n^2
\end{align*}
Case 3. If $n$ is an arbitrary even number then you can write is as $n=2^\alpha t$, where $t$ is an odd number. If $\alpha$ is odd you can use Case 2 to generate $b,c$, otherwise you can use Case 1.
