View Single Post
Old 2005-01-01, 17:38   #2
PBMcL
 
PBMcL's Avatar
 
Jan 2005

2·31 Posts
Cool reply - Pythagorean triples

Easiest formula I know is:

Choose integers m, n with m > n > 0. Let x = m^2 - n^2, y = 2mn, and z = m^2 + n^2. Then (x, y, z) satisfies x^2 + y^2 = z^2. For primitive triples (x, y, and z having no common factor), add the conditions gcd(m, n) = 1 and m != n mod 2. I believe all possible triples can be generated this way, but i'm going from memory here.
PBMcL is offline   Reply With Quote