I have to calculate $19^{93}\equiv x\pmod {162}$.
All I can do is this,by using Euler's Theorem:-
$19^{\phi(162)}\equiv1\pmod{162}$
So,$19^{54}\equiv1\pmod{162}$
Now,I have no idea how to reach power of $93$ from $54$.Because the next number which will give the same remainder is $19^{108}$.
How do I solve it?Someone told me Ramanujan's Congruences Equations may be useful but I have no idea why he said this.
Thanks for any help!