I don't know how to calculate the following modulo: $$321^{654} \mod 1013$$
Are there some easy way to do this?
I don't know how to calculate the following modulo: $$321^{654} \mod 1013$$
Are there some easy way to do this?
Working in the prime field $\Bbb F_{1013}$ we can use equalities.
There are several ways to solve according the easier we can. For example
$$321^{654}=(321^{109})^6$$ so from $321^{10}=52$ we have $$321^{100}=52^{10}=781\Rightarrow321^{109}=781\cdot(321)^9=185\cdot1013+35$$ It follows $$321^{654}=35^6=\color{red}{863}$$