how do you write the closed form of a sum of the geometric progression of 3^n? Our teacher told us that $2^0+2^1.... 2^n$ is equal to $2^{n+1}-1$ but I am not sure how to apply that to a similar scenario where $3^0+3^1.... 3^n$. I tried $3^{n+1}-1$ but that is not correct. What is the correct way to figure it?
Edit: I know that the summation is $$\sum_{k=0}^{n} 3^k$$ I am looking for a closed form solution.
In general, we have $$1+x+...+x^n=\frac{1-x^{n+1}}{1-x}$$
You can prove it by Induction as follows- $$1+x+...+x^n+x^{n+1}=\frac{1-x^{n+1}}{1-x}+x^{n+1}=\frac{1-x^{n+2}}{1-x}$$
On second thought, since you have asked the correct way to figure it, one should probably exhibit that the terms cancel out and you get $$(1+x+...+x^n)(1-x)=1-x^{n+1}$$