The Babylonians had a method for generating Pythagorean triples, they took any two numbers M and N were M is greater than N and used three equations to find the hypotenuse and legs of a right triangle. The equatios they used are, H=M^2+N^2 L1=2mn and L2=M^2-N^2.
For example, if M=4 and N=3,
H=4^2+3^2
H=16+9
H=27
L1=2*4*3
L1=24
L2=4^2-3^2
L2=16-9
L2=7

To check the result of the equations, you can use the Pythagorean theorem. This states that H^2=L1^2+L2^2. If the three numbers you got do make this equation true then they are Pythagorean triples.

The Pythagoreans also had a method of generating triples. Theirs was, for any natural number N, H=2N^2+2N+1 L1=2N+1 and L2=2n^2+2N

Exercises

Generate a set of Pythagorean triples with the following Ms and Ns. Check them to make sure they are Pythagorean triplets
M=2 N=1
M=18 N=7
M=8 N=6
Use the N values from the previous problems to generate triples the Pythagorean way.

To the Greeks