What is the best way to calculate sum of matrices such as A^i + A^(i+1) + A^i+2........A^n for very large n?
I have thought of two possible ways:
1) Use logarithmic matrix exponentiation(LME) for A^i, then calculate the subsequent matrices by multiplying by A.
Problem: Doesn't really take advantage of the LME algorithm as i am using it only for the lowest power!!
2)Use LME for finding A^n and memoize the intermediate calculations.
Problem: Too much space required for large n.
Is there a third way?