A Chinese emperor orders a regiment of soldiers in his palace to divide into groups of $4$. They do so successfully. He then orders them to divide into groups of $3$, upon which $2$ of them are left without a group. He then orders them to divide into groups of $11$, upon which $5$ are left without a group. If the emperor estimates there are about two hundred soldiers in the regiment, what is the most likely number of soldiers in the regiment?
I need to find a number that is divisible by $4$, leaves a remainder of $2$ when divided by $3$, and leaves a remainder of $5$ when divided by $11$. This number must also be close to $200$, since that is the emperor's estimate. I can start by trying multiples of $4$, since that is the easiest condition to satisfy. The first multiple of $4$ that is greater than $200$ is $204$. I can check if this works by dividing it by $3$ and $11$ and seeing the remainders. $204 \div 3 = 68$ with no remainder, so this does not work.
[* for i in range(1, 10)] The next multiple of $4$ is $204 + 4 = 208$. $208 \div 3 = 69$ with a remainder of $1$, so this does not work either. The next multiple of $4$ is $208 + 4 = 212$. $212 \div 3 = 70$ with a remainder of $2$, which matches one condition. $212 \div 11 = 19$ with a remainder of $3$, which does not match the other condition. The next multiple of $4$ is $212 + 4 = 216$. $216 \div 3 = 72$ with no remainder, so this does not work. The next multiple of $4$ is $216 + 4 = 220$. $220 \div 3 = 73$ with a remainder of $1$, so this does not work. The next multiple of $4$ is $220 + 4 = 224$. $224 \div 3 = 74$ with a remainder of $2$, which matches one condition. $224 \div 11 = 20$ with a remainder of $4$, which does not match the other condition. The next multiple of $4$ is $224 + 4 = 228$. $228 \div 3 = 76$ with no remainder, so this does not work. The next multiple of $4$ is $228 + 4 = 232$. $232 \div 3 = 77$ with a remainder of $1$, so this does not work. The next multiple of $4$ is $232 + 4 = 236$. $236 \div 3 = 78$ with a remainder of $2$, which matches one condition. $236 \div 11 = 21$ with a remainder of $5$, which matches the other condition. This means that $236$ is the smallest number that satisfies all the conditions. I can check if there are any larger numbers that also work by adding $4 \cdot 3 \cdot 11 = 132$ to $236$, since that is the least common multiple of $4$, $3$, and $11$. $236 + 132 = 368$, which is too large to be the emperor's estimate. Therefore, the most likely number of soldiers in the regiment is $236$. 