2. Every 20 minutes for a week, an exact amount of liters of water (always the same amount) is transferred from a tank with 25,000 liters to another initially empty reservoir. From this second reservoir, at regular intervals of time, 1 liter is extracted first, then 2 liters, then 3 liters, and so on. At the end of the week, the last transfer and the last extraction coincide, leaving the second reservoir empty at that moment. Determine how much water has been extracted in total during the week, if the data in the problem allows it. (It is assumed that the transfers and extractions are instantaneous. The first transfer is made after the first 20 minutes and the first extraction, after the first interval of time.)
Solution. Let $n$ be the number of water extractions made during the week. In total, they will have extracted $T_{n}=1+2+\cdots+n=n(n+1) / 2$ liters. On the other hand, if the flow that is transferred every 20 minutes to the second tank is $k$ liters, the total liters that have entered is $7 \times 24 \times 3 \times k=2^{3} \times 3^{2} \times 7 \times k$, so $2^{3} \times 3^{2} \times 7 \times k=n(n+1) / 2$ and this amount must be $\leq 25000$, therefore $2^{4} \times 3^{2} \times 7 \times k=n(n+1) \leq 50000$. By the last inequality, $n \leq 223$. Now, the numbers $n$ and $n+1$ are coprime, so each power $2^{4}, 3^{2}, 7$ divides $n$ or $n+1$. Certainly $2^{4} \times 3^{2} \times 7=1008$ cannot divide $n$ or $n+1$, given that $n \leq 223$. Suppose that $n=16 c$ is a multiple of 16. Then $n+1$ is a multiple of 9 or 7. In the first case, we would have $n+1=16 c+1 \equiv 0(\bmod 9)$, that is, $c \equiv 5(\bmod 9)$. But if $c=5, n=80$ and 7 does not divide $80 \times 81$, and if $c \geq 5+9=14, n \geq 16 \times 14=224$. On the other hand, in the second case, $n+1=16 c+1 \equiv 0(\bmod 7)$, from which $c \equiv 3(\bmod 7)$. But 9 does not divide the product $n(n+1)$ if $c=3$ or 10, and if $c \geq 17, n>223$. We conclude that $n$ is not a multiple of 16 and $n+1$ is. If $n$ is a multiple of 9 and $n+1$ of $16 \times 7$, we would have $n=16 \times 7 \times c-1 \equiv 0(\bmod 9)$, that is, $c \equiv 7(\bmod 9)$ and then $c \geq 7$ and $n>223$. Similarly, if $n$ is a multiple of 7 and $n+1$ of $16 \times 9, n=16 \times 9 \times c-1 \equiv 0(\bmod 7)$, that is, $c \equiv 2(\bmod 7)$ and then $c \geq 2$ and $n>223$. The only case left is that $n$ is a multiple of $9 \times 7=63$ and $n+1$ of 16. Then $n+1=63 c+1 \equiv 0$ $(\bmod 16)$ and $c \equiv 1(\bmod 16)$ and necessarily $c=1($ if not $n>223)$. Therefore, there is only one possible solution, namely, $n=63$, which gives a total extracted volume of $T_{63}=63 \times 64 / 2=2016$ liters.