I have this amazing exercise which explicitly says prove in at least six different way that $n^{n-1}-1$ is divisible by $(n-1)^2$ where $n$ is an integer.
So far I have only prove it as follows: By geometric sum we have
$$\sum_{k=0}^{n-2}n^k=\frac{n^{n-1}-1}{n-1}$$ However, since $n\equiv 1\mod (n-1)$ we have $$\frac{n^{n-1}-1}{n-1}=\sum_{k=0}^{n-2}n^k\equiv \sum_{k=0}^{n-2}1^k\mod(n-1)$$ that is $$\frac{n^{n-1}-1}{n-1}=\sum_{k=0}^{n-2}n^k\equiv n-1\mod(n-1)\Longleftrightarrow \frac{n^{n-1}-1}{n-1} \equiv 0\mod(n-1)$$
and this prove that $(n-1)^2$ divides $n^{n-1}-1$.
Does anyone have another approach different from mine.? Note that I do necessary need one to give all six approaches as was asked in the exercise one or two is plainly enough for me.
Expanding by the binomial theorem, $$(k+1)^{n-1}-1=k^{n-1}+\binom{n-1}1k^{n-2}+\cdots+\binom{n-1}2k^2+\binom{n-1}1k\ .$$ Now substitute $k=n-1$.
The last term on the RHS is $(n-1)k=(n-1)^2$ which is obviously a multiple of $(n-1)^2$.
Every other term is a multiple of $k^2$, which is $(n-1)^2$.