<s>[INST] Why is $2^b-1=2^{b-1}+2^{b-2}+...+1$? Can I get an intuitive explanation why the formula in the title holds?
I know that it works but I am not sure why
$2^b-1=2^{b-1}+2^{b-2}+...+1$
 [/INST] Consider the number $N=2^{b-1}+2^{b-2}+\dots+2^2+2^1+2^0$. Now let's look at $N+1$:
$$N+1 = 2^{b-1}+2^{b-2}+\dots+2^2+2^1+2^0+2^0\\
=2^{b-1}+2^{b-2}+\dots+2^2+2^1+2^1\\
=2^{b-1}+2^{b-2}+\dots+2^2+2^2\\
\vdots\\
=2^{b-1}+2^{b-2}+2^{b-2}\\
=2^{b-1}+2^{b-1}\\
=2^b$$
(since $2^k+2^k=2^{k+1}$ for any $k$), so $N=2^b-1$.
</s>