Prove: If $p$ is a prime number (but 2) and $2^m \not \equiv 1\bmod p$,$\quad\sum_{k=1}^{p-1} k^m \equiv 0\bmod p$ Prove: If $p$ is a prime number (but 2) and $2^m \not \equiv 1\bmod p$,$\quad\sum_{k=1}^{p-1} k^m \equiv 0\bmod p$
It's easy to prove if $m \equiv 0\;$ or$\;1\bmod p$, I tried Faulhaber's formula, but I can't prove this one.
 A: There is an even more general approach that one can take. We say a ring is a domain when the product of any two nonzero elements remains nonzero.

Proposition. Let $A$ be a (not necessarily commutative) domain and $G \leqslant \mathrm{U}(A)$ be nontrivial and finite (i.e. a nontrivial finite subgroup of the multiplicative group of units of ring $A$). It then holds that 
  $$\sum_{x \in G}x=0_A$$

Proof: since $G$ is nontrivial, we can fix $a \in G\setminus \{1_A\}$; by writing
$$b=\sum_{x \in G} x$$
we have that 
$$ab=\sum_{x \in G}(ax)=b$$ 
since the map 
$$G \to G \\ x \mapsto ax$$ 
is a bijection implementing a change of variable in the summation index. This relation leads to $(a-1_A)b=0_A$ and since $a-1_A \neq 0_A$ and we are working in a domain we necessarily have $b=0_A$. $\Box$
This applies to the particular setting at hand, where $A=\mathbb{Z}/p \mathbb{Z}=\mathbb{Z}_p$ and $G=\{x^m\}_{x \in \mathbb{Z}_{p}^{\times}}$ is the subgroup characterised as the image of the morphism $f: \mathbb{Z}_{p}^{\times} \to \mathbb{Z}_{p}^{\times}, f(x)=x^m$. Note that the condition $2^m \not\equiv 1 (\mathrm{mod}\ p)$ ensures that $G$ is nontrivial.
Agreeing to write $\overline{n}$ for the class modulo $p$ of arbitrary $n \in \mathbb{Z}$, our objective is to prove that
$$\overline{\sum_{k=1}^{p-1} k^m}=\sum_{k=1}^{p-1} \overline{k}^m=\sum_{x \in \mathbb{Z}_{p}^{\times}} x^m=\overline{0}$$
To this end, let us notice that
$$\sum_{x \in \mathbb{Z}_{p}^{\times}} x^m=\sum_{x \in \mathbb{Z}_{p}^{\times}} f(x)=\sum_{y \in G} \sum_{x \in f^{-1}(\{y\})} f(x)=\sum_{y \in G} \sum_{x \in f^{-1}(\{y\})} y=\sum_{y \in G} |f^{-1}(\{y\})|y \tag{*}$$
and let us recall that for any group morphism $g: F \to F'$ and any $t \in F$ we have 
$$g^{-1}(\{g(t)\})=t \mathrm{Ker}g$$ 
so that for any $z \in \mathrm{Im}g$ we can infer $|g^{-1}(\{z\})|=|\mathrm{Ker}g|$; by virtue of this the chain of equalities (*) continues with
$$\sum_{y \in G} |f^{-1}(\{y\})|y=|\mathrm{Ker}f| \sum_{y \in G} y=\overline{0}$$
by virtue of the proposition established above.
A: Denote $S=\sum\limits_{k=1}^{p-1} k^m$. Then, let's consider $2^m\cdot S$, note that
$$
2^m\cdot S=\sum\limits_{k=1}^{p-1} 2^m\cdot k^m=\sum\limits_{k=1}^{p-1} (2k)^m.
$$
As $p>2$ is a prime number, we have $\{1,2,\ldots,p-1\}\equiv\{2,4,\ldots,2(p-1)\}\pmod p$ (it means that sets of residues modulo $p$ are the same). Hence,
$$
\sum\limits_{k=1}^{p-1} (2k)^m\equiv\sum\limits_{k=1}^{p-1} k^m=S\pmod p.
$$
Thus, $2^m\cdot S\equiv S\pmod p$ or $(2^m-1)\cdot S\equiv 0\pmod p$. Since $2^m\not\equiv 1\pmod p$ we obtain $p\mid S$ as desired.
Moreover, more general result holds:

Given prime number $p$ and positive integer $m$. Denote $S_m=\sum\limits_{k=1}^{p-1} k^m$. Then if $p-1\mid m$ then $S_m\equiv -1\pmod p$, if $p-1\nmid m$ then $S_m\equiv 0\pmod p$.

