I've been number crunching irreducible Pythagorean triples and this pattern came up: the difference between the hypotenuse and the larger leg seems to always be n² or 2n² for some integer n. Moreover, every integer of the form n² or 2n² is the difference between hypotenuse and the larger leg for some irreducible Pythagorean triple. Is there a simple proof for that?
There is a result listed on Wikipedia that looks kinda, sorta related: that the area of a Pythagorean triangle can not be the square or twice the square of a natural number.
EDIT: Actually, the statements are correct only for odd n² (but also by any 2n² as stated) as John Omielan demonstrated below.
As explained in Pythagorean triple, for integers $m \gt n \gt 0$, Euclid's formula of
$$a = m^2 - n^2, \; \; b = 2mn, \; \; c = m^2 + n^2 \tag{1}\label{eq1A}$$
generates all primitive (i.e., irreducible) Pythagorean triples, specifically
Note \eqref{eq1A} results in
$$c - a = (m^2 + n^2) - (m^2 - n^2) = 2n^2 \tag{2}\label{eq2A}$$
$$c - b = (m^2 + n^2) - 2mn = (m - n)^2 \tag{3}\label{eq3A}$$
Regarding your second part, to help avoid confusion with $n$ above, let's call the values $k^2$ and $2k^2$ instead. With the first one, it uses \eqref{eq3A} so $k = m - n$. However, since one of $m$ and $n$ is even and the other is odd, their difference is odd, so only odd $k$ will work. For any such $k$, set $n = k + 1$ and $m = 2k + 1$ (note $m$ and $n$ are coprime, with $n$ even) to get
$$m^2 - n^2 = (4k^2 + 4k + 1) - (k^2 + 2k + 1) = 3k^2 + 2k \tag{4}\label{eq4A}$$
$$2mn = 2(2k + 1)(k + 1) = 2(2k^2 + 3k + 1) = 4k^2 + 6k + 2 \tag{5}\label{eq5A}$$
This shows $2mn \gt m^2 - n^2$, so $2mn$ is the longer leg. Thus, the difference would result in \eqref{eq3A}.
For the $2k^2$ case, choose $n = k$ and $m = 3k + 1$ (note $m$ and $n$ are coprime, with one of them even). Therefore,
$$m^2 - n^2 = (9k^2 + 6k + 1) - k^2 = 8k^2 + 6k + 1 \tag{6}\label{eq6A}$$
$$2mn = 2(3k + 1)k = 6k^2 + 2k \tag{7}\label{eq7A}$$
This means $m^2 - n^2 \gt 2mn$, so $m^2 - n^2$ is the longer leg. Thus, the difference would result in \eqref{eq2A}.