\(n^n-n-\left(n^2-2n+1\right)=\left(n^2-n\right)\left(n^{n-2}+n^{n-3}+...+n+1\right)-\left(n-1\right)^2=\left(n-1\right)n\left(n^{n-2}+n^{n-3}+...+n+1\right)-\left(n-1\right)^2\)
\(\left(n-1\right)\left[\left(n^{n-1}-1\right)+\left(n^{n-2}-1\right)+...+\left(n-1\right)\right]-\left(n-1\right)^2\)
=> luôn chia hết cho (n-1)^2