Finding the sum of the series $2^{n}+2^{n-1}+\dotsb+2^1+2^0$

66 Views Asked by At

For a series $2^n+2^{n-1}+2^{n-2}+2^{n-3}+\dotsb+2^2+2^1+2^0$, is there a formula for calculating the sum of the series for a given value of $n$ aside from manually calculating each result?

$2$ here is just a placeholder, but I need to calculate this for anything up to $1000$ different values of $n$, so would appreciate it if anyone could point me in the right direction.

3

There are 3 best solutions below

1
On

$(a-1)(a^n + a^{n-1} + \cdots + a + 1) = a^{n+1} - 1$

Verify this for yourself.

$a^n + a^{n-1} + \cdots + a + 1 = \frac {a^{n+1} - 1}{a-1}$

1
On

You want to sum a geometric sequence:

$$\sum_{k=0}^n 2^k=\frac{2^{n+1}-1}{2-1}=2^{n+1}-1$$

0
On

Your partial sum is in fact $$ 1+2+4+8+\cdots+2^n = 2^{n+1}-1$$

For example $$ 1+2+4+8 =16-1=15$$

So the sum is the next term minus $1$.