2. At the parade of the royal musketeers, seeing that they could not be arranged in rows of 11 musketeers, D'Artagnan decided to arrange the musketeers in rows of 10 musketeers, but it turned out that there was one empty place in the last row. Then he tried to arrange them in rows of 9, 8, 7, 6, 5, 4, 3, 2 musketeers, but each time there was one empty place in the last row. Finally, the musketeers marched in a single file, which caused a burst of laughter among the spectators. Determine how many musketeers participated in the parade, given that there were no more than 7000.
Solution. Let $x$ be the number of musketeers who participated in the parade. From the condition of the problem, we have that $x+1$ is divisible by $2,3,4,5,6,7,8,9$, 10, from which it follows that

$$
x+1=\mathrm{LCM}(2,3,4,5,6,7,8,9,10) \cdot k=2520 \cdot k
$$

that is, $x=2520 k-1$. For $k \geq 3$, we get that

$$
x \geq 2520 \cdot 3-1=7559>7000
$$

from which it follows that $k=1$ or $k=2$. For $k=1$, we get that $x=2519$ which is divisible by 11, so the only possibility is $k=2$, that is, $x=2520 \cdot 2-1=5039$ which is not divisible by 11, meaning that 5039 musketeers participated in the parade.