Let's define , $$R\_{p^m,k}(n)=\#\{(a\_1,\dots,a\_k)\in\mathbb{Z}^k:\sum\_{i=1}^ka\_i^2\le n \ \text{and} \ p^m|\sum\_{i=1}^ka\_i^2\}$$
what will be growth bound of $R\_{p^m,k}(n)$? This can be thought as a extended version of Gauss's Circle problem.


I am interested only in the case of $k=4$ but would be happy to know in general?
Any reference will be highly helpful.



Expression and growth bound for $r_{p^m,k}(n)$
By a simple volume argument (resembling Gauss's original argument in the circle problem) it is easy to see that 
$$R\_{p^m,k}(n)\sim \frac{S\_{p^m,k}}{p^{km}}\cdot\frac{(\pi n)^{k/2}}{\Gamma(k/2+1)},$$ where $S\_{p^m,k}$ is the number of solutions of the congruence 
$$\sum\_{i=1}^k x\_i^2\equiv 0\pmod{p^m}.$$
The quantity $S\_{p^m,k}$ can be expressed more explicitly via Hensel's lemma (reducing it to $m=1$ when $p>2$, and to $m=3$ when $p=2$).


