At 11:03 PM 12/18/2004, William Thurston wrote:
There's a nice, well-known theory of which integers can be expressed as the sum of two squares. What can be said about numbers that are sums of two triangles, i.e. 1 or 3 or 6 or 10 or 15 ... + 1 or 3 or 6 or 10 or 15 ...?
An integer N is the sum of two triangles if and only if 4N + 1 is the sum of two squares. Proof: If N is the sum of two triangles, say N = a(a + 1)/2 + b(b + 1)/2, then 4N + 1 = 2a^2 + 2a + 2b^2 + 2b + 1 = (a + b + 1)^2 + (a - b)^2. Conversely, if 4N + 1 is the sum of two squares, say 4N + 1 = u^2 + v^2, then u and v necessarily have opposite parity, so they can be written as a + b + 1 and a - b for some integers a,b; hence we again have N = a(a + 1)/2 + b(b + 1)/2. -- Fred W. Helenius <fredh@ix.netcom.com>