Summation of powers

I have come across the following in my textbook:

$$\sum_{i=0}^{20} 5^i = \frac{5^{21}-1} {4}$$

There is no explanation of how this result was achieved. Could anyone help walk-through how this would be calculated?

It is a general fact that, for any number $x\neq 1$, $$\sum_{i=0}^nx^i=\frac{x^{n+1}-1}{x-1}$$ (See the Wikipedia page on geometric progressions.)
You can see this is true by expanding out the product \begin{align*} (x-1)\sum_{i=0}^nx^i&=(x-1)(x^n+x^{n-1}+\cdots+x+1)\\ &=\begin{split} x^{n+1}+x^n+\cdots+x^2+x\\ \quad-x^n -x^{n-1}-\cdots-x-1 \end{split}\\\\ &=x^{n+1}-1 \end{align*}
Something like this: multiply your sum, whose value $S$ you want to find $$S=\sum_{i=0}^{20} 5^i = 1 + 5 + 5^2 + \cdots + 5^{20}$$ by $5$, so each term gets multiplied by $5$ $$5 + 5^2 + 5^2 + \cdots + 5^{21}$$ This equals of course $5S$. Notice that it differs a bit from $S$ : the first term $1$ gets dropped, but then a new term $5^{21}$ appears at the end. So this also must be $S - 1 + 5^{21}$. Oh, you did not get $S$ yet, but you surely have an equation for $S$: $$5S = S-1 + 5^{21}$$ Think you can solve that?