What is the best known growth bound of $r\_k(n)$, where $$r\_k(n)=\#\{(a\_1,\dots,a\_k\in\mathbb{Z}^k:\sum\_{i=1}^ka\_i^2=n\}?$$ Please provide some reference if known. Thanks.



Growth of $r_k(n)$
As Igor Rivin said, the question was answered [here](https://math.stackexchange.com/questions/72378/representing-a-number-as-a-sum-of-at-most-k-squares) for $k\geq 5$ by Greg Martin. For $n$ not divisible by $8$, the asymptotic formula described there remains valid for $k=3$ and $k=4$ as well, but the proof techniques are slightly different. Note that for $k=3$ the singular series can vanish, but only if $r\_3(n)=0$. For $n$ divisible by $8$, we have $r\_3(n)=r\_3(n/4)$ and $r\_4(n)=r\_4(n/4)$, so one can reduce to the previous case. Finally, for $k=2$ there is an explicit formula based on arithmetic in Gaussian integers.


Bounding the singular series and the error term is a subtler task.


