If gcd(a,n) = 1, then a^φ(n) ≡ 1 (mod n), where φ(n) is Euler's totient (count of integers 1..n−1 coprime to n). Generalizes Fermat's Little Theorem.. The key formula is a^φ(n) ≡ 1 (mod n) when gcd(a,n)=1. This concept is typically introduced in College. Understanding this concept builds a strong foundation for more advanced mathematics.