$x = (5^2 \bmod 6)^4 \bmod 15$.
I wanted to turn $(5^2 \bmod 6)^4 \bmod 15$ into a constant, but I just lost hope when I saw how humongous the expression was.
$x = (5^2 \bmod 6)^4 \bmod 15$.
I wanted to turn $(5^2 \bmod 6)^4 \bmod 15$ into a constant, but I just lost hope when I saw how humongous the expression was.
$\begin{eqnarray} && (5^2 \bmod 6)^4 \bmod 15 \\ &=& (25 \bmod 6)^4 \bmod 15 \\ &=& (19 \bmod 6)^4 \bmod 15 \\ &=& (13 \bmod 6)^4 \bmod 15 \\ &=& (7 \bmod 6)^4 \bmod 15 \\ &=& (1 \bmod 6)^4 \bmod 15 \\ &=& 1^4 \bmod 15 \\ &=& 1 \bmod 15 \\ &=& 1 \end{eqnarray}$
You can actually just directly compute $5^2 = 25$.
Now we have $(25 \bmod 6)^4 \bmod 15 = 1^4 \bmod 15 = 1 \bmod 15$