Math tidbits and sometimes a little more.
Fun facts to know and tell.
Math tidbits and sometimes a little more.
Fun facts to know and tell.
Monday, January 28, 2013
Generating Pythagorean triples.
The Pythagorean Theorem is usually stated as a² + b² = c². If all three numbers are whole numbers, it is called a Pythagorean triple. Here are some examples with small numbers as the entries.
3² + 4² = 5²
12² + 5² = 13²
15² + 8² = 17²
24² + 7² = 25²
21² + 20² = 29²
35² + 12² = 37²
In these examples, no number bigger than 1 divides all three numbers in the set, so these are the relatively prime Pythagorean triples. It is true that 6² + 8² = 10² (36+64=100), but this is just taking the 3-4-5 triangle and multiply each number by two.
Here are a few rules about the relatively prime Pythagorean triples.
They are always of the form odd² + even² = odd². We can have even² + even² = even², like 6-8-10, but all the numbers are divisible by two, so they aren't relatively prime. It turns out that odd² + odd² will be even, of course, but it can never be the square of an even number. All the even squares are divisible by 4 and the sum of two odd perfect squares will always have remainder 2 when divided by 4.
There is a generating function. Take any two distinct whole numbers j and k and let j be the larger. Here are the formulas for a, b and c.
a = j² - k²
b = 2jk
c = j² + k²
Tomorrow, we will look at what choices for j and k will produce the relatively prime Pythagorean triples.
No comments:
Post a Comment