## Task A-1.2.

Determine all pairs of integers $(m, n)$ such that

$$
n^{2}-6 n=m^{2}+m-10
$$
## First Solution.

Multiply the given equation by 4:

$$
4 n^{2}-24 n=4 m^{2}+4 m-40
$$

and group the expressions on the left and right sides:

$$
\left(4 n^{2}-24 n+36\right)-36=\left(4 m^{2}+4 m+1\right)-41
$$

so that we can recognize complete squares:

$$
(2 n-6)^{2}+5=(2 m+1)^{2}
$$

If we move the constant to one side and apply the difference of squares formula, we get

$$
5=(2 m+1-2 n+6)(2 m+1+2 n-6)=(2 m-2 n+7)(2 m+2 n-5)
$$

Now we can consider four linear systems of two equations with variables $m$ and $n$ since the number 5 can be represented as a product of integers in four ways: $1 \cdot 5, 5 \cdot 1$, $(-1) \cdot (-5)$, and $(-5) \cdot (-1)$.

If $2 m-2 n+7=a$ and $2 m+2 n-5=b$, the solution to this system is

$$
m=\frac{a+b-2}{4}, \quad n=\frac{b-a+12}{4}
$$

By substituting the possibilities $(a, b)=(1,5),(5,1),(-1,-5),(-5,-1)$, we obtain the solutions $(m, n)=(1,4),(1,2),(-2,2),(-2,4)$.

1 point