[Math] Find the smallest positive $N$ such that $N \equiv 3 \pmod{4}, N \equiv 2 \pmod{5}, N \equiv 6 \pmod{7}.$

elementary-number-theorymodular arithmetic

Find the smallest positive $N$ such that
\begin{align*}
N &\equiv 3 \pmod{4}, \\
N &\equiv 2 \pmod{5}, \\
N &\equiv 6 \pmod{7}.
\end{align*}

I got 69 as the answer but with a check, it's not correct. Am I at least close? Could someone provide a solution? Thanks!

Best Answer

$$N = 4p + 3$$

$$N \equiv 2 \pmod{5}$$

$$4p + 3 \equiv 2 \pmod{5}$$

$$4p \equiv 4 \pmod{5}$$

$$p \equiv 1 \pmod{5}$$

We find this by finding the inverse of 4 mod 5 (the 4 chosen is the coefficient of p on the left).

$$N = 4(1)+3 \pmod{4 * 5}$$

$$N \equiv 7 \pmod{20}$$

$$N = 20q + 7$$

$$N \equiv 6 \pmod{7}$$

$$20q + 7 \equiv 6 \pmod{7}$$

$$20q \equiv 6 \pmod{7}$$

$$6q \equiv 6 \pmod{7}$$

$$q \equiv 1 \pmod{7}$$

$$N \equiv 20(1)+7 \pmod{20*7}$$

$$N \equiv 27 \pmod{140}$$

$$N = 27$$

Related Question