<s>[INST] Dervation of $\sum_{k=0}^n(r+1)^k= \frac{(r+1)^{n+1}-1}{r}$ How can one derive the following identity?
$\sum_{k=0}^n(r+1)^k= \frac{(r+1)^{n+1}-1}{r}$
I have playing around with binomial coefficients and index shiftings but wasn't able to get anywhere.
 [/INST] For $r\neq 1$, the sum of the first n terms of a geometric series is:
$a + ar + a r^2 + a r^3 + \cdots + a r^{n-1} = \sum_{k=0}^{n-1} ar^k= a \, \frac{1-r^{n}}{1-r}$,
where a is the first term of the series, and r is the common ratio. We can derive this formula as follows:
\begin{align}
&\text{Let }s = a + ar + ar^2 + ar^3 + \cdots + ar^{n-1}. \\[4pt]
&\text{Then }rs = ar + ar^2 + ar^3 + ar^4 + \cdots + ar^{n}  \\[4pt]
&\text{Then }s - rs = a-ar^{n}  \\[4pt]
&\text{Then }s(1-r) = a(1-r^{n}),\text{ so }s = a \frac{1-r^{n}}{1-r} \quad \text{(if } r \neq 1 \text{)}.
\end{align}
As n goes to infinity, the absolute value of r must be less than one for the series to converge. The sum then becomes
$a+ar+ar^2+ar^3+ar^4+\cdots = \sum_{k=0}^\infty ar^k = \frac{a}{1-r} \Leftrightarrow |r|<1$ 
When $a = 1$, this simplifies to: $1 \,+\, r \,+\, r^2 \,+\, r^3 \,+\, \cdots \;=\; \frac{1}{1-r}$, the left-hand side being a geometric series with common ratio r. We can derive this formula:
\begin{align}
&\text{Let }s = 1 + r + r^2 + r^3 + \cdots. \\[4pt]
&\text{Then }rs = r + r^2 + r^3 + \cdots. \\[4pt]
&\text{Then }s - rs = 1,\text{ so }s(1 - r) = 1,\text{ and thus }s = \frac{1}{1-r}.
\end{align}
</s>