I have an exercise problem and I do not know why your answer is like that.

$$ sum_ {i = 1} ^ { lg n} 2 ^ {i-1} in Theta (2 ^ { lg n}) = Theta (n). $$

Regarding this equation, I think it would be,

$$ sum_ {i = 1} ^ { lg n} 2 ^ {i-1} in Theta ( lg n cdot 2 ^ { lg n}) = Theta ( lg n cdot n ), $$

with the test,

$$ sum_ {i = 1} ^ {g (n)} f (i) le sum_ {i = 1} ^ {g (n)} f (g (n)) = g (n) cdot f (g (n)). $$

My thinking with this question, $ f (n) = 2 ^ {i-1} $ Y $ g (n) = lg n $. Then the result would be $ lg n cdot 2 ^ { lg n – 1} $.

Can someone indicate where I made an error? (I'm not asking about my rating, but tell me where I think wrong)