Generation of Pythagorean numbers
Last Up date on: 2003 November 13
The following is the text of an email I sent to a friend:
| Hi: An exercise in arithmetic.
Chose two numbers: m and n that have no common divisor; and m>n further one must be even when the other is odd. Examples for (m,n) would be: (2,1) (3,2) (4,1) (4,3) (5,2) (5,4) (6,1) but not (6,3) because 3 divides both, (6,5) (7,2) and so on. Let x=2mn, y=m2 - n2, and z=m2 + n2
You will find that for all such (m,n) pairs:
x2 + y2 = z2
|
This morning (Sun 03-11-09) I decided to see if I could write a small program, Assembly Language of course, to generate (m,n) values. The following is the result of a short run of that program. Note: The first column is the value of m followed by all the valid values of n. The values of n that have a common divisor with m have been eliminated. These values generate Pythagorean numbers that have no common divisor.
2 1 3 2 4 1 3 5 2 4 6 1 5 7 2 4 6 8 1 3 5 7 9 2 4 8 10 1 3 7 9 11 2 4 6 8 10 12 1 5 7 11 13 2 4 6 8 10 12 14 1 3 5 9 11 13 15 2 4 8 14 16 1 3 5 7 9 11 13 15 | 17 2 4 6 8 10 12 14 16 18 1 5 7 11 13 17 19 2 4 6 8 10 12 14 16 18 20 1 3 7 9 11 13 17 19 21 2 4 8 10 16 20 22 1 3 5 7 9 13 15 17 19 21 23 2 4 6 8 10 12 14 16 18 20 22 24 1 5 7 11 13 17 19 23 25 2 4 6 8 12 14 16 18 22 24 26 1 3 5 7 9 11 15 17 19 21 23 25 27 2 4 8 10 14 16 20 22 26 28 1 3 5 9 11 13 15 17 19 23 25 27 29 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 1 7 11 13 17 19 23 29 31 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 |