The title says it all, I guess. Why $$\sum_{i=0}^{w-1}{2^i} = 2^w - 1$$
2026-04-09 16:33:11.1775752391
On
Why is $\sum_{i=0}^{w-1}{2^i} = 2^w - 1$?
139 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
0
On
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.$$
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$$