Let $A= \begin{bmatrix} 1& -1 & 1\\ 0 & 1 & 1 \\ 0 & 0 & 1\\ \end{bmatrix}$. Compute $A^k$.
My attempt
I'm trying to compute $A^k$ using this approach as follows: $$ A=I+N= \begin{bmatrix} 1& 0 & 0\\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}+ \begin{bmatrix} 0& -1 & 1\\ 0 & 0 & 1 \\ 0 & 0 & 0\\ \end{bmatrix} $$ with $$ N^2= \begin{bmatrix} 0& 0 & -1\\ 0 & 0 & 0 \\ 0 & 0 & 0\\ \end{bmatrix}, \, \text{and} \, \, N^3= \begin{bmatrix} 0& 0 & 0\\ 0 & 0 & 0 \\ 0 & 0 & 0\\ \end{bmatrix} $$
Then, $$ A^2=(I+N)^2=I+2N+N^2, \\ A^3=(I+N)^3=I+3N+3N^2, \\ A^4=(I+N)^4=I+4N+6N^2, \\ A^5=(I+N)^5=I+5N+10N^2, \\ A^6=(I+N)^5=I+6N+15N^2, $$
By induction, we can see $A^k=(I+N)^k=I+kN+f[k]N^2$. But, I couldn't figure out what $f[k]$ is. Any help?