Looking at some of the more common pythagorean triples, I noticed a trend that there are usually two numbers which differ by only one or two, with more much smaller or larger number in comparison. For example:
$$5,12,13$$ $$8,15,17$$ $$7,24,25$$ $$20,21,29$$ $$12,35,37$$ $$9,40,41$$ and so on...
I was wondering whether there is some deeper algebraic or geometric reason for this, or whether it is just a coincidence with the numbers I have chosen?
This comes from the fact that, when $n$ is odd$$\left(n,\frac{n^2-1}2,\frac{n^2+1}2\right)$$is a pythagorean triple and, when $n$ is even,$$\left(n,\left(\frac n2\right)^2-1,\left(\frac n2\right)^2+1\right)$$is a pythagorean triple too. In the first case, the second and the third numbers differ by $1$ and, in the second case, they differ by $2$.