MacKay and Mahajan have a short easy-to-read article expanding on Noam's comment. [(pdf link)][1] Edit (5/14/13): There is a whole bunch of random notes on relationships like this one and others that can be found here: [https://sites.google.com/site/tpiezas/003][2] [1]: http://www.cs.toronto.edu/~mackay/sumsquares.pdf [2]: https://sites.google.com/site/tpiezas/003