Question 228349
Check out the following hyperlink.  It's the most direct and to the point reference I could find.


<a href = "http://www.math.uic.edu/~fields/puzzle/triples.html" target = "_blank">Pythagoren Triples</a>


This set of formulas should do the trick.


Here's a copy of what's on that website.


There is a simple formula that gives all the Pythagorean triples. 
Suppose that m and n are two positive integers, with m < n. Then n2 - m2, 2mn, and n2 + m2 is a Pythagorean triple. 

Given any two numbers, m and n, with m < n, you can generate a set of pythagorean triples from it.


example:


3,4


first number is n^2 - m^2 = 16 - 9 = 7
second number is 2mn = 2*3*4 = 24
third number is n^2 + m^2 = 9 + 16 = 25


should  be a reight triangle with f^2 + s^2 = t^2


7^2 = 49
24^2 = 576
25^2 = 625


49 + 576 = 625


seems to work.


try m = 1 and n = 2


f (first) = 2^2 - 1^2 = 4-1 = 3
s (second) = 2mn = 2*1*2 = 4
t (third) = 2^2 + 1^21 = 4+1 = 5


not too shabby.


try 5 and 7


f = 7^2 - 5^2 = 49 - 25 = 24
s = 2*5*7 = 10*7 = 70
t = 7^2 + 5^2 = 49 + 25 = 74

24^2 + 70^2 = 74^2 becomes:
576 + 4900 = 5476 becomes:
5476 = 5476


It works !!!!


A pythagorean triple is a set of integers that forms a right triangle.   


This formula appears to work in all cases.


Here is a much more complicated explanation which winds up with the same formula stated above.


<a href = "http://mathforum.org/dr.math/faq/faq.pythag.triples.html" target = "_blank">Pythagorean Triples Formuls and Examples</a>


Here's a definition.


<a href = "http://www.mathopenref.com/pythagoreantriples.html" target = "_blank">Definition of Pythagorean Triple</a>


the derivtion gets pretty complicated, but the basic formula as stated in the first hyperlink holds.


You can find lots more info by doing a search on the web for "pythagorean triples"