Fermat's Little Theorem states that:
where p is a prime number.
Dividing both sides by a, we get:
Compare this to your question, what do you notice?
Hello, you want to solve this for :
By Fermat's Little Theorem, we are left with . Now, , and , so .
Basically, you want to simplify the difficult calculation until the remaining operations can be done mentally or easily on a calculator. It is up to you to decide whether can be calculated manually.
Note that Fermat's Little Theorem is simply one particular case of Euler's Theorem :Remember though that Fermat's little Theorem only works if p is a prime number.
iff . is the Euler totient function, that is, the quantity of numbers that are coprime with . Coincidentally, if is prime, then