I'm reviewing some of the solutions for the CLRS textbook by Cormen... For practice and I'm stuck on a recurrence embedded inside a summation.
\begin{aligned} T(n) &=1+\sum_{j=0}^{n-1} 2^{j} \\ &=1+\left(2^{n}-1\right) \\ &=2^{n} \end{aligned}
I'm not sure how they came out of the summation to obtain $ 1 + 2^n - 1$ Thanks
Ok. I see now They used the geometric series. So $$\sum_{k=0}^{n} x^{k}=\frac{x^{n+1}-1}{x-1}$$ $=1+\frac{2^n-1}{2-1}$
Then we use this and it reduces to the desired output