7. Determine all natural numbers less than 1000 for which the unit digit is greater than the leading digit, and the difference between that number and the number written with the same digits in reverse order is a square of a natural number.

No use of a pocket calculator or any reference materials is allowed.

## Ministry of Science and Education of the Republic of Croatia  Agency for Education and Upbringing  Croatian Mathematical Society

## SCHOOL COMPETITION IN MATHEMATICS  January 26, 2024.
7. Determine all natural numbers less than 1000 for which the unit digit is greater than the leading digit, and the difference between that number and the number written with the same digits in reverse order is a square of a natural number.

## Solution.

A number less than 1000 can be a one-digit, two-digit, or three-digit number.

Assume the desired number is a one-digit number.

Its leading digit is also the unit digit, so the unit digit is not greater than the leading digit, and the desired number cannot be a one-digit number but must be either a two-digit or a three-digit number.

1 POINT

Assume $\overline{x y}$ is the desired two-digit number. We will subtract the smaller number from the larger one.

It is true that $x \neq 0$ (leading digit) and $y \neq 0$ (according to the condition of the problem $y>x$).

Then the number written with the same digits in reverse order is $\overline{y x}$, so

$\overline{y x}-\overline{x y}=10 y+x-(10 x+y)=9 y-9 x=9 \cdot(y-x)$.

1 POINT

$x$ and $y$ are digits different from 0, their difference $(y-x) \in\{0,1,2,3,4,5,6,7,8\}$.

Thus, $9 \cdot(y-x) \in\{0,9,18,27,36,45,56,63,72\}$.

1 POINT

In the given set, only 9 and 36 are squares of a natural number, and since

$9=9 \cdot 1,36=9 \cdot 4$, it must be that $(y-x) \in\{1,4\}$.

1 POINT

(The same conclusion can be reached in the following way:

The number 9 is the square of a natural number, so $(y-x)$ must also be the square of a natural number.

The numbers $x$ and $y$ are digits different from 0, their difference $y-x$ is an element of the set $\{0,1,2,3,4,5,6,7,8\}$, so the only possibilities are $y-x=1$ or $y-x=4$.

2 POINTS)

Further, we have:

| $y$ | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 9 | 8 | 7 | 6 | 5 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $x$ | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 5 | 4 | 3 | 2 | 1 |
| $y-x$ | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 4 | 4 | 4 | 4 | 4 |

The desired numbers are: $89,78,67,56,45,34,23,12,59,48,37,26$ and 15.

3 POINTS

Assume $\overline{x y z}$ is the desired three-digit number. We will subtract the smaller number from the larger one.

It is true that $x \neq 0$ (leading digit) and $z \neq 0$ (according to the condition of the problem $z>x$).

Then the number written with the same digits in reverse order is $\overline{z y x}$, so

$\overline{z y x}-\overline{x y z}=100 z+10 y+x-(100 x+10 y+z)=99 z-99 x=99 \cdot(z-x)$.

1 POINT

According to the condition of the problem, $x$ and $z$ are digits different from 0, so their difference

$(z-x) \in\{0,1,2,3,4,5,6,7,8\}$.

Thus, $99 \cdot(z-x) \in\{0,99,198,297,396,495,597,693,792\}$.

1 POINT

Since none of the elements of the given set is a square of a natural number, we conclude that the desired number is not a three-digit number.

1 POINT

(The same conclusion can be reached in the following way:

For the product $99 \cdot(z-x)=9 \cdot 11 \cdot(z-x)$ to be a square of a natural number, $z-x$ must be divisible by 11, which is impossible since $(z-x)<9$.

2 POINTS)

Thus, only thirteen two-digit numbers satisfy the condition of the problem.

TOTAL 10 POINTS

Note: At least 6 correctly written solutions, without explanation of how they were obtained, are worth 1 POINT, at least 9 solutions are worth 2 POINTS, and all 13 are worth 3 POINTS.

## SCHOOL COMPETITION IN MATHEMATICS