Why is $\sum_{i=0}^{w-1}{2^i} = 2^w - 1$?

by That Guy   Last Updated September 11, 2019 18:20 PM - source

The title says it all, I guess. Why $$\sum_{i=0}^{w-1}{2^i} = 2^w - 1$$



Answers 3


Here is an intuitive way to see it:

Say you want to compute $$1+2+2^2+2^3+2^4\tag{1}$$ If you add $1$ to the sum $(1)$ you'll get: $$(1+1)+2+2^2+2^3+2^4\\=(2+2)+2^2+2^3+2^4\\=(2^2+2^2)+2^3+2^4\\=(2^3+2^3)+2^4\\=(2^4+2^4)\\=2^5$$

Since we added $1$, the sum is $1$ less, that is, $$2^5-1$$

cansomeonehelpmeout
cansomeonehelpmeout
September 11, 2019 17:51 PM

Say we set $$s_n(x)=\sum_{k=0}^{n-1}x^k.$$ We see that $$s_{n+1}(x)=x^n+s_n(x).$$ But we also see that $$xs_n(x)=\sum_{k=0}^{n-1}x^{k+1}=\sum_{k=1}^{n}x^k=s_{n+1}(x)-1.$$ Hence we have $$xs_n(x)=s_n(x)+x^n-1,$$ which means that for $x\ne 1$, $$s_n(x)=\frac{x^n-1}{x-1}.$$ The sum in question is given by $$\sum_{i=0}^{w-1}2^i=s_{w}(2)=\frac{2^w-1}{2-1}=2^w-1.$$

clathratus
clathratus
September 11, 2019 18:01 PM

Here's another way to look at it. $$\begin{align}S=1+&2+4+8+\cdots+2^n\\ 2S=\ \ &2+4+8+\cdots+2^n+2^{n+1}\end{align}$$ Subtract the first equation from the second to get $S=2^{n+1}-1$

saulspatz
saulspatz
September 11, 2019 18:02 PM

Related Questions



Is it possible to find $f(n)$?

Updated February 15, 2018 22:20 PM

Calculate the next sum

Updated September 06, 2017 03:20 AM


Sum of $\sum_{n \geq 1} \frac{(\ln x +1)^n}{n^n}$

Updated July 14, 2017 11:20 AM