$$\sum_{i=1}^n \frac{2i-1}{2^i} = 3 - \frac{2i+3}{2^i}$$
This equation has been giving me a lot of trouble, and I don't know what I am doing wrong for this question. I'm trying to get this: $$ 3 - \frac{2(k+1)+3}{2^{k+1}}$$
Here is my work:
$$\sum_{i=1}^k \frac{2i-1}{2^i}+\frac{2(k+1)-1}{2^{k+1}}$$
$$3 - \frac{2k+3}{2^k} + \frac{2(k+1)-1}{2^{k+1}}$$
$$ 3 - \frac{(2k+3)(2^{k+1})+(2(k+1)-1)(2^k)}{(2^k)(2^{k+1})}$$
$$ 3 - \frac{(2k+3)(2^{k})(2)+(2(k+1)-1)(2^k)}{(2^k)(2^{k})(2)}$$
Of course, I've tried other methods, but this is the farthest I've gotten. The base case checks out, and I know that this works out, but I just don't know where I've gone wrong. Can anyone tell me what I'm not doing? (This is for all values greater than or equal to 1 and Try not to reveal the answer, please.)