How would I prove the following by induction?$$1+3+3^2+3^3+\cdots+3^n=\frac{3^{n+1}-1}{2}$$ for all $n\geq 0.$
I kept trying to create a base case but I am not sure how many I need. I also seem to be carrying out the steps incorrectly.
If anyone knows how I can proceed with the following problem, I would greatly appreciate your assistance!
We start the induction with n=0.
It is $3^0=1=\frac{3^{0+1}-1}{2}=\frac{3-1}{2}=1\checkmark$.
Inductive claim:
For arbitrary $n\in\mathbb{N}$ holds $\sum_{k=0}^n 3^k=\frac{3^{n+1}-1}{2}$
Inductive step:
$n\mapsto n+1$
$\sum_{k=0}^{n+1} 3^k=\sum_{k=0}^{n} 3^k+3^{n+1}\stackrel{I.c}{=}\frac{3^{n+1}-1}{2}+3^{n+1}=\frac{3^{n+1}-1+2\cdot 3^{n+1}}{2}=\frac{3\cdot 3^{n+1}-1}{2}=\frac{3^{n+2}-1}{2}\checkmark$
And we are done.