<s>[INST] System of congurences and the Chinese Remainder Theorem I have the following system of congruences:
\begin{align*}
  x &\equiv 1 \pmod{3} \\
  x &\equiv 4 \pmod{5} \\
  x &\equiv 6 \pmod{7}
\end{align*}
I tried solving this using the Chinese remainder theorem as follows:
We have that $N = 3 \cdot 5 \cdot 7 = 105$ and $N_1=35, N_2=21, N_3=15$.
From this, we get the following
\begin{align*}
  35x_1 &\equiv 1 \pmod{3} \\
  21x_2 &\equiv 1 \pmod{5} \\
  15x_3 &\equiv 1 \pmod{7}
\end{align*}
and this will result in
\begin{align*}
  2x_1 &\equiv 1 \pmod{3} \\
  x_2 &\equiv 1 \pmod{5} \\
  x_3 &\equiv 1 \pmod{7}
\end{align*}
so from CRT $x =x_1N_1b_1 + x_2N_2b_2 + x_3N_3b_3 = 2 \cdot 35 \cdot3 + 1 \cdot 21 \cdot 5 + 1 \cdot 15 \cdot7 = 420 $.
However $420$ doesn't seem to satisfy the given system, what would be the problem here?
 [/INST] Here's how I would solve this particular system.
$  x \equiv 4 \pmod{5}$ and $x \equiv 6 \pmod{7}$ means $x\equiv-1\pmod5$ and $x\equiv-1\pmod7$,
which means $x\equiv-1\pmod{35}$, i.e.,  $x\equiv34\pmod{35}$,
which means $x\equiv34, 69$, or $104\pmod{105}$.
By the Chinese remainder theorem, only one of these satisfies   $x\equiv1\pmod3$.
</s>