The sides of a pythagorean triangle can be written as K(p^2-q^2), K(2pq), and K(p^2+q^2) for integer K; see this reference for this.
The "multiple of 3" part: if p or q is multiple of 3, 2pq is a multiple of 3; if both are multiples of 3 plus 1 or 2, then their squares are multiples of 3 plus 1, so p^2-q^2 is a multiple of 3.
The "multiple of 4" part: if p or q is even, 2pq is multiple of 4; if both are odd, their squares are multiples of 4 plus 1, so p^2-q^2 is a multiple of 4.
The "multiple of 5" part: if p or q is multiple of 5, 2pq is a multiple of 5; if they are multiples of 5 plus 1, 2, 3, or 4, their squares are multiples of 5 plus/minus 1, so either p^2+q^2 or p^2-q^2 will be a multiple of 5.
|