I was curious about the formula for the difference between a number powered by a certain number and the sum of the number powered from 0 to the number - 1. I found this formula but I'm not sure if this is correct, and if it was correct, I couldn't prove it in a "proper" way. Can someone here show me the proof of this formula because I'm really curious about it?
$$x^n = \left[(x-1)\sum\limits_{k=0}^{n-1}x^k\right]+1$$
Given a finite series $$S=\sum_{k=0}^{n-1} x^k=1+x+x^2+\ldots+x^{n-1}$$ We want to find a closed expression for $S$. Note that by multiplying by $x$, we get $$Sx=x+x^2+x^3+\ldots+x^n$$ Now subtract both eqations and note the massive cancellation, $$(x-1)S=x^n-1$$ $$(x-1)S+1=x^n$$ $$\left[(x-1)\sum_{k=0}^{n-1} x^k\right]+1=x^n$$