In number theory Fermat's Little theorem states that for every prime p and its coprime a holds that:

 a^{p-1} = 1 \\;\\;  in \\;\\; Z_{p}

Proof of Fermat's little theorem

Fermat's Little theorem is a special case of Euler's theorem, which has been proven (see the proof).


Example

Calculate 7^{35} in Z_{17}.

gcd(7, 17) = 1
7^{35} = 7^{16} \\cdot 7^{16} \\cdot 7^{3} = 1 \\cdot 1 \\cdot 7^{2} \\cdot 7 = 49 \\cdot 7 = -2 \\cdot 7 = -14 = 3 \\;\\; in \\;\\; Z_{17}







       
 

Place for your banner

Here is the position ready for our customer's banners.