Why not just diagonalize the matrix to make multiplication cheap.
edit:
While the matrix is ββnonsingular, you should be able to find a diagonal representation D of the matrix A such that A = PDP ^ -1, where P is composed of eigenvectors A and D has eigenvalues ββA along the diagonal. Getting D ^ m = D * D ^ (m-1) is cheap, because you only multiply it diagonally (i.e. as many times as many dimensions of the matrix)
Getting S (m) = S (m-1) + D ^ m is also cheap, because you add only diagonal elements.
Then you have
A ^ i + A ^ (i + 1) + A ^ i + 2 ........ A ^ n = P (D ^ i + D ^ (i + 1) + D ^ i + 2 .. ...... D ^ n) P ^ -1 = P (S (n) - S (i)) P ^ -1
The only difficult task is to find P and P ^ -1
source share