Post Reply 
Pythagorean Triples
02-09-2017, 08:49 AM (This post was last modified: 02-09-2017 08:56 AM by Dieter.)
Post: #2
RE: Pythagorean Triples
(02-09-2017 05:42 AM)Eddie W. Shore Wrote:  Pythagorean triples can be generated with three arbitrary positive integers M, N, and K with the following criteria:

1. M > N
2. M and N are coprime. That is, gcd(M, N) = 1 (gcd, greatest common denominator)

Eddie, M and N do not have to be coprime (which can be easily shown). If they are, K=1 produces the smallest possible Pythagorean triple. But this is not required for generating such triples in general. Any M > N will do. If the GCD of M and N is G instead of 1 the result is the same as if you would use G²*K instead of K in your formula.

Example: M=10 and N=20 yields 300² + 400² = 500².
Which is 10² times the result of M=1 and N=2, leading to 3² + 4² = 5².

So the GCD condition can be dropped. If your goal is generating primitive Pythagorean triples, a third condition has to be added: M and N must not be both odd, it has to be one odd and one even value, cf. the Wikipedia article you linked to.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Pythagorean Triples - Eddie W. Shore - 02-09-2017, 05:42 AM
RE: Pythagorean Triples - Dieter - 02-09-2017 08:49 AM
RE: Pythagorean Triples - Joe Horn - 02-09-2017, 02:49 PM
RE: Pythagorean Triples - Dieter - 02-09-2017, 08:57 PM



User(s) browsing this thread: 1 Guest(s)