p is a prime, a be any integer, a≡0(modp) We have ap−1≡1(modp) Example 32018(mod17)=3126∗16+2=32=9 It is a special case for Euler phi