Fermat's little theorem
mathematical theorem that, for any prime 𝑝, the 𝑝th power of any integer 𝑛 is congruent to 𝑛 modulo 𝑝
Fermat's little theorem is a theorem from number theory. It is named after Pierre de Fermat who found it in the 17th century. It is about the properties of primes. It says that if a is a number, and p is a prime number, then in the notation of modular Arithmetic, it can be expressed as,
If a is not a multiple of p, then the following is often used: