## Task B-3.7.

Determine all integers $a$ for which the solutions of the equation $x^{2}-(3+a) x+3 a+3=0$ are also integers. What are these numbers?
## First Solution.

By applying Viète's formulas to the solutions $x_{1}, x_{2}$ of the given equation, we get:

$$
\left\{\begin{array}{l}
x_{1}+x_{2}=3+a \\
x_{1} \cdot x_{2}=3 a+3
\end{array}\right.
$$

If we express, for example, $x_{1}$ in terms of $x_{2}$ from equation $(\star)$, we obtain $x_{1}=\frac{3 x_{2}-6}{x_{2}-3}$.

Now, $x_{1}$ can be written in the form

$$
x_{1}=\frac{3 x_{2}-6}{x_{2}-3}=\frac{3\left(x_{2}-3\right)+3}{x_{2}-3}=3+\frac{3}{x_{2}-3}
$$

Since $x_{1}$ is an integer, from equation ($* \star$) we conclude that $x_{2}-3 \in\{1,3,-1,-3\}$.

Thus, we have the following possibilities:

$$
\begin{gathered}
x_{2}-3=1 \Rightarrow x_{2}=4 \Rightarrow x_{1}=6 \\
x_{2}-3=3 \Rightarrow x_{2}=6 \Rightarrow x_{1}=4 \\
x_{2}-3=-1 \Rightarrow x_{2}=2 \Rightarrow x_{1}=0 \\
x_{2}-3=-3 \Rightarrow x_{2}=0 \Rightarrow x_{1}=2
\end{gathered}
$$

From $x_{1}=6, x_{2}=4$ and equation $(\star)$, we get $a=7$, similarly from $x_{1}=4$ and $x_{2}=6$.

From $x_{1}=0, x_{2}=2$ and equation $(\star)$, we get $a=-1$, similarly from $x_{1}=2$ and $x_{2}=0$.

Therefore, for the integers $a=-1$ and $a=7$, the solutions of the equation $x^{2}-(3+a) x+3 a+3=0$ are also integers.