Difficulty Finding $A^k$ 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?

You have written $A=I+N$, and you know that $N^3$ (and hence all higher powers) are zero.  If $X$ and $Y$ are two matrices that commute with each other, then you can still use the bionomial theorem:
$$(X+Y)^n=\sum_{i+j=n}\binom{n}{i} X^i Y^j$$
Because $I$ commutes with $N$, and because all the higher powers of $N$ vanish, we can apply the formula to get 
$$(I+N)^n=\sum_{i+j=n}\binom{n}{j} N^j=I+nN+\binom{n}{2}N^2$$
