Problem 6. Find which four-digit significant numbers, $\overline{a b c d}$ (with $a \neq 0$), are equal to $a \overline{a b}^{2}+\overline{c d}^{2}-\overline{c d}$.

Note: The notation $\overline{a b}$ represents, in this problem, the number that has $a$ tens and $b$ units; in this case, we have that $a, b \in\{0,1,2,3,4,5,6,7,8,9\}$.
Solution. We have $\overline{a b c d}=\overline{a b}^{2}+\overline{c d}^{2}-\overline{c d}$, therefore

$$
\overline{a b 00}=\overline{a b}^{2}+\overline{c d}^{2}-2 \overline{c d}=\overline{a b}^{2}+(\overline{c d}-1)^{2}-1
$$

and from here we have:

$$
\overline{a b 00}+1=\overline{a b}^{2}+(\overline{c d}-1)^{2}
$$

We will rearrange the terms of this expression to determine the values of $a, b, c$ and $d$. We write

$$
1=\overline{a b}^{2}-100 \overline{a b}+(\overline{c d}-1)^{2}=(\overline{a b}-50)^{2}+(\overline{c d}-1)^{2}-50^{2}
$$

and arranging the terms

$$
2501=50^{2}+1=\overline{a b}^{2}-100 \overline{a b}+(\overline{c d}-1)^{2}=(\overline{a b}-50)^{2}+(\overline{c d}-1)^{2}
$$

We need to decompose 2501 as the sum of two squares; the only decompositions are:

$$
2501=50^{2}+1=49^{2}+10^{2}
$$

We analyze the different cases for a decomposition of the form $2501=x^{2}+y^{2}$, using the units digits; modulo 10 these must sum to 1. We have the following tables:

| Units of $n:$ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| Units of $n^{2}:$ | 0 | 1 | 4 | 9 | 6 | 5 | 6 | 9 | 4 | 1 |


| $\overline{a b}-50=$ | $\overline{a b}$ |  | $2501-(\overline{a b}-50)^{2}$ | $\overline{c d}-1$ | $\overline{c d}$ | solution: |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $\overline{50}$ | $\overline{100}$ | $\overline{N O}$ |  |  |  |  |
| -50 | 0 | $N O$ |  |  |  |  |
| 1 | 51 |  | 2500 | $\overline{50}$ | 51 | 5151 |
| -1 | 49 |  | 2500 | 50 | 51 | 4951 |
| 49 | $\overline{99}$ |  | 100 | 10 | 11 | 9911 |
| -49 | 1 | $N O$ |  |  |  |  |
| 10 | 60 |  | 2401 | 49 | 550 | 6050 |
| $\overline{-10}$ | 40 |  | 2401 | 49 | 50 | 4050 |

We then have the following possibilities to start the analysis:

| Units of $x^{2}$ | Units of $y^{2}$ | Units of $x$ | Units of $y$ |
| :---: | :---: | :---: | :---: |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 9 |
| 1 | 0 | 1 | 0 |
| 1 | 0 | 9 | 0 |
| 5 | 6 | 5 | 4 |
| 5 | 6 | 5 | 6 |
| 6 | 5 | 4 | 5 |
| 6 | 5 | 6 | 5 |

We now study the possible values for $\overline{a b}-50$, being $(\overline{a b}-50)^{2}=50^{2}, 1^{2}, 49^{2}$ and $10^{2}$.