I know that $\quad\sum2^n = 2 (2^n-1)$
How can we derive this summation? And also how can we deduce the summation of $3^n$ from this ?
I did observe this pattern :
$$ \begin{align} n &= 1 ;\ sum = 2 = 4-2 \\ n &= 2 ;\ sum = 6 = 8-2 \\ n &= 3 ;\ sum = 14 = 16-2 \\ n &= 4 ;\ sum = 30 = 32-2 \\ n &= 5 ;\ sum = 62 = 64-2 \end{align} $$
From this we can easily conclude the formula by observation. But is this correct way to derive it? It is just an observation. How do we actually derive it? Many thanks.
EDIT
There is no obvious pattern for $\sum 3^n$
$$\text{Consider }S = \sum_{i=0}^N r^i$$ $$(1 - r)S = \big(1 + r + r^2 + \ ... \ + r^N\big) - \big(r + r^2 + ... + r^{N+1}\big) = 1 - r^{N+1}$$
So $$S = \frac{1 - r^{N+1}}{1 - r} = \frac{r^{N+1} - 1}{r - 1}$$ In the case of $3$, $S_3 = \frac{1}{2}(3^{N+1} - 1)$