## Task A-2.2.

Determine all pairs $(p, q)$ of prime numbers for which the quadratic equation $x^{2}+p x+q=0$ has two distinct solutions in the set of integers.
## Solution.

Let the solutions of the given quadratic equation be denoted by $x_{1}$ and $x_{2}$. Viète's formulas give the equations

$$
\begin{aligned}
x_{1}+x_{2} & =-p \\
x_{1} x_{2} & =q
\end{aligned}
$$

Since $x_{1}$ and $x_{2}$ are integers and $q$ is prime, it must be that $x_{1} \in\{ \pm 1, \pm q\}, x_{2}=\frac{q}{x_{1}}$.

In the cases with positive signs, we get $x_{1}+x_{2}=q+1$, or $-p=q+1$, and such a pair of prime numbers does not exist ( $q+1$ is positive, while $-p$ is negative).

In the cases with negative signs, we get $x_{1}+x_{2}=-q-1$, or $p=q+1$. From this, we see that $p$ and $q$ are of different parities, i.e., one of them must be even. We conclude that the only possibility is $q=2$ and $p=3$.

Solving the quadratic equation $x^{2}+3 x+2=0$ indeed gives integer solutions $x_{1}=-1, x_{2}=-2$.