Find the smallest positive integer $X$ such that $478^{870} \equiv X \ (\text{mod} \ 273)$ Appreciate if one could advise if my solution is correct. Here is my attempt of the problem: 
Since $(273, 478) =1,$ by Euler's theorem, $478^{\phi(273)}=478^{144} \equiv 1 \ \ (\text{mod} \ 273) \implies 478^{864} \equiv 1 \ \ (\text{mod} \ 273).$ 
Next, $478^{2} \equiv 22 \ \ (\text{mod} \ 39) \implies 478^{6} \equiv 22^{3} \equiv 1 \  \ (\text{mod} \ 39)$ and $478^{\phi(7)} = 478^{6} \equiv 1 \ \ (\text{mod} \ 7) $
Hence, $478^{6} \equiv 1 \ \ (\text{mod} \ 273)$ and $478^{864+6}= 478^{870} \equiv 1 \ \ (\text{mod} \ 273)$

Recall Carmichael's theorem: $a^{\lambda(m)} \equiv 1 \bmod m$ for all $a$ coprime with $m$.
Now $\lambda(273)=lcm(\phi(3),\phi(7),\phi(13))=lcm(2,6,12)=12$ and $870 \equiv 6 \bmod 12$.
Therefore
$
478^{870} \equiv 205^{6} \equiv (-68)^{6} \equiv 4^6 \cdot 17^6 \equiv 1 \bmod 273
$.
