Pythagorean triples
Every primitive Pythagorean triple (integer sides with ) can be generated from a pair of integers , coprime and of opposite parity:
Every other Pythagorean triple is just an integer multiple of a primitive one — this is why triples like 6-8-10 and 9-12-15 are all built from the primitive 3-4-5.
Sums of two squares
A key factoring identity: turns a difference of squares into a product, which is often the entry point for these problems. A deeper fact governs which integers can be written as a sum of two squares: a positive integer is expressible as a sum of two squares if and only if every prime factor of that is appears to an even power.
Worked example
Problem: Find all primitive Pythagorean triples with hypotenuse 25.
Solution: We need with , coprime, opposite parity. Testing: gives ✓ (coprime, opposite parity).
This generates the triple:
So the triple is — and this is the only primitive triple with hypotenuse 25 (the other decomposition, , fails since it requires ).
Practice problems
1.Using , generate a primitive Pythagorean triple.
2.Is 21 expressible as a sum of two squares? ()
3.Is 45 expressible as a sum of two squares? ()
4.Solve in positive integers, using the factoring identity.