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.