## Task 3 - 050933

The positive integer $x$ ends with the digits $a$ and $b$ (in that order).

Determine all ordered pairs $(a, b)$ for which $x^{2}$ ends with the same digits $a$ and $b$ (also in terms of the order)!
Let

$$
x=100 c+d, \quad d=10 a+b
$$

and $a, b, c$ be natural numbers with $0 \leq a \leq 9,0 \leq b \leq 9$. Then it holds that

$$
\begin{gathered}
(100 c+d)^{2}=100 e+d \quad, \text { e a natural number } \\
10000 c^{2}+200 c d+d^{2}=100 e+d \\
100 e=10000 c^{2}+200 c d+d^{2}-d \\
e=100 c^{2}+2 c d+\frac{d^{2}-d}{100}
\end{gathered}
$$

$e$ is an integer exactly when $d(d-1)$ is divisible by 100. Since $d$ and $d-1$ cannot both be divisible by 5, one of the two factors must be divisible by 25. Given $d<100$, the following possibilities arise:

| $d$ | $d-1$ | $100 \mid\left(d^{2}-d\right)$ | $d$ | $d-1$ | $100 \mid\left(d^{2}-d\right)$ |
| :---: | :---: | :---: | :---: | :---: | :---: |
| 0 | -1 | yes | 1 | 0 | yes |
| 25 | 24 | yes | 26 | 25 | no |
| 50 | 49 | no | 51 | 50 | no |
| 75 | 74 | no | 76 | 75 | yes |

The following ordered pairs $(a, b)$ and only these satisfy the given condition: $(0 ; 0),(0 ; 1),(2 ; 5)$ and $(7 ; 6)$.

Adapted from $[5]$