Re:A binary tree of all Pythagorean triples
by keithalewis on Friday November 22, 2024 @03:32AM
(#42212116)
There are Pythagorean triples (a, b, c) for which there do not exist integers m, n with a = m^2 - n^2, b = 2mn, c = m^2 + n^2.
[ Parent
| on HN ]
Re:A binary tree of all Pythagorean triples
by FredrikMeyer on Friday November 22, 2024 @07:40AM
(#42213340)
Learned something new today. For other interested: https://en.wikipedia.org/wiki/Pythagorean_triple#Generating_...
Re:A binary tree of all Pythagorean triples
by tromp on Friday November 22, 2024 @07:51AM
(#42213409)
But all such triples are non-primitive. I.e. they are of the form (ka, kb, kc) with k>1.
So all Pythagorean triples can be generated as a scaled primitive triple (a,b,c) that is generated by Euclid's formula from m,n.