Matrix Exponentiation, Number Theory.