Task A-1.4. (10 points)

How many pairs $(x, y)$ of integers satisfy:

$$
(x+y+2012)^{2}=x^{2}+y^{2}+2012^{2} ?
$$
## Solution.

By squaring the trinomial and rearranging the equality, we get

$$
\begin{array}{cc}
(x+y+2012)^{2}=x^{2}+y^{2}+2012^{2} & \\
x^{2}+y^{2}+2012^{2}+2 x y+2 x \cdot 2012+2 y \cdot 2012=x^{2}+y^{2}+2012^{2} & 1 \text { point } \\
x y+x \cdot 2012+y \cdot 2012=0 & \\
x y+2012 x+2012 y+2012^{2}=2012^{2} & 2 \text { points } \\
(x+2012)(y+2012)=2012^{2} . &
\end{array}
$$

We have $2012^{2}=2^{4} \cdot 503^{2}$, and 503 is a prime number.

(We can immediately see that 503 is not divisible by 2, 3, and 5. It is sufficient to check that 503 is not divisible by 7, 11, 13, 17, and 19, since $23 \cdot 23=529>503$.)

Therefore, the number of positive divisors of $2012^{2}$ is $(4+1) \cdot (2+1)=15$, 1 point and the total number of divisors is 30, 1 point which is also the number of possible representations of $2012^{2}$ as a product of two factors. 1 point

Each representation of the right-hand side as a product of two factors corresponds to one solution of the given equation.

(For any $a, b \in \mathbb{Z}$ such that $a \cdot b=2012^{2}$, there exist unique $x, y \in \mathbb{Z}$ such that $x+2012=a, y+2012=b$.)

Therefore, the given equation has 30 solutions in the set $\mathbb{Z} \times \mathbb{Z}$.

Note: The divisors of 2012 are:

$$
\begin{gathered}
-16 \cdot 503^{2},-8 \cdot 503^{2},-4 \cdot 503^{2},-2 \cdot 503^{2},-503^{2},-16 \cdot 503,-8 \cdot 503,-4 \cdot 503 \\
-2 \cdot 503,-503,-16,-8,-4,-2,-1,1,2,4,8,16,503,2 \cdot 503 \\
4 \cdot 503,8 \cdot 503,16 \cdot 503,503^{2}, 2 \cdot 503^{2}, 4 \cdot 503^{2}, 8 \cdot 503^{2}, 16 \cdot 503^{2}
\end{gathered}
$$