Fast computation of the number of solutions to $x_1^2+\cdots+x_k^2   \equiv \lambda \pmod{n}$
  In this paper we study the multiplicative function $\rho_{k,\lambda}(n)$ that counts the number of incongruent solutions of the equation $x_1^2+\cdots+x_k^2 \equiv \lambda\pmod{n}$. In particular we give closed explicit formulas for $\rho_{k,\lambda}(p^s)$ with a arithmetic complexity of constant order. 
Jose Maria Grau, A. Oller-marcen
math.NT