A general wanted to know how many soldiers he had in his battalion. He placed them into rows as follows:
2 left over when placed in rows of 5.
4 left over when placed in rows of 6.
1 left over when placed in rows of 7.
7 left over when placed in rows of 11.
What is the minimum number of soldiers he must have in his battalion?
The problem can formulated as finding the least non-negative solution to the following simultaneous linear congruences.
$ x \equiv 2 \pmod 5 $
$ x \equiv 4 \pmod 6 $
$ x \equiv 1 \pmod 7 $
$ x \equiv 7 \pmod {11} $
The modulii 5, 6, 7 and 11 are pair-wise coprime, and so we can use the Chinese Remainer Theorem.
Formula (3.23) here is
$$ x = a_1 N_1 x_1 + a_2 N_2 x_2 + a_3 N_3 x_3 + a_4 N_4 x_4 = 2(6 \times 7 \times 11)x_1 + 4(5 \times 7 \times 11)x_2 + 1(5 \times 6 \times 11)x_3 + 7(5 \times 6 \times 7)x_4 $$
where $N_k x_k \equiv 1 \pmod {n_k}$, and so
$$ \begin{align} 462 x_1 & \equiv 1 \pmod 5 \\ \\ 2 x_1 & \equiv 1 \pmod 5 \\ \\ x_1 & \equiv 3 \pmod 5 \end{align}$$
and
$$ \begin{align} 385 x_2 & \equiv 1 \pmod 6 \\ \\ x_2 & \equiv 1 \pmod 6 \end{align}$$
also
$$ \begin{align} 330 x_3 & \equiv 1 \pmod 7 \\ \\ x_3 & \equiv 1 \pmod 7 \end{align}$$
and also
$$ \begin{align} 210 x_4 & \equiv 1 \pmod {11} \\ \\ x_4 & \equiv 1 \pmod {11} \end{align}$$
This gives
$$ x = a_1 N_1 x_1 + a_2 N_2 x_2 + a_3 N_3 x_3 + a_4 N_4 x_4 = 2(6 \times 7 \times 11)3 + 4(5 \times 7 \times 11)1 + 1(5 \times 6 \times 11)1 + 7(5 \times 6 \times 7)1 = 6112 $$
The general unique solution is
$$ \begin{align} x & \equiv 6112 \pmod {5 \times 6 \times 7 \times 11} \\ \\ x & \equiv 1492 \pmod {2310} \end{align}$$
That is, for some integer $t$
$$ x = 1492 + 2310t$$
The least positive solution is $1492$.