A pattern within the differences of pythagorean triples? 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?
 A: 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$.
A: A primitive Pythagorean triple is of the form $$m^2-n^2, 2mn, m^2+n^2$$ where $m\gt n$, $m,n$ have no common prime factor and one of $m,n$ is even.
If $n=1$ you automatically have two numbers which differ by $2$. If $m=n+r$ then you have $2n^2+2nr$ and $2n^2+2nr+r^2$ so if $m-n=1$ you automatically have sides which differ by $1$.
Now look at the first few possible pairs for $m,n$
We have $2,1$ giving $3,4,5$
Then $3,2$ giving $5,12,13$
And $4,1$ with $15, 8, 17$
And $4,3$ with $7, 24, 25$
And $5,2$ with $21, 20, 29$
etc
This last is not one of the ones I caught, but the closeness here is essentially because the numbers $m$ and $n$ are small.
As numbers get larger, cases like $10,7$ giving $51, 140, 149$;
or $10,3$ leading to $91, 60, 109$ become more typical.
A: All pythagorean triples are given by
$$a = m^2 - n^2 ,\ \, b = 2mn ,\ \, c = m^2 + n^2 $$
for any pair $m>n>0$.
In order to have a small $a$ we can set $m=n+k$ with $k$ small and therefore


*

*$b=2n^2+2nk$

*$c=2n^2+2nk+k^2$
therefore
$$b-c=k^2$$
which tends to be relatively "small".
A: If you want for example that $$c=b+1$$
you choose $a$ such that
$$a^2=2b+1=(2k+1)^2$$
or
$$b=2k^2+2k$$
for $k=3$ you get
$$b=24 , a=7 \text{ and } c=25$$
