Prove that for any integer n $\geqslant$ 3 there is a pythagorean triangle with one of its legs having length n Prove that for any integer $n$ $\geqslant$ $3$ there is a Pythagorean triangle with one of its legs having length n. 
 For which integers n will there be a primitive Pythagorean triangle with n as one of its legs. 
For the first part I tried to start induction with $n = 3$.
If we take the other legs to be 4 and 5 then $3^2 + 4^2 = 5^2$
But I'm not sure how to proceed.
 A: For natural $u,v$ the numbers $$a=u^2-v^2$$ $$b=2uv$$ $$c=u^2+v^2$$ satisfy $$a^2+b^2=c^2$$
If the given number $N$ is even choose $u=\frac{N}{2}$ , $v=1$
If $N$ is odd , choose $u=\frac{N+1}{2}$ , $v=\frac{N-1}{2}$
This way you will even get a primitive pythagorean triple containing $N$
A: Break the problem into two cases.
Spose $n=2k, k>1$. Let $u=\frac{n}{2}+1$ and $v=\frac{n}{2}-1$. Obviously $u,v\in\mathbb{N}$. 
Next, write $$a=u^{2}-v^{2}=2n,$$ $$b=2uv$$ and, $$c=u^{2}+v^{2}=\frac{n^{2}}{2}+2.$$ It is easy to check that no matter what numbers $u,$ and $v$ are, $$a^{2}+b^{2}=c^{2}.$$  Now, $a^{2}=4n^{2}$ and $b^{2}=4(uv)^{2}$, and since $n$ is even, $c$ is even. Therefore $c^{2}=4M^{2}$ for some $M\in\mathbb{N}$, and $$4M^{2}=c^{2}=a^{2}+b^{2}=4(n^{2}+(uv)^{2}).$$ This proves the result for even $n>2.$
For the odd case $n=2k+1$ with $k>0$, let $a, b,$ and $c$ be written in terms of $u,$ and $v$ as above, but choose $u=\frac{n+1}{2}$, and $v=\frac{n-1}{2}.$ Then $a=n,$ and the result follows from the identity $a^{2}+b^{2}=c^{2}.$
A: A variation of Euclid's formula generates $only$ and $all$ Pythagorean triples where $GCD(A,B,C)$ is an odd square. This includes all primitives.
$$A=(2m-1+n)^2-n^2\quad B=2(2m-1+n)n\quad C=(2m-1+n)^2+n^2$$
Expanding terms, we get
$$A=(2m -1)^2+2(2m-1)n\quad B=2(2m-1)n+2n^2\quad C=(2m-1)^2+2(2m-1)n+2n^2$$
If we let $m=1, C=B+1$ for all $n$ so we have only primitives.
$$A=1+2n\qquad B=2n+2n^2\qquad C=1+2n+2n^2$$
In this form, we can see by inspection that $A$ includes every odd number $\ge3$ and $B$ is always a multiple of $4$. Also, for even numbers not represented by primitive $B$ values, they can be represented by even multiples of $A$. Therefore, every odd number $\ge3$ is part of some Pythagorean triple.
