For n≥1, the zero residue contributes zero. Write S=∑x∈Fp×xn. Multiplication by any nonzero α permutes these residues, so S=αnS in Fp. If (p−1)∤n, choose a primitive rootg; then gn=1, and (1−gn)S=0forces S=0.
If (p−1)∣n, every nonzero x has xn=1, so S=p−1≡−1(modp). Therefore
The source also lists n=0, although its premise assumes n≥1. For that separate case, the integersum has p terms each equal to one, so it is zero modulo p.