<s>[INST] Find an integer having the remainders $2,3,4,5$ when divided by $3,4,5,6$, respectively. 
Find an integer having the remainders $2,3,4,5$ when divided by $3,4,5,6$, respectively.

My work:
We consider the congruences $x \equiv 2 \pmod 3$, $x \equiv 3 \pmod 4$, $x \equiv 4 \pmod 5$, $x \equiv 5 \pmod 6$. We can reduce this further to $x \equiv 2 \pmod 3$, $x \equiv 3 \pmod 4$, $x \equiv 4 \pmod 5$. We have
$N_1 = 4 \cdot 5 = 20 \implies 20 x_1 \equiv 1 \pmod{3} \implies 2x_1 \equiv 1 \pmod{3} \implies x_1 \equiv 2 \pmod {3}$
$N_2 = 3 \cdot 5 = 15 \implies 15x_2 \equiv 1 \pmod{4} \implies -x_2 \equiv 1 \pmod{4} \implies x_2 \equiv 3 \pmod {4}$ 
$N_3 = 3 \cdot 4 = 12 \implies 12 x_3 \equiv 1 \pmod{5} \implies 2x_3 \equiv 1 \pmod{5} \implies x_3 \equiv 3 \pmod {5}$
Now, 
\begin{align*}
\bar x &= a_1 N_1 x_1 + a_2 N_2 x_2 + a_3 N_3 x_3 \\
&= 3 \cdot 20 \cdot 2 + 4 \cdot 15 \cdot 3 + 5 \cdot 12 \cdot 3 \\
&= 480 \equiv 0 \pmod {3 \cdot 4 \cdot 5}
\end{align*}
Is this correct, or is something wrong in my work? I don't like how I have $0$ remainder.
 [/INST] We have
$$x \equiv 2 \pmod {3}$$
$$x \equiv 3 \pmod {4}$$
$$x \equiv 4 \pmod {5}$$
in the form $x\equiv a_i\pmod{m_i}$ and $M=m_1m_2m_3=3\cdot4\cdot5 = 60$
Then using chinese remainder theorem we have to find $b_i$ such that $b_i\dfrac{M}{m_i} = 1\pmod{m_i}$
Then
$$b_1 \cdot\frac{60}{3}\equiv 1 \pmod {3} \implies b_1 \equiv 20^{-1} \pmod {3} \implies b_1 = 2$$
$$b_2 \cdot\frac{60}{4}\equiv 1 \pmod {4} \implies b_2 \equiv 15^{-1} \pmod {4}\implies b_2 = 3$$
$$b_3 \cdot\frac{60}{5}\equiv 1 \pmod {5} \implies b_3 \equiv 12^{-1} \pmod {5}\implies b_3 = 3$$
Now 
$$x\equiv a_1b_1\frac{M}{m_1}\pmod {M}+a_2b_2\frac{M}{m_2}\pmod {M}+a_3b_3\frac{M}{m_3}\pmod {M}$$
$$\implies x\equiv 359\pmod {60}\implies x\equiv 59\pmod {60}$$
smallest such $x$ is $x=59$
</s>