Finding another set of pythagorian triples
We look at the difference between squares of numbers differing by 2, and set it to be a square itself.
So, if n and n+2 are the two numbers separated by 2, the difference of their squares, 4n+4, must be a square number. Since it is clearly even, let us set it to the square of an even number, 2m. So
4n+4 = (2m)2
and hence n=((2m)2-4)/4 = m2-1
So the triplet is 2m, m2-1, m2+1
However, if m is odd then all three terms are even, and this cannot be a primitive triple. In fact, if we substitute m=2k+1 we get
2(2k+1), 4k2+4k, 4k2+4k+2
which is precisely twice the last sequence. We can discard these and keep only those with even m, which can set to m=2k. This gives
2(2k+1), 4k2+4k, 4k2+4k+2
4k, 4k2-1, 4k2+1
