n^k-1
=n^k-n^(k-1)+n^(k-1)-n^(k-2)+n^(k-2)-……-n+n-1
=n^(n-1)(n-1)+n^(k-2)(n-1)+……+(n-1)
=(n-1)[n^(k-1)+n^(k-2)+……+1]
原式=n^(k-1)+n^(k-2)+……+1
n^k-1
=n^k-n^(k-1)+n^(k-1)-n^(k-2)+n^(k-2)-……-n+n-1
=n^(n-1)(n-1)+n^(k-2)(n-1)+……+(n-1)
=(n-1)[n^(k-1)+n^(k-2)+……+1]
原式=n^(k-1)+n^(k-2)+……+1