4. Find all five-digit numbers consisting of non-zero digits such that each time we erase the first digit, we get a divisor of the previous number.

## Solutions

Problem 1.
Answer: 15

Let's add all the equations and factor out the complete squares. We get $(a-2)^{2}+(b-1)^{2}+(c-2)^{2}=0$, then $a=2, b=1$ and $c=2$. Therefore, $2a+3b+4c=15$.

## Problem 2.

Answer: $(23,13,2),(23,13,3)$

Case 1. Suppose $a-b-8$ and $b-c-8$ are both even, then $a-b-8=b-c-8=2$. Thus, $a=c+20, b=c+10$. But $c, c+10, c+20$ give different remainders when divided by 3.

Therefore, the only case that fits is $(23,13,3)$.

Case 2. Suppose $a-b-8$ is odd. Then $a$ and $b$ have different parities. Since $a>b$, then $b=2$. But $b>c-8$. Therefore, this case is impossible.

Case 3. Suppose $b-c-8$ is odd. From similar reasoning, we get $c=2$. From the previous case, we know that $a-b-8$ can only be even, so $a-b-8=2$. Therefore, $a=b+10$. Thus, we have proven that the numbers $b+10, b, b-10$ are prime. They give different remainders when divided by 3. Therefore, $b-10=3$. We get the solution $(23,13,2)$.

## Problem 3.

Answer: 364

Let $x=\sqrt{2n+1}$, and $y=\sqrt{2n-1}$. Then $x^{2}+y^{2}=4n, xy=\sqrt{4n^{2}-1}, x^{2}-y^{2}=2$.

We get $f(n)=\frac{x^{2}+xy+y^{2}}{x+y}=\frac{(x-y)(x^{2}+xy+y^{2})}{(x-y)(x+y)}=\frac{x^{3}-y^{3}}{x^{2}-y^{2}}=\frac{1}{2}\sqrt{(2n+1)^{3}}-\frac{1}{2}\sqrt{(2n-1)^{3}}$.

Then $f(1)+f(2)+\cdots+f(40)=\frac{1}{2}\sqrt{81^{3}}-\frac{1}{2}\sqrt{1^{3}}=364$.

Problem 4.

Answer: $91125,53125,95625$.

Let our number be $\overline{abcde}$. Then $\overline{abcde} \vdots \overline{bcde}$. Therefore, $a \cdot 10^{4} \vdots \overline{bcde}$. Then $\overline{bcde}=x \cdot 2^{k} \cdot 5^{l}$, where $x \mid a$.

Let $l=0$, then $\overline{bcde} \leq 9 \cdot 2^{4}=144$. Therefore, $b=0$. But we need all non-zero digits.

Thus, $l>0$. But then $k=0$. Otherwise, $\overline{bcde} \vdots 10$.

We will prove that $l>2$. Suppose the contrary, but then $\overline{bcde} \leq 9 \cdot 5^{2}=225$.

Case 1. Let $l=3$. Then $x=9$. Otherwise, $\overline{bcde} \leq 8 \cdot 125$. The resulting number is 91125.

Case 2. Let $l=4$. Then $\overline{bcde}=x \cdot 625$. Note that $x$ is odd and $x \geq 3$. We check the remaining cases.

If $x=3$, then $\overline{bcde}=1875$. But 1875 is not divisible by 875.

If $x=5$, then $\overline{bcde}=3125$. We get 53125 and it fits.

If $x=7$, then $\overline{bcde}=4375$. But 4375 is not divisible by 375.

If $x=9$, then $\overline{bcde}=5625$. We get 95625 and it fits.

## Written Olympiad "Algebra and Number Theory"

Senior League

Conditions and solutions