2. The father divided a certain amount of money among his children in the following order. To the eldest son, he gave 1000 denars and $\frac{1}{8}$ of the remaining money, to the second child, he gave 2000 denars and $\frac{1}{8}$ of the new remainder, to the third child, he gave 3000 denars and $\frac{1}{8}$ of the new remainder, and so on until the last child. In this way, the entire sum of money was divided, and each child received an equal share. How much money did he give to each of the children, and how many children did he have?
Solution. Let $x$ be the amount of money the father distributed to his children.

The first child received $1000+\frac{1}{8}(x-1000)$, which is $\frac{1}{8} x+875$.

The second child received $2000+\frac{1}{8}\left(x-\frac{1}{8} x-875-2000\right)$, which is $\frac{7}{64} x+\frac{13125}{8}$.

Since both children received the same amount of money, we have

$$
\frac{1}{8} x+875=\frac{7}{64} x+\frac{13125}{8} \Leftrightarrow \frac{1}{64} x=\frac{6125}{8} \Leftrightarrow x=49000
$$

In this case, the first child received $\frac{1}{8} \cdot 49000+875=7000$, from which it follows that there were 7 children in total.