Can you give a counterexample for the following conjecture :
For $m \ge 1$ and $n>2$ , $n$ is a prime iff
$$\displaystyle\sum_{k=1}^{n^m-1} k^{n^m-1} \equiv (n-1) \cdot n^{m-1} \pmod{n^m} $$
You can run this test here .
P.S.
For $m=1$ we have Giuga's conjecture .