[Math] The least number which leaves remainders 2, 3, 4, 5 and 6 on dividing by 3, 4, 5, 6 and 7 is

number theory

Problem – The least number which leaves remainders 2, 3, 4, 5 and 6 on dividing by 3, 4, 5, 6 and 7 is?

Solution – Here 3-2 = 1, 4-3 = 1, 5-4 = 1 and so on.

So required number is (LCM of 3, 4, 5, 6, 7) – 1 = 419

My confusion

I didn't get the solution of this. Please explain how by subtracting the conclusion was drawn that the number will be the (LCM – 1)?

Best Answer

$\, x\!+\!1\equiv 0\pmod{m_i}\iff m_i\mid x\!+\!1\iff {\rm lcm}\{m_i\}\mid x\!+\!1\iff x\equiv -1\pmod{{\rm lcm}\{m_i\}}$

Or, equivalently: $\,\ x\equiv -1\pmod{m_i}\iff x\equiv -1\pmod{{\rm lcm}\{m_i\}},\ $ whihc may be viewed as the special constant-case of the Chinese Remainder Theorem (CRT).