find the largest possible number of elements of a set of positive integers satisfying two number properties 
A problem and solution to a past contest problem are shown below. I was wondering why the claim that $\sum F^r (x_1,\cdots, x_{r^2 + 1})\equiv 0\mod p$ implies the number of solutions to (*) is divisible by p? Obviously for every such solution, $F^r$ will be zero. But if the number of solutions is not divisible by p, I'm not sure how to get a contradiction. I believe the goal is to find a nonzero solution $(x_1,\cdots, x_{r^2 + 1})$ to a system of congruences.


Doesn't the last claim imply that for all r, $F^r\equiv 0\mod p$?



 A: 
I am wondering why the claim that $\sum F^r (x_1,\cdots, x_{r^2 + 1})\equiv 0\mod p$ implies the number of solutions to (*) is divisible by p?

$$\begin{aligned}&\sum F^r (x_1,\cdots, x_{r^2 + 1})\\
&=\sum_{(x_1, \cdots, x_{r^2+1})\in\Bbb F_p^{r^2+1}}F^r (x_1,\cdots, x_{r^2 + 1})\\
&=\sum_{(x_1, \cdots, x_{r^2+1})\in\Bbb F_p^{r^2+1},\ F^r (x_1,\cdots, x_{r^2 + 1})=0 }F^r (x_1,\cdots, x_{r^2 + 1}) \\
&\quad\quad+\sum_{(x_1, \cdots, x_{r^2+1})\in\Bbb F_p^{r^2+1},\ F^r (x_1,\cdots, x_{r^2 + 1})\not=0 }F^r (x_1,\cdots, x_{r^2 + 1})\\
&=\sum_{(x_1, \cdots, x_{r^2+1})\in\Bbb F_p^{r^2+1},\ F(x_1,\cdots, x_{r^2 + 1})=0 }0 \\
&\quad\quad+\sum_{(x_1, \cdots, x_{r^2+1})\in\Bbb F_p^{r^2+1},\ F(x_1,\cdots, x_{r^2 + 1})\not=0 }1\\
&=\#\{(x_1, \cdots, x_{r^2+1})\in\Bbb F_p^{r^2+1}\mid\ F(x_1,\cdots, x_{r^2 + 1})\not=0 \}\\
&=\#\{(x_1, \cdots, x_{r^2+1})\in\Bbb F_p^{r^2+1}\}-\#\{(x_1, \cdots, x_{r^2+1})\in\Bbb F_p^{r^2+1}\mid \ F(x_1,\cdots, x_{r^2 + 1})=0 \}\\
&=p^{r^2+1}-\#\{(x_1, \cdots, x_{r^2+1})\in\Bbb F_p^{r^2+1}\mid \ F(x_1,\cdots, x_{r^2 + 1})=0 \}\\
&\equiv_p-\#\{(x_1, \cdots, x_{r^2+1})\in\Bbb F_p^{r^2+1}\mid \ F(x_1,\cdots, x_{r^2 + 1})=0 \}
\end{aligned}$$
That is, the sum $F^r (x_1,\cdots, x_{r^2 + 1}) \mod p$ is equal to the negative of the number of solutions to (*). So, if the former is $0\mod p$, so is the latter.

Doesn't the last claim imply that for all $r$, $F^r\equiv 0\bmod p$ ?

If you mean $\sum_{(x_1, \cdots, x_{r^2+1})\in\Bbb F_p^{r^2+1}}F^k(x_1,\cdots, x_{r^2 + 1})$ for any $1\le k\le r$, then yes, that is correct. However, only when $k=r$ is helpful for the current problem.
