## Task 2 - 250932

Determine all pairs $(a, b)$ of two-digit numbers $a$ and $b$ for which the following holds: If one forms a four-digit number $z$ by writing $a$ and $b$ consecutively in this order, then $z=(a+b)^{2}$.
According to the problem statement, $z=100a+b=(a+b)^2=a^2+2ab+b^2$ or $a^2+(2b-100)a+b(b-1)=0$. For $b \geq 26$, however,

$0=a^2+(2b-100)a+b(b-1) \geq a^2-48a+26 \cdot 25=(a-24)^2-24^2+650=(a-24)^2+650-576>0$ which is a contradiction. Therefore, $b \leq 25$ must hold.

$b$ is the number formed by the last two digits of a square number. Because $(10n+m)^2=100n^2+20nm+m^2$ and $0^2=00, 1^2=01, 2^2=04, 3^2=09, 4^2=16, 5^2=25, 6^2=36, 7^2=49, 8^2=64$ and $9^2=81$, the second-to-last digit of a square number is only odd if the last digit is 6. If the second-to-last digit is even, the possible last digits are 0, 1, 4, and 5.

Thus, the possibilities for $b$ are narrowed down to the elements of the set $\{16, 20, 21, 24, 25\}$. These will now be examined in sequence:

If $b=16$, then $z=100a+16=(a+16)^2=a^2+32a+256$ must hold, which is equivalent to $a^2-68a+240=0$ or $a=34 \pm \sqrt{34^2-240}$. Since $34^2-240=(30+4)^2-240=900+240+16-240=916$, it follows that $30<\sqrt{34^2-240}<31$, so there is no solution with $b=16$.

If $b=20$, then $z=100a+20$ would be divisible by 5 but not by 25, which contradicts $z=(a+b)^2$.

For $b=21$, $100a+21=(a+21)^2=a^2+42a+441$, so $a^2-58a+420=0$ and thus $a=29 \pm \sqrt{29^2-420}=29 \pm \sqrt{841-420}=29 \pm \sqrt{421}$. Since $20<\sqrt{421}<21$, there is no solution in this case either.

If $b=24$, then $100a+24=(a+24)^2=a^2+48a+576$ and $a^2-52a+552=0$, so $a=26 \pm \sqrt{26^2-552}$. Since $26^2-552=900-2 \cdot 30 \cdot 4+4^2-552=900-240+16-552=124$, it follows that $11<\sqrt{26^2-552}<12$, so there is no solution in this case either.

Finally, if $b=25$, then $100a+25=(a+25)^2=a^2+50a+625$ and thus $a^2-50a+600=0$, which has the solutions $25 \pm \sqrt{25^2-600}=25 \pm \sqrt{25}=25 \pm 5$, i.e., $a_1=20$ and $a_2=30$.

Indeed, $(20+25)^2=45^2=2025$ and $(30+25)^2=55^2=3025$, so $(a, b) \in \{(20, 25), (30, 25)\}$ is the solution set.