<s>[INST] 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)$
 [/INST] Hint $\ \ \begin{align}478\ \  &\equiv 1,2,-3\,\bmod 3,7,13\\ \Rightarrow\, 478^{\large\color{#0b0}3}&\equiv 1,1,\color{#c00}{{-}1}\,  \bmod 3,7,13\end{align}\ $ and $\ \ \color{#c00}2\cdot \color{#0b0}{3\ }\mid 870$
Remark $ $ The idea is that $\,6 = \color{#c00}2\cdot \color{#0b0}{3\ }$ is a common multiple of the orders of $a=478$ mod $\,3,7,13$  therefore $\,a^6\equiv 1$ for each modulus, hence also modulo their lcm = product $= 273$, i.e. $\,3,7,13\mid a^6-1\,\Rightarrow\, 273\mid a^6-1,\,$  This is the idea behind the Carmichael approach in lhf's answer, but it uses Euler's $\,\phi(m)\,$ as its multiple of the order $\!\bmod m$
</s>