<s>[INST] Find the smallest number which when divided by 3, 5 and 7 leaves remainders 2, 4 and 6 respectively Find the smallest number which when divided by 3, 5 and 7 leaves remainders 2, 4 and 6 respectively
I took out the LCM and I thought 105 would be the answer but answer is 104. Can anyone please explain the approch behind solving this question. I will be very grateful
 [/INST] From Euclid's Algorithm we have $\color{blue}{2 \times 5} - \color{red}{3 \times 3}=1$ showing that $3$ & $5$ are coprime.
To solve
\begin{eqnarray*}
x \equiv \color{red}{2} \pmod{3} \\
x \equiv \color{blue}{4} \pmod{5}
\end{eqnarray*}
$x$ is construct as $x= \color{red}{2} \times \color{blue}{ 2 \times 5} - \color{blue}{4} \times \color{red}{3 \times 3}$ giving  $x \equiv 14 \pmod{15}$
Now do the same again with $7$ and $15$ ...$\color{blue}{1 \times 15} - \color{red}{2 \times 7}=1$ showing that $3$ & $5$ are coprime.
To solve
\begin{eqnarray*}
x \equiv \color{blue}{14} \pmod{15} \\
x \equiv \color{red}{6} \pmod{7}
\end{eqnarray*}
$x$ is construct as $x= \color{red}{6} \times \color{blue}{1 \times 15} - \color{blue}{14} \times \color{red}{2 \times 7}$ giving  $x \equiv 104 \pmod{105}$
</s>