in reply to Pythagorean Triples
Well, somebody's got to do the mathmonk thing.
This has a neat relation to number theory. Prime numbers which satisfy (1 == $prime % 4) can be expressed as a sum of squares, ($m**2 + $n**2). Such primes can be factored as complex numbers, $n+i*$m and $n-i*$m with $n > $m. These are known as Gaussian primes.
Plugging $m and $n into your formula shows the correspondence of primes equal to 4*$foo + 1 and Pythagorean right triangles. The ever-popular 3-4-5 right triangle corresponds to the Gaussian prime (2 + i).
Not every Pythagorean right triangle corresponds to a Gaussian prime. If $n and $m have a common factor, or are both odd, then they do not represent a complex prime in this way.
After Compline,
Zaxo
|
|---|