When a matrix $A$ is diagonalizble, i.e. $A = P \Lambda P^{-1}$, then it is very easy to compute $A^i$: it is just $P \Lambda^i P^{-1}$ where $\Lambda^i$ is the diagonal matrices with the eigenvalues exponentiated.
I have an upper triangular matrix where the diagonal is all 0s (this means that all the eigenvalues are 0). I would expect somehow to be able to do something similar to the exponentiation of $A$ above, but that's not possible because such upper triangular matrix is not diagonalizible. Is there another efficient way of computing the power of an upper triangular matrix with all 0s on the diagonal?