I would like to evaluate the sum of the following geometric progression
$1 -2 + 2^{2} - 2^{3} + ...+(-1)^{n}2^{n}$
Would the following proposed solution be on the right lines?
$a = 1$ (Being the first term)
$r = -2$ (Being the common ratio)
$n = n + 1$ (The number of terms we want to consider in this case)
The formula to evaluate the sum of a geometric progression being:
$$\frac{1 - r^n}{1 - r}.$$
Therefore, plugging in the values above
$$\frac{1 - (-2)^{n+1}}{3}.$$
Thanks