<s>[INST] Why $(2m)^2 + (m^2 - 1)^2 = (m^2 + 1)^2$ results in pythagorean triples? As you increase the value of n, you will generate all pythagorean triples whose first square is even. Is there any visual proof of the following explicit formula and where does it come from or how to derive it?
$(2n)^2 + (n^2 - 1)^2 = (n^2 + 1)^2$




$(2n)^2+(n^2-1)^2=(n^2+1)^2$
$(2n)^2+(n^2-1)^2=(n^2+1)^2$
$(2n)^2+(n^2-1)^2=(n^2+1)^2$




$(2*0)^2+(0^2-1)^2=(0^2+1)^2$
$(2*1)^2+(1^2-1)^2=(1^2+1)^2$
$(2*2)^2+(2^2-1)^2=(2^2+1)^2$


$(2*0)^2+(0-1)^2=(0+1)^2$
$(2*1)^2+(1-1)^2=(1+1)^2$
$(2*2)^2+(4-1)^2=(4+1)^2$


$0^2+1^2=1^2$
$2^2+0^2=2^2$
$4^2+3^2=5^2$


$0+1=1$
$4+0=4$
$16+9=25$


$1=1$
$4=4$
$25=25$



 [/INST] Here's a visual proof:

(This space intentionally left blank.)
</s>