<s>[INST] A $3\times 3$ matrix to the power of $n$. I can't find a formula for :
$$
        A =\begin{pmatrix}
        1 & 1 & 0 \\
        0 & 2 & 1 \\
        0 & 0 & 3 \\
        \end{pmatrix}^n
$$
I tried to separate $A = I + J$ with $J$ nilpotent but I didn't success.
Can you give me a hint?
Thanks.
 [/INST] You ask for a hint...
$A^2 = 
\begin{pmatrix}
1 & 3 & 1 \\
0 & 4 & 5 \\
0 & 0 & 9 \end{pmatrix}$
$A^3 = 
\begin{pmatrix}
1 & 7 & 6 \\
0 & 8 & 19 \\
0 & 0 & 27 \end{pmatrix}$
$A^4 = 
\begin{pmatrix}
1 & 15 & 25 \\
0 & 16 & 65 \\
0 & 0 & 81 \end{pmatrix}$
$A^5 = 
\begin{pmatrix}
1 & 31 & 90 \\
0 & 32 & 211 \\
0 & 0 & 243 \end{pmatrix}$
Diagonal elements are easy, other elements are fairly obvious...
</s>