TITLE: What's the number of solutions of the quadratic equation $x_1^2+\dots+x_m^2=0$ over finite ring $\mathbb{Z}/p^n$?
QUESTION [10 upvotes]: I want to calculate the number of solutions to the quadratic equation $$x_1^2+\dots+x_m^2=0$$ where $m$ is odd (a given number) and $x_i\in\mathbb{Z}/p^n$ for a given prime number $p$ and a given positive integer $n$.
I guess one can consider the projective variety over the $p$-adic field $\mathbb{Q}_p$ and count the point of some kind of projection but I didn't make it.

REPLY [5 votes]: For what it's worth, if you want to investigate this more generally, let $f(x_1,\ldots,x_m)\in\mathbb Z[x_1,\ldots,x_m]$ be a homogeneous form of degree $d$, and let
$$ N_n(f) = \Bigl(\text{# of solutions of } f(x_1,\ldots,x_m)\equiv0\pmod{p^n}\Bigr). $$
Then the Igusa zeta function of $f$ is (more-or-less) the generating function
$$ Z(f,t) = \sum_{n=1}^\infty N_n(f) (t/p^m)^n . $$
A deep theorem of Igusa, with a subsequent alternative proof by Denef, say that $Z(f,t)$ is a rational function, but exact formulas are known in only a small number of cases. However, one case where a lot is known is "Fermat-type equations," i.e., diagonal equations, of which yours is the first interesting example.