Problem

Source: Belarus 2010 TST 2.2

Tags: number theory, prime, Divisibility



Let $p$ be a positive prime integer, $S(p)$ be the number of triples $(x,y,z)$ such that $x,y,z\in\{0,1,..., p-1\}$ and $x^2+y^2+z^2$ is divided by $p$. Prove that $S(p) \ge 2p- 1$. (I. Bliznets)