Compute large powers a^m mod p; p prime

49 Views Asked by At

Please advise on a short cut on how to solve $$7^{3216645} \pmod {17}$$ by hand.

So far I thought of using method of squaring and fast exponentiation (converting to binary form...) but these methods seem to be long.

Thank you!