Prove the following equation by counting the non-empty subsets of $\{1,2,\ldots,n\}$ in $2$ different ways:
$1+2+2^2+2^3\ldots+2^{n-1}=2^n-1$.
Let $A=\{1,2\ldots,n\}$. I know from theory that it has $2^n-1$ non-empty subsets, which is the right-hand side of the equation but, how do count the left one?
I've proven it using induction but how can i get to the first part of the equation by counting subsets differently?
For the LHS we need to sum
that is by binomial theorem $\sum_{k=0}^{n} \binom{n}{k}a^kb^{n-k}=(a+b)^n$
$$\sum_{k=1}^{n} \binom{n}{k} =\sum_{k=0}^{n} \binom{n}{k} -\binom{n}{0}=(1+1)^n-1=2^n-1$$
By direct check note that
$$1+2+2^2+\dots+2^{n-1}=(2-1)(1+2+2^2+\dots+2^{n-1} )=$$$$=2(1+2+2^2+\dots+2^{n-1})-1(1+2+2^2+\dots+2^{n-1})=$$ $$=2+2^2+\dots+2^{n}-1-2-2^2-\dots-2^{n-1}=2^n-1$$
Note that
$$1+2+2^2+\dots+2^{n-1}=(2-1)(1+2+2^2+\dots+2^{n-1} )=$$$$=2(1+2+2^2+\dots+2^{n-1})-1(1+2+2^2+\dots+2^{n-1})=$$ $$=2+2^2+\dots+2^{n}-1-2-2^2-\dots-2^{n-1}=2^n-1$$