Note that you can write $$1+x+x^2+...+x^N=(1+x+x^2+...+x^N)(1-x)/(1-x)=(1-x^{N+1})/(1-x)$$ if $x\ne 1$
0
Bumbble Comm
On
Use the formula for the sum of consecutive terms of a geometric progression:
$$\frac z2\,\frac{\Bigl(\dfrac z2\Bigr)^{\!N}-1}{\dfrac z2-1}=\frac{z\Bigl(z^N-2^N\Bigr)}{2^N(z-2)}\qquad(z\ne 2)$$
Note that you can write $$1+x+x^2+...+x^N=(1+x+x^2+...+x^N)(1-x)/(1-x)=(1-x^{N+1})/(1-x)$$ if $x\ne 1$