Below two propositions are in equivalence relationFor any integer aaa, when ppp is prime numberap≡amod pa^p \equiv a\mod{p}ap≡amodpIf integer aaa is not divisible by prime number pppap−1≡1mod pa^{p-1} \equiv 1 \mod pap−1≡1modp Fermat's little theoremIn number theory, Fermat's little theorem states that if p is a prime number, then for any integer a, the number ap − a is an integer multiple of p. In the notation of modular arithmetic, this is expressed ashttps://en.wikipedia.org/wiki/Fermat's_little_theorem