A pattern within the differences of pythagorean triples?

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 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.


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".