How to compute $75^{75^{75}}$ modulo $32$?
I tried:
It's $\mathrm{gcd}(75,32)=1$, so with Euler's phi function I get
$\varphi(32)=32(1-\frac{1}{2})=16$.
Then it's $75^{16}\equiv1 \ (\mathrm{mod} \ 32)$.
So I computed $75^{75}$ modulo $16$:
It's $\varphi(16)=16(1-\frac{1}{2})=8$
So $75^{75}\equiv 1 \ (\mathrm{mod} \ 8)$ and $75^{75^{75}} \equiv 1 \ (\mathrm{mod} \ 8)$
Then it's $75^{75^{75}}\equiv 75^1 \equiv 75 \ (\mathrm{mod} \ 32)$.
I'm not sure if this is correct. Is there something wrong in this calculation or can it be done like this?