Groups
Category
Level
Fermat's Little Theorem says that for a prime p and integer a not divisible by p, a^{p-1} ≡ 1 (mod p).
Fast exponentiation (binary exponentiation) computes a^n using repeated squaring in O(log n) multiplications.
Matrix exponentiation turns repeated linear transitions into a single fast power of a matrix using exponentiation by squaring.