Equation mod $p$ 
How many non-trivial solutions does the equation
  $$a^2+b^2+c^2=0$$
  have in $\mathbb{F}_p$?  

By non-trivial, I mean all solutions $(a,b,c)\ne (0,0,0)$.  I've checked for small $p$, and seem to be getting $p^2-1$ solutions, and I would love to see if this holds in the general case.  I'm not too sure where to start.  Thanks!
 A: There may be simpler approaches, but one method is exponential sums. Let $$S=\sum_{a,b,c,t}e^{2\pi i(a^2+b^2+c^2)t/p}$$ where the variables all run, independently, from $0$ to $p-1$. On the one hand, $$S=\sum_{a,b,c}\sum_te^{2\pi i(a^2+b^2+c^2)t/p}$$ and the inner sum is $p$ when $a^2+b^2+c^2\equiv0\pmod p$ and zero otherwise, so $$S=pN$$ where $N$ is the number you are looking for. On the other hand, $$S=\sum_t\sum_{a,b,c}e^{2\pi i(a^2+b^2+c^2)t/p}=p^3+\sum_{t=1}^{p-1}\sum_{a,b,c}e^{2\pi i(a^2+b^2+c^2)t/p}=p^3+\sum_{t=1}^{p-1}\left(\sum_ae^{2\pi ia^2t/p}\right)^3$$ That inner sum is a quadratic Gauss sum, q.v., and its value is known to be $\sqrt p$ if $p\equiv1\pmod4$ and $t$ is a quadratic residue modulo $p$; $-\sqrt p$ if $p\equiv1\pmod4$ and $t$ is a quadratic nonresidue modulo $p$; $\sqrt{-p}$ if $p\equiv3\pmod4$ and $t$ is a quadratic residue modulo $p$; $-\sqrt{-p}$ if $p\equiv3\pmod4$ and $t$ is a quadratic nonresidue modulo $p$. Since there are as many residues as nonresidues, the sum on $t$ comes to zero, so $$S=p^3{\rm\ and\ }N=p^2$$ 
Note that I am counting the solution $a=b=c=0$. 
