If $A = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{bmatrix}$ and $M = A + A^2 + A^3 + \ldots + A^{20}$, then the sum of all the elements of the matrix $M$ is equal to ______.
Numerical-value question: the answer is a number.
Show answer
The answer is 2020.
Key from source paper