TITLE: An induction problem
QUESTION [7 upvotes]: Recently I started to learn some induction problems, and I'm stuck with this one:
prove that, for each $n$ $\in \mathbb N$, $(n-1)^2$ divides $n^n - n^2 + n - 1$.
There are no tips or answers in the textbook on how to solve this problem, so I'm little bit stuck and frustrated. Here's what I got:
Basis: $n = 1$, $(1-1)^2 = 0$, and for $n = 1$ we have $1^1 - 1^2 + 1 - 1 = 0$, so for $n = 1$ it's true.
Induction Hypothesis: for each $n$ $\in \mathbb N$, $(n-1)^2$ divides $n^n - n^2 + n - 1$.
Induction Step:  this is where I'm stuck. I know that I must show that for $((n+1)-1)^2$ = $n^2$, the number $({n^2})^{n^2} - n^2 + n - 1$ is equal to zero.
So, is there anyone who can help me, or give any advice? Thank you in advance.

REPLY [5 votes]: For the inductive step, you must show that $n^2$ divides
$(n+1)^{n+1}-(n+1)^2+n$.
From the binomial expansion, that is equivalent to $n^2$ dividing $1+n(n+1)-(n+1)^2+n$.
Can you take it from here?