<s>[INST] Chinese Remainder Theorem $\ x\equiv m_k-2\pmod{m_k}$ I am trying to find all integers that give remainders 1,2,3 when divided by 3,4,5 respectively.  So I start defining 
$$a_1=1, a_2=2, a_3=3,$$$$ m_1=3, m_2=4, m_3=5,$$$$ m_1m_2=12, m_1m_3=15, m_2m_3=20,$$$$ m=60$$
All the moduli are pairwise coprime, so by the Euclidean Algorithm
$$12x+5y=1\Rightarrow x=-2, y=5.$$
$$15x+4y=1\Rightarrow x=-1, y=4.$$
$$20x+3y=1\Rightarrow x=-1, y=7.$$
Therefor a solution should be 
$$20\cdot(-2)\cdot1 +15\cdot (-1)\cdot 2+12\cdot (-1)\cdot 3=-40-30-36=-106$$
But under mod 60, this implies a solutions should be of the form, $60t+14$.  But it is not.  THis is not right.  Why did this technique not work?
 [/INST] Another, more direct way of solving this runs as follows. You are looking at
$$x \equiv 1 \text{ mod } 3$$
$$x \equiv 2 \text{ mod } 4$$
$$x \equiv 3 \text{ mod } 5.$$
Now put $x=1+3k$ and mod this by $4$. Then $2\equiv 1 +3k \text{ mod } 4$, so $k\equiv -1 \text{ mod } 4$, say $k=4l-1$, hence $x=-2+12l$. Now take the third equation into account. Then $3 = -2+12l\text{ mod } 5$, which is equivalent to $l \equiv 0 \text{ mod } 5$, say $l=5m$. So, finally $x=-2+60m$, whence $x\equiv -2\equiv58 \text{ mod } 60$.
</s>