When I read a book about how "bit" is used in computer, the author explains the binary system in a detailed way. He introduced how to convert binary number back to decimal (that's pretty simple I know), but this also makes me wonder whether I can generalize a formula that allows any positive integer with also a positive integer exponent to be expressed in a slightly different form:
Suppose there are two integers $x$ and $n$ $(x \geq 2; n \geq 1)$,
then we have $x^n = (x-1)\cdot x^{n-1} + (x-1)\cdot x^{n-2} + (x-1)\cdot x^{n-3} +...+ (x-1)\cdot x^{2}+(x-1)\cdot x^{1}+(x-1)\cdot x^{0}+1$
Could anyone verify whether this formula is absolutely right? I check with various examples and all work. Does any formula exist before or can any existing theorem simply derive this? Thanks a lot!
Yes, this is correct. Notice that $$(x-1)x^{n-1}=x^n-x^{n-1},$$ $$(x-1)x^{n-2}=x^{n-1}-x^{n-2},$$ and so on down to $$(x-1)x^1=x^2-x,$$ $$(x-1)x^0=x-1.$$ When you add these together, all the terms except the first $x^n$ and the last $-1$ cancel out (for instance, the $-x^{n-1}$ in $x^n-x^{n-1}$ cancels the $x^{n-1}$ in $x^{n-1}-x^{n-2}$) giving just $x^n-1$. Finally, when you add on the last term $1$ of your expression, you get just $x^n$.