I need help finding a closed form of this finite sum. I'm not sure how to deal with sums that include division in it.
$$\sum_{i=1}^n \frac{2^i}{2^n}$$
Here's one of the attempts I made and it turned out to be wrong:
$$\frac{1}{2^n}\sum_{i=1}^n {2^i} = \frac{1}{2^n} (2^{n +1} - 1) = \frac{2^{n + 1} - 1} {2^n}$$
And then from there, simplifying it ended up with just a constant.
I also tried it in which I moved $2^{-n}$ to the outside of the sigma notation and went from there:
$$2^{-n}\sum_{i=1}^n {2^i} = 2^{-n} (2^{n +1} - 1) = 2 - 2^{-n}$$
I plugged the equation in to Wolfram Alpha to check my answers. It gave me $2 - 2^{1-n}$, which is close to what I got in that second method. I need help finding the error in my math. I keep looking over it and I guess I'm just not seeing something.