## Task A-2.2.

Determine all values of the parameter $p \in \mathbb{R}$ for which all solutions of the equation $x^{2}+p x+$ $2023=0$ are integers.
## Solution.

Let $x_{1}$ and $x_{2}$ be the solutions of the equation $x^{2} + p x + 2023 = 0$. According to Vieta's formulas, we have

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

The prime factorization of 2023 is $2023 = 7 \cdot 17^{2}$.

Since $x_{1}$ and $x_{2}$ are integers, they must be divisors of 2023 (they are

$$
\pm 1, \pm 7, \pm 17, \pm 119, \pm 289, \pm 2023)
$$

which when multiplied give 2023.

If $x_{1}$ and $x_{2}$ are equal to 1 and 2023 in some order, then $p = -(1 + 2023) = -2024$. If $x_{1}$ and $x_{2}$ are equal to -1 and -2023, then $p = 2024$.

If $x_{1}$ and $x_{2}$ are equal to 7 and 289 in some order, then $p = -(7 + 289) = -296$. In the case of opposite signs for $x_{1}$ and $x_{2}$, we have $p = 296$.

Finally, if $x_{1}$ and $x_{2}$ are equal to 17 and 119 in some order, then $p = -(17 + 119) = -126$, and in the case of opposite signs, we get $p = 126$.

Therefore, all possible values of the parameter $p$ with the desired property are $\pm 2024, \pm 296$, and $\pm 126$.

Note: A solution in which only all positive (or negative) solutions for $p$ are found achieves 1 point out of the last 3 points of the above scoring scheme.