What is this formula? There is some formula that I can't precisely remember for polynomials, which goes something like $x^n-1 = (x-1)(\text{a lot of stuff})$. It could be more general, like $x^n - k$, or maybe it is just for the same powers, so $x^m - k^m$, but I think it's not just for the same powers. Does anyone know what I am talking about? I realize this is vague.
 A: The result that you are referring to is
$$x^n-1=(x-1)(x^{n-1}+x^{n-2}+\cdots +x+1).$$
This is easy to verify by multiplying out the right-hand side.
For
$$\begin{align}(x-1)(x^{n-1}+x^{n-2}+\cdots +x+1)=x(x^{n-1}+x^{n-2}+\cdots +x+1)\\-(x^{n-1}+x^{n-2}+\cdots +x&+1)\end{align}.$$
The first product on the right-hand side is equal to 
$x^n+x^{n-1}+\cdots +x^2 +x$.  When you subtract $x^{n-1}+x^{n-2}+\cdots +x+1$ from this, almost all the terms cancel, and you are left with just $x^n-1$.
Almost the same argument shows that 
$$x^n-y^n=(x-y)(x^{n-1}+x^{n-2}y+x^{n-3}y^2+\cdots +xy^{n-2}+y^{n-1}).$$
You have undoubtedly already seen the special case $x^2-y^2=(x-y)(x+y)$, and maybe also $x^3-y^3=(x-y)(x^2+xy+y^2)$. 
The first result is very useful. Let $r$ be a real number other than $1$. Then 
$$1+r+r^2+\cdots +r^{n-1}=\frac{r^n-1}{r-1}.$$
The above formula tells us the sum of a (finite) geometric series, and crops up in many applications.
A: What that formula is stating is that, when $x^n-1$ is dividided through $x-1$ one gets $$1+x+x^2+x^3+\cdots+x^{n-1}$$
This is derived in several ways. One is
Let $$S = 1+x+x^2+x^3+\cdots+x^{n-1}$$
Then one has that
$$Sx=  x+x^2+x^3+\cdots+x^{n}$$
Thus substracting this two equation one gets
$$Sx-S = x^n-1$$
or
$$S(x-1) =x^n-1$$
Which is what we wanted to prove.
Similarily, let $x=\dfrac{b}{a}$, then we have that.
$$x^n-1 = (x-1)(1+x+x^2+\cdots+x^{n-1})$$ 
$$\eqalign{
  & \frac{{{b^n}}}{{{a^n}}} - 1 = \left( {\frac{b}{a} - 1} \right)\left( {1 + \frac{b}{a} + \frac{{{b^2}}}{{{a^2}}} +  \cdots  +\frac{{{b^{n - 2}}}}{{{a^{n - 2}}}}+ \frac{{{b^{n - 1}}}}{{{a^{n - 1}}}}} \right)  \cr 
  & \frac{{{b^n} - {a^n}}}{{{a^n}}} = \left( {\frac{{b - a}}{a}} \right)\left( {1 + \frac{b}{a} + \frac{{{b^2}}}{{{a^2}}} +  \cdots  +\frac{{{b^{n - 2}}}}{{{a^{n - 2}}}}+ \frac{{{b^{n - 1}}}}{{{a^{n - 1}}}}} \right)  \cr 
  & {b^n} - {a^n} = a\left( {\frac{{b - a}}{a}} \right){a^{n - 1}}\left( {1 + \frac{b}{a} + \frac{{{b^2}}}{{{a^2}}} +  \cdots  + \frac{{{b^{n - 1}}}}{{{a^{n - 1}}}}} \right)  \cr 
  & {b^n} - {a^n} = \left( {b - a} \right)\left( {{a^{n - 1}} + b{a^{n - 2}} + {b^2}{a^{n - 3}} +  \cdots  + ab^{n-2}+ {b^{n - 1}}} \right) \cr} $$
or succintly and with a change of exponent, for notation's sake:
$$\frac{{{b^{n + 1}} - {a^{n + 1}}}}{{b - a}} = \sum\limits_{k = 0}^n {{a^{n - k}}{b^k}} $$
