Calculate: $27^{162} \pmod {41}$
So we need to calculate x which is a remainder of $$\frac{27^{162}}{41}$$
$27 = 3^3$ so we can write such equation: $$3^{486} = 41k + x$$ or $$3^{3 \times 162} = 41k + x$$ where x is a reminder.
But what do I do next to calculate this without using calculator(or using simple one)?