<s>[INST] How to apply CRT to a congruence system with moduli not coprime? $x=1 \pmod 8$
$x=5 \pmod{12}$
8 and 12 are not coprime, I could break it to:
$x=1 \pmod 2$
$x=1 \pmod 4$
and 
$x=5 \pmod 3$
$x=5 \pmod 4$
But what are the next steps to solve it? By the way, $x$ should be $17$ not sure how to get that number ...
Thanks in advance.
 [/INST] No point in figuring it out to any lesser power of $2$ than $2^3$. 
Leave it at $x\equiv 1 \pmod 8$ but $x \equiv 5 \pmod {12}$ can be reduced to $x\equiv 5 \equiv 2 \pmod 3$.
So CRT says there is a unique solution $\pmod {28}$; $x \equiv 17 \pmod{24}$.
$x = A \pmod {n_1}$ $(A = 1; n_1 = 8)$
$x = B \pmod {n_2}$ $(B = 2; n_2 = 3)$
$m_1n_1 + m_2n_2 = 1$ (in this case $8m_1 + 3m_2 = 1$ so $m_1 =2; B=-5$ or $A=-1; B=3$ or .....)
Then $x = Am_2n_2 + Bn_1n_1\pmod {n_1n_2}$.
$x = 1*(-5)*3 + 2*2*8= -15+32 = 17$.
There's utterly no point in reducing to $x \equiv 5 \pmod 4$ and $x \equiv 5\pmod 3$ as that will just get you back to $x\equiv 2,5,8,11 \pmod {12}$ and $x \equiv 1,5 \pmod 8$ which is worse than what you started with.
</s>