Show that there are just three right angled triangles with integral side lengths a < b < c such that ab = 4(a + b + c).

**Solution**

Answer: 12, 16, 20; 10, 24, 26; 9, 40, 41.

We need the result that for some integral d, m, n we have c = d(m^{2} + n^{2}) and b = 2dmn, a = d(m^{2} - n^{2}) or b = d(m^{2} - n^{2}), a = 2dmn (*).

It follows that 4(a + b + c) =4d(2m^{2} + 2mn), ab = 2d^{2}mn(m^{2} - n^{2}). Hence, 4 = dn(m - n). So we must have n = 1, 2 or 4 and (d, m, n) = (1, 5, 1), (2, 3, 1), (4, 2, 1), (1, 4, 2), (2, 3, 2) or (1, 5, 4), giving the three answers above.

It remains to prove (*). Let d be the gcd of a and b. It follows that d also divides c. Put a = dA, b = dB, c = dC, so that A, B, C are relatively prime in pairs. C cannot be even, for then A and B would both be odd and hence A^{2} + B^{2} would be congruent to 2 mod 4, which is impossible, since C is a square. So C must be odd and just one of A, B must be even. Assume A is odd. Then A^{2} = (C - B)(C + B). If an odd prime p divides A, then it must divide C - B or C + B. It cannot divide both, for then it would also divide B and C. So C - B and C + B must both be odd squares. Say C + B = h^{2}, C - B = k^{2}. Then A = hk, B = (h^{2} - k^{2})/2, C = (h^{2} + k^{2})/2, with h and k odd. Put m = (h + k)/2, n = (h - k)/2, then h = m + n, k = m - n and A = m^{2} - n^{2}, B = 2mn, C = m^{2} + n^{2}, so we have put a, b, c, in the form (*). On the other hand, it is obvious that if a, b, c have this form then they satisfy a^{2} + b^{2} = c^{2}.

© John Scholes

jscholes@kalva.demon.co.uk

25 Jan 2002