# Solutions to a quadratic congruence

Fix an odd prime $p$. Let $\alpha = (\alpha_0,\dots,\alpha_k)$ be a solution to the congruence $\sum_{i=0}^{k} \alpha_i^2 \equiv x \mod p$. Now consider the number $N_\alpha$ of solutions to the simultaneous congruences $$\sum_{i=0}^k \beta_i^2 \equiv y \mod p \quad \text{ and } \quad \sum_{i=0}^k (\alpha_i + \beta_i)^2 \equiv z \mod p.$$

Based on some small computations, I am finding that $N_\alpha$ does not depend on $\alpha$, i.e., it seems there exists a constant $c$ (depending on $x$, $y$, and $z$) such that $N_\alpha = c$ for any solution $\alpha$ to the first congruence.

Does anyone know whether this is true in general? Or can someone provide a useful reference?

-
Well, it's definitely false if $k=0$, so I suspect it's false in general. –  Greg Martin Mar 13 '13 at 16:18
@Greg Martin: How is it false? If $k=0$, there are at most two solutions for the first congruence, call them $\alpha$ and $-\alpha$. Then if $B(\alpha)$ is the set of solutions of the other two congruences, then $B(-\alpha)=\{-\beta:\beta\in B(\alpha)\}$, in particular they have the same cardinality. –  Emil Jeřábek Mar 13 '13 at 19:34
The general result follows from the fact that the orthogonal group of linear transformations that preserve the quadratic form $\sum_{i=0}^k \alpha^2$ is transitive on each sphere $\sum_{i=0}^k \alpha^2 = x$. –  Noam D. Elkies Mar 13 '13 at 19:52
Your equations define a quadric, the first equation is quadratic in the betas and the second is linear, once you subtract the first. Quadrics fall into a small number of projective equivalence classes over finite fields and each class has the same number of points. –  Felipe Voloch Mar 13 '13 at 19:54
Thanks, that's just what I needed to hear. –  Gary Mar 14 '13 at 6:28