Finding a set of pythagorian triples
We look at the difference between successive squares, and set it to be a square itself.
So, if n and n+1 are the two numbers separated by 1, the difference of their squares, 2n+1, must be a square number. Since it is clearly odd, let us set it to the square of an odd number, 2m+1. So
2n+1 = (2m+1)2
and hence n=((2m+1)2-1)/2 = 2m(m+1)
So the triplet is 2m+1, 2m(m+1), 2m(m+1)+1
