Question 56
Let $n \ge 2$ be an integer. Prove that
$$
(1^{n-1} + 2^{n-1} + \dots + (n-1)^{n-1}) + 1 \text{is divisible by} n
$$
if and only if, for each prime factor $p$ of $n$
$$
\frac{n}{p}-1 \text{is divisible by} p \text{ and } \frac{n}{p}-1 \text{is divisible by} p-1.
$$
$$
(1^{n-1} + 2^{n-1} + \dots + (n-1)^{n-1}) + 1 \text{is divisible by} n
$$
if and only if, for each prime factor $p$ of $n$
$$
\frac{n}{p}-1 \text{is divisible by} p \text{ and } \frac{n}{p}-1 \text{is divisible by} p-1.
$$