<s>[INST] How do you derive the following two summations? 

I tried using the geometric series formula, $$ \sum_{n=0}^{k-1} ar^{n}=a\left (\frac{1-r^{n}}{1-r} \right ) $$, but I got $1-2\left ( \frac{1}{2}^{n-1} \right )$ for the first one and $2-2\left ( \frac{1}{2}^{n-1} \right )$ for the second.
Edit: I derived the first answer by doing $1\cdot \frac{1-\left (\frac{1}{2}\right)^{n-1}}{1-\frac{1}{2}}$, which results in $2\cdot\left(1-\left (\frac{1}{2}\right)^{n-1} \right)$ = $2-2\left (\frac{1}{2}\right)^{n-1}$. Since it starts out as n=1, I did $2-2\left (\frac{1}{2}\right)^{n-1}-1$, so the final answer I got is $1-2\left ( \frac{1}{2}^{n-1} \right )$
 [/INST] Your calculations are correct.   You just got which problems you were addressing muddled up.
Notice that  $\sum\limits_{k=0}^{n-1}2^{-k} = \dfrac{1-2^{-n}}{1-2^{-1}} = (2-2^{n-1})$ answers the second problem, not the first.
And likewise $\sum\limits_{k=1}^{n-1}2^{-k} = \sum\limits_{k=0}^{n-1}2^{-k} -1 = (1-2^{n-1})$ answers the first problem, not the second.
</s>