# Adding exponents with the same base

Can someone explain how they simplified the left hand side to $2^7 - 2$?

$$2^{6} + 2^{5} + 2^{4} + 2^{3} + 2^{2} + 2^{1} =2^{7}−2 = 126$$

• Something's wrong. Did you mean to use minus signs on the left expression?
– John
Commented Nov 22, 2017 at 22:58
• Whoops I made a mistake copying it, let me fix it Commented Nov 22, 2017 at 23:01
• $0=2^1-2,0+2=2^1+2^1-2=2^2-2,0+2+4=2^3-2\cdots$ Commented Nov 22, 2017 at 23:08

Hint: Write down the sum and multiply it by $x$ to obtain two equations (For your question $x=2$).

$$S = x + x^2 + \ldots + x^n$$ $$xS = x^2 + x^3+ \ldots + x^{n+1}$$

Subtract both equations and solve for $S$: $$\implies (1-x)S=x-x^{n+1} \implies S = \dfrac{x-x^{n+1}}{1-x}$$

Hence,

$$S= x+x^2+\ldots + x^n = \dfrac{x-x^{n+1}}{1-x}.$$

Use $$a^n-b^n=(a-b)(a^{n-1}+a^{n-2}b+...+ab^{n-2}+b^{n-1})$$ for $n=7$, $a=2$ and $b=1$.

Using the binary representation,

\begin{align} 2^6 + 2^5 + 2^4 + 2^3 + 2^2 + 2^1 =&01111110_b . \end{align}