Find formulas for the integers of all Pythagorean types $x,y,z$ with $z = y + 2$
I know $z = m^2 + n^2$ and $y = 2mn$ so substituting I get...
$m^2 + n^2 = 2mn + 2 \Rightarrow (m-n)^2 = 2$
which now I feel I'm stuck, cuz im going to be carrying around a $\sqrt{2}$ and I need integer solutions.
I must be making some kind of silly mistake, but I dont see it, would love some help, thanks
There are two things you have to bear in mind: first of all, the triples of the form $$ (m^2 - n^2, 2mn, m^2 + n^2) $$ where $m > n$ are coprime integers of opposite parity, give all the primitive triples. If you want a general formula for all triples, you need to write $$ k \cdot (m^2 - n^2, 2mn, m^2 + n^2) $$ where $k \in \mathbb{Z}$ and for $m, n$ the same conditions as before.
Secondly, it is not necessarily the case that $y = 2mnk$. You also have to consider the case where $y = k(m^2 - n^2)$. Combining these two, you should be able to fix your solution.