Fermat's Little Theorem & Primality Testing Interactive Visualizer
Fermat's Little Theorem states that a^(p-1) ≡ 1 (mod p) for prime p and gcd(a, p) = 1, powering O(log p) modular inverses, huge exponent reduction, and probabilistic primality tests like Miller–Rabin.
Study Fermat's Little Theorem & Primality Testing Explanation · View Multi-Language Code · All Algorithms