Let \(a, b,\) and \(c\) denote the sides of a right triangle such that \(c^2 = a^2 + b^2\). We are interested in triangles where the legs differ by 1, i. e., \(c^2 = a^2 + (a + 1)^2\). Let's recast the equation so all numbers differ from \(a\). Thus, $$(a + m)^2 = a^2 + (a + 1)^2$$ Regrouping and solving for \(a\) we get $$a = (m - 1) \pm \sqrt{2m(m - 1)}$$ Clearly, an integer solution for \(a\) exists only when \(2m(m - 1)\) is a perfect square. It's not hard to find the first few values of \(m\) that yield a perfect square for \(2m(m - 1)\). They are 1, 2, 9, 50, and 289. Here is a table showing the values for \(a, b\) and \(c\) for the given values of \(m\).

mabc
1011
2345
9202129
50119120169
289696697985

I noticed two things of interest about this table. The first is that after the first row, each \(m\) is the sum of \(b\) and \(c\) from the previous row. So the next rows in the table would be:

1,6824,0594,0605,741
9,80123,66023,66133,461
57,122137,903137,904195,025
332,929803,760803,7611,136,689
1,940,4504,684,6594,684,6606,625,109

The second thing I noticed is that each \(m\) is 1 more than the index of a corresponding square triangle. For example, \(T_{288} = 41,616\) which is also a perfect square, \(204^2\). This makes sense because we were looking for values of \(m\) such that \(2m(m - 1)\) is a perfect square, and that is the same as looking for values of \(m\) such that \(4T_{m - 1}\) is a perfect square. So for every square triangle there is a Pythagorean triple such that \(a\) and \(b\) differ by 1, and for every Pythagorean triple where \(a\) and \(b\) differ by 1, there is a square triangle.

For a slightly different approach to this topic see this article.