Though the other answers are correct, I figured that if you only know about the sum $1 + 2 + 2^2 + \cdots + 2^{n - 1}$, it is probably the best to write more details and avoid symbols whenever possible. Here is a proof that you can take a look at. Let's denote your sum as $S = 1 + 3 + 3^2 + \cdots + 3^{n - 1}$. Then you want to find $S$ (duh). Now since it is a geometric series, if you multiply $S$ by $3$, you will get
$$
3S = 3 \times 1 + 3 \times 3 + 3 \times 3^2 + \cdots + 3 \times 3^{n - 1} = 3 + 3^2 + 3^3 + \cdots + 3^n
$$
It might not be obvious how this is useful. However, let's compare $3S$ and the original series $S$ as follows:
$$
\begin{array}{lll}
& &3S &= & & &3 &+ &3^2 &+ &3^3 &+ &\cdots &+ &3^{n - 1} &+ &3^n \\
&- &S &= &1 &+ &3 &+ &3^2 &+ &3^3 &+ &\cdots &+ &3^{n - 1} \\
\hline \\
& &2S &= &-1 &&&&&&&&&&&+ &3^n
\end{array}
$$
Where the middle terms all cancel out because you are subtracting! Looking at the last row, we simply get
$$
2S = 3^n - 1
$$
Which of course means that
$$
S = \frac{3^n - 1}{2}
$$
As other suggested. I highly encourage you to copy this proof but replacing $3$ with $5$, or if you are comfortable enough, to replace $3$ by $x$.