## Task A-4.1.

Determine all pairs of integers $(a, b)$ such that $b \geqslant 0$ and

$$
a^{2}+2 a b+b!=131
$$
## Solution.

Let's write the given equation as $a^{2}+2 a b+b^{2}+b!=131+b^{2}$, that is,

$$
(a+b)^{2}=131+b^{2}-b!
$$

Since the left side is non-negative, it must be $131+b^{2} \geqslant b!$. 2 points

Notice that for $b=6,167=131+6^{2}\left(131+b^{2}\right) \cdot(b+1)=b^{3}+b^{2}+131 b+131 \\
& >b^{2}+2 b+1+131 \\
& =(b+1)^{2}+131
\end{aligned}
$$

By the principle of mathematical induction, we conclude that $b!>131+b^{2}$ for every natural number $b \geqslant 6$.

Thus, $b \in\{0,1,2,3,4,5\}$. By substituting $b=0,1,2,3,4$, we see that no integer $a$ satisfies the equality.

Finally, by substituting $b=5$, we obtain the only two solutions: $(a, b) \in\{(1,5),(-11,5)\}$.

Note: The inequality $131+b^{2} \geqslant b!$ can also be proven without mathematical induction. For example, for numbers $b \geqslant 6$, we have

$$
b!\geqslant b \cdot(b-1) \cdot 4 \cdot 3 \cdot 2 \cdot 1=24\left(b^{2}-b\right) \geqslant 12 b^{2} \geqslant b^{2}+11 \cdot 36>b^{2}+131
$$

where we used $2\left(b^{2}-b\right) \geqslant b^{2}$, which is equivalent to $b(b-2) \geqslant 0$.