3.1. Find the sum of all two-digit numbers for each of which the sum of the squares of the digits is 37 more than the product of the same digits.
Solution. 1st method. For a two-digit number $\overline{a b}$, the condition means that

$$
a^{2}+b^{2}-a b=37
$$

Since the equation is symmetric, i.e., with each solution $(a, b)$, the pair $(b, a)$ is also a solution, we can assume without loss of generality that $a \geqslant b$.

- Suppose $a \leqslant 6$. Then the equation (1) has no solutions, because $b \leqslant a$ and $37=a^{2}+b^{2}-a b=a^{2}+b(b-a) \leqslant a^{2} \leqslant 36$.
- For $a=7$, the equation (1) becomes $b^{2}-7 b+12=0 \Longleftrightarrow b=3, b=4$. This gives us the solutions 73, 74, and considering the symmetry, 37, 47.
- For $a=8$ and $a=9$, the equation (1) becomes $b^{2}-8 b-27=0$ and $b^{2}-9 b-44=0$ respectively. Both equations have no integer solutions.

It remains to sum all the obtained numbers: $73+74+37+47=231$.

2nd method. Another solution to this problem. For a two-digit number $\overline{a b}$, the condition means that

$$
a^{2}+b^{2}-a b=37 \Longleftrightarrow(2 a-b)^{2}+3 b^{2}=148
$$

Then $b \leqslant 7$ and a complete enumeration of the cases

| $b$ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $3 b^{2}$ | 0 | 3 | 12 | 27 | 48 | 75 | 108 | 147 |
| $(2 a-b)^{2}$ | 37 | 145 | 126 | 121 | 100 | 73 | 40 | 1 |

leaves only three options:

$$
\left[\begin{array}{l}
b=3 \\
2 a-b= \pm 11
\end{array} \Rightarrow a=7 ; \quad\left[\begin{array}{l}
b=4 \\
2 a-b= \pm 10
\end{array} \Rightarrow a=7 ; \quad\left[\begin{array}{l}
b=7 \\
2 a-b= \pm 1
\end{array} \Rightarrow a=3, a=4\right.\right.\right.
$$

Thus, these are the numbers $37, 47, 73, 74$. Their sum is 231.

Answer: 231. (C)

![](https://cdn.mathpix.com/cropped/2024_05_06_a8c31eb257d724803ce6g-03.jpg?height=70&width=813&top_left_y=2169&top_left_x=673)