1. ## Least Residue!

Can someone pls help me with this question????

Find the least residue of 789^3217 modulo the prime 1607.

2. Remember Fermat's Little Theorem, if $p$ is prime and $a$ a natural number then $a^p\equiv{a}(\bmod.{p})$

For our case: $789^{1607}\equiv{789}(\bmod.{1607})$

Squaring: $789^{3214}\equiv{789^2}(\bmod.{1607})$

And: $789^{3217}\equiv{789^5}\equiv{772}(\bmod.{1607})$

3. ## How did you get the 789^5?

HEy Thanks!

I'm just not sure how you got the 789^5.