TITLE: Asymptotic formula for sums of four squares?
QUESTION [8 upvotes]: Does there exist asymptotic formula for ways to write n as sum of four squares? Or can this be proved impossible? I can only find reference for sums of five squares.

REPLY [5 votes]: Stanley Yao Xiao gave a perfect answer, but let me remark that $r_4(n)$ also equals $n$ times the usual singular series (familiar from the circle method) when $4\nmid n$. The difference with five or more squares is that the singular series does not vary between two positive constants: instead, it varies between $1$ and a constant times $\log\log n$. Note also that $r_4(n)$ is very small when $n$ is divisible by a large power of $2$.
For more details, see Heath-Brown: A new form of the circle method, and its application to quadratic forms (J. reine angew. Math. 481 (1996), 149-206), especially Theorem 4 and Corollary 1.