Proof of the formula $1+x+x^2+x^3+ \cdots +x^n =\frac{x^{n+1}-1}{x-1}$ [duplicate]
Possible Duplicate:
Value of $\sum x^n$
Proof to the formula $$1+x+x^2+x^3+\cdots+x^n = \frac{x^{n+1}-1}{x-1}.$$
Since $1-x^{n+1}$ has $1$ as a root, the quotient $\frac{1-x^{n+1}}{1-x}$ is a polynomial.
If $\mathbb F_q$ is a finite field with $q$ elements and $V$ is a $\mathbb F_q$-vector space of dimension $n+1$, then $\frac{1-q^{n+1}}{1-q}=|P(V)|$ is the cardinal of the projective space attached to $V$. Now $P(V)$ can be described as a disjoint union $$P(V)=\mathbb A^0\sqcup\mathbb A^1\sqcup \mathbb A^2\sqcup\cdots\sqcup\mathbb A^n$$ where $\mathbb A^k$ is, for each $k$, an affine space of dimension $k$ over $\mathbb F_q$ (which is a complicated way of saying, as far as our purposes go, a vector space over $\mathbb F_q$ of dimension $k$) Since $|\mathbb A^k|=q^k$, we find that $$\frac{1-q^{n+1}}{1-q}=1+q+q^2+q^3+\cdots+q^n$$ for all numbers $q$ which are powers of prime numbers. It follows that $$\frac{1-x^{n+1}}{1-x}=1+x+x^2+x^3+\cdots+x^n$$ as polynomials, because the equality holds for infinitely many values of $x$ (and we are working over $\mathbb Z$...)
Let $S=1+x+x^2+...+x^n$. Then, $xS=x+x^2+...+x^{n+1}=1+x+x^2+...+x^n+(x^{n+1}-1)=S+x^{n+1}-1$. So, $xS-S=x^{n+1}-1$. So, $S=\frac{x^{n+1}-1}{x-1}$. (The exponent of the $x$ in the numerator of the RHS should be $n+1$ not $n$).
HINT $\ \ $ The sum $\rm\:S\:$ is "almost" preserved by a shift symmetry $\rm\ S \to x\:S$
Examine the discrepancy $\rm\ x\:S - S\:.\ \ $ It's just the finite case of Hilbert's infinite Hotel
Observe that \begin{eqnarray} x^{n+1} - 1 = x^{n+1} + (x^{n} - x^{n}) + \cdots + (x - x) - 1 = (x^{n} + x^{n-1} + \cdots + x + 1)(x - 1). \end{eqnarray}
It equals (x^(n+1)-1)/(x-1), not what you wrote.