I found this result mentioned in passing in a number theory paper. It looks almost self-evident:
$$ \# \{ (a,b,c,d) \in \mathbb{Z}^4 : a^2 + b^2 + c^2 + d^2 = m\} \asymp m $$
It is stated without proof. It looks almost like the 4-squares theorem in fact that number is $r_4(m)$ which is A000118
This plot looks possibly linear, but with a bunch of noise. It doesn't look obvious.
- Valentin Blomer, Anke Pohl The sup-norm problem for the Siegel modular space of rank two arXiv:1402.4635

By Jacobi's four-square theorem we have $$ r_4(n)=\begin{cases}8\sum\limits_{m|n}m&\text{if }n\text{ is odd}\\[12pt] 24\sum\limits_{\begin{smallmatrix} m|n \\ m\text{ odd} \end{smallmatrix}}m&\text{if }n\text{ is even}. \end{cases} $$ For $n=p$ prime this gives, for example, $r_4(p)=8(p+1)\asymp p$. In general, the asymptotic growth rate of $\sigma(n)=\sum_{m\mid n}m$ can be expressed by: $$ \limsup_{n\rightarrow\infty}\frac{\sigma(n)}{n\,\log \log n}=e^\gamma. $$ The behaviour of the sigma function is very irregular, as your plots also show.