<s>[INST] Proof by induction (exponents) 
Use proof by induction and show that the formula holds for all positive integers:$$1+3+3^2+\dots+3^{n-1}=\frac{3^n -1}2$$

The confusing step in my opinion is the first expression: $3^{n-1}$, when I have to show for $k+1$. Any solutions?
 [/INST] For the base case simply show that the premise is true for the smallest positive integer: $\mathsf P(1)$.
For the iterative case, you have to show that if the premise holds for $n$, then it is implied to hold for $n+1$.   $\mathsf P(n)\implies\mathsf P(n+1)$
Do that by substituting $n+1$ for $n$ and demonstrate that the left and right hand side both contain terms of the original premise and the same modifier.
Here we show that modifier is the addition of $3^n$.
$\begin{align}
\text{Prove }\forall n\in \mathbb Z^+: \sum_{k=0}^{n-1} 3^k & = \frac {3^n-1}{2} & \text{premise }
\\[3ex]
3^0 & = \frac{3^1-1}{2} & \text{base case} 
\\[3ex]
 3^n + \sum_{k=0}^{n-1} 3^k & = \sum_{k=0}^{n} 3^k 
\\[1ex] 3^n+\frac {3^n-1}{2} & = \frac{3\cdot 3^n-1}{2} 
\\[2ex] \therefore 
\sum_{k=0}^{n-1} 3^k & = \frac {3^n-1}{2} \implies  \sum_{k=0}^{n} 3^k = \frac{3^{n+1}-1}{2} &\text{iterative step }
\\[2ex]\therefore \forall n\in\mathbb Z^+: \sum_{k=0}^{n-1} 3^k & = \frac {3^n-1}{2} & \text{by induction}
\end{align}$
</s>