Concepts2
∑MathIntermediate
Fermat's Little Theorem
Fermat's Little Theorem says that for a prime p and integer a not divisible by p, a^{p-1} ≡ 1 (mod p).
#fermat's little theorem#modular inverse#binary exponentiation+11
∑MathIntermediate
Fast Exponentiation
Fast exponentiation (binary exponentiation) computes a^n using repeated squaring in O(log n) multiplications.
#binary exponentiation#fast power#modular exponentiation+11