I want to calculate $24^{6^{2015}}$ mod 35. I found its answer and its correct, but I am not sure if I found it right. It equals 1 mod 35. Here is my calculation:
It follows from Euler theorem: $24^{\phi(35)}$ = 1 mod 35.
$$ \phi(35) = \phi(7)\phi(5) = 6*4 = 24 $$ Thus we want to know $6^{2015}$ mod 24. Now I use Chinese remainder theorem:
($6^{2015}$ mod 24) $\rightarrow$ ($6^{2015}$ mod 8, $6^{2015}$ mod 3)
This gives
($6^{2015}$ mod 8, $0^{2015}$ mod 3) $\rightarrow$ ($6^{2015}$ mod 2, $6^{2015}$ mod 2, $6^{2015}$ mod 2, $0^{2015}$ mod 3)
This gives
($0^{2015}$ mod 2, $0^{2015}$ mod 3)
Now I am not sure if it follows from this that $6^{2015}$ mod 24 = 1 mod 24.
Does this calculation work?
Thank you,
V.