Deducing Jacobi's four square theorem from the prime case

113 Views Asked by At

Jacobi's four-square theorem states that the number of $(x_1, x_2, x_3, x_4) \in \mathbb{Z}^4$ satisfying $x_1^2 + x_2^2 + x_3^2 + x_4^2 = n$ is $8 \sum\limits_{4 \nmid d | n} d$. I have read a proof of the special case when $n = p$ is an odd prime, and now I wanted to deduce the general case. The base case worked by counting the number of integral quaternions of norm $p$, so I tought one might proceed by induction by factoring quaternions. I also noticed that if $(m, n) = 1$, then $\sum\limits_{4 \nmid d | m} d \sum\limits_{4 \nmid e | n} e = \sum\limits_{4 \nmid f | mn} f$. This almost-multiplicative property makes me think that I should start by proving the prime-power case, but even there I'm stuck...