Fermat's Little Theorem.
Theorem. Let G be a finite group of order m=∣G∣. Then for any g∈G, it holds that gm=1.
Proof. G={g1,g2,...,gm}, g∈G. gi=gj for all i,j, therefore ggi=ggj for all i,j. With the closure property of the group G, {gg1,gg2,...ggm} is a permutation of {g1,g2,...,gm}. Then we have (gg1)(gg2)...(ggm)=g1g2...gm, which could be reduced to gm=1.
We could see the similarity between the proof of Fermat's little theorem and Euler's theorem. In fact, Fermat's little theorem is the general form of Euler's theorem. Let G be the modulo multiplication group (Z/n)∗, one could derive the Euler's theorem.
Corollary 1
Corollary (Fermat's Little Theorem). Let G be a finite group of order m. Then for any g∈G, and any integer x, we have gx=g[xmodm].
Many exponents calculation could be simplified using this corollary.
For example, if computing 51000mod11, we could see 5∈(Z/11)∗ since gcd(5,11)=1. Therefore 51000mod11=5[1000modφ(11)]mod11=5[1000mod10]mod11=1.
Corollary 2
Corollary (Fermat's Little Theorem). Let G be a finite group of order m. Let e>0 be an integer, and define the function, fe:G→G by fe(g)=ge.
- If gcd(e,m)=1, then fe is a permutation, i.e., a bijection.
- Moreover, if d=e−1modm, then fd is the inverse of fe.
Eureka moment!
注意,我们这里介绍的是费马小定理的群论表述;事实上,其拥有一个更为广为人知的数学表述。对于任意整数 a, 质数 p,有 ap≡a(modp)。
当 gcd(a,p)=1 时,我们能够由此推导出欧拉定理。
当 gcd(a,p)=1 时,由于 p 是质数,a 一定是 p 的倍数 p∣a. 那么显然此时 ap≡a≡0(modp).