If \( A = \begin{pmatrix}
1 & 1 & 1 \\
0 & 1 & 1 \\
0 & 0 & 1
\end{pmatrix} \) and
\( M = A + A^2 + A^3 + \cdots + A^{20} \),
then the sum of all the elements of the matrix \( M \) is equal to ________.
Show Hint
For matrices of the form $I+B$ where B is nilpotent (i.e., $B^k=O$ for some k), the binomial theorem $(I+B)^n = I + nB + \frac{n(n-1)}{2}B^2 + .......$ becomes a finite sum and is a powerful tool for finding powers of the matrix.