And I decided today to share what I learned about an algorithm for generating Pythagorean triples for any and , where Z. A Pythagorean triple are any three whole numbers which satisfy the equation . Let ; , and you will obtain a solution to the relation . It is therefore not that hard, if we allow and to be any numbers from 1 to 100, and , to write a computer program to generate the first 9800 or so Pythagorean triples, allowing for negative values for or .