I'm trying to do some questions on the Chinese remainder theorem, I've being reading the Wikipedia explanation but I still don't get it. Can someone explain it to me, please?
Here is the question I'm working with. If you have a simpler example, that would be great.
Find an integer $x$ such that $x\equiv2\bmod5$, $x\equiv1\bmod13$ and $x\equiv5\bmod17$.
It's easier than usual because an evident constant-case optimization of CRT exists. Notice that $\rm\ x \equiv 1\equiv \color{#0a0}{-12}\:\ (mod\ 13),\:$ and $\rm\:x\equiv 5\equiv \color{#0a0}{-12}\ \: (mod\ 17),\:$ so $\rm\:13,17\mid x\!+\!\color{#0a0}{12},\:$ so $\rm\:13\cdot 17\mid x\!+\!\color{}{12},\:$ by $\rm\:lcm(13,17)= 13\cdot 17.\:$ So $\rm\: x = -12 + 13(17 j)\:$ for some integer $\rm\:j.\:$ Hence, applying CRT $\rm mod\ \color{blue}5\!:\: 2 \equiv x \equiv -12\! +\! 13(17j)\equiv -2\! +\! j\Rightarrow j\equiv \color{#c00}{ 4},\,$ so $\rm\,x\equiv -12\! +\! 13(17(\color{#c00}4\!+\!\color{blue} 5i)\!)\!\equiv 872\!+\!1105i$