- https://en.wikipedia.org/wiki/Pythagorean_triple
- https://en.wikipedia.org/wiki/Tree_of_primitive_Pythagorean_triples
2. Euclid's formula is a fundamental formula for generating Pythagorean triples given an arbitrary pair of positive integers m and n with m > n.
- a = m^2 - n^2
- b = 2mn
- c = m^2 + n^2
where m and n is coprime and odd parity.
How to iterate all coprime pairs:
- Farey sequence
- Counting
3. Counting:
沒有留言:
張貼留言