Re:A binary tree of all Pythagorean triples
by not2b on Thursday November 21, 2024 @11:52AM
(#42206201)
The ternary tree contains all primitive triples (where the GCD of the terms is 1), where a<b<c. So it contains (3,4,5) but not (6,8,10) or (4,3,5).
[ Parent
| on HN ]
Re:A binary tree of all Pythagorean triples
by nyrikki on Thursday November 21, 2024 @12:07PM
(#42206343)
Yes, but the binary projection does not according to the link.
345 and 435 would require two binary trees.
Re:A binary tree of all Pythagorean triples
by AnotherGoodName on Thursday November 21, 2024 @01:01PM
(#42206896)
I think skipping transposed values is fine though. You could just mirror the output at 45degrees for that if you wanted it. It does hit all distinct triples including the multiples of triples so it’s more inclusive of everything than the ternary tree.