3. For which natural number $a$ does the equation $x^{2}+y^{2}=a x y$ have solutions in the set of natural numbers.
Solution. If we consider the equation as a quadratic equation in $y$, i.e.

$$
y^{2}-a x y+x^{2}=0
$$

then $y_{1 / 2}=\frac{a x \pm x \sqrt{a^{2}-4}}{2}$.

For the solution to be a natural number, $a^{2}-4$ must be a perfect square, i.e., there must exist a natural number $k$ such that

$$
a^{2}-4=k^{2}
$$

or

$$
\begin{aligned}
& a^{2}-k^{2}=4 \\
& (a-k)(a+k)=4
\end{aligned}
$$

Since $a$ and $k$ are natural numbers, $a+k$ is a natural number, and due to the above equation, $a-k$ is a natural number. Also, $a+k \geq a-k$. Because of this, there are only the following two cases:
a) $a-k=2, a+k=2$, which implies $a=2, k=0$

b) $a-k=1, a+k=4$, which implies $a=\frac{5}{2}, k=\frac{3}{2}$.

Since only in case a) $a$ is a natural number, the only solution to the problem is $a=2$.