2. Determine the number of all quadratic polynomials $P(x)$ with integer coefficients such that for every real number $x$ the following holds:

$$
x^{2}+2 x-2023<P(x)<2 x^{2} \text {. }
$$

(Ján Mazák, Michal Rolínek)
SOLUTION. Suitable polynomials $P(x)$ should have the form $P(x)=a x^{2}+b x+c$, where $a$, $b, c$ are integers. If the coefficient of $x^{2}$ were $a>2$. The remaining two cases $a \in\{1,2\}$ will be evaluated individually.

For $a=1$, we rewrite the given inequalities as

$$
(b-2) x+(c+2023)>0 \quad \text { and } \quad x^{2}-b x-c>0 .
$$

In the case $b \neq 2$, the first inequality has a non-zero coefficient for $x$, so it cannot be satisfied for all $x$, regardless of $c$. Therefore, it must be that $b=2$ and the first inequality then becomes $c>-2023$. The second inequality holds for all $x$ precisely when the quadratic $x^{2}-b x-c$ with a positive coefficient of $x^{2}$ has a negative discriminant, i.e., precisely when $b^{2}+4c<0$. Given $b=2$, this simplifies to $c<-1$. Thus, there are clearly 2021 such quadratic polynomials $P(x)$.

We will proceed analogously for the case $a=2$, but we will write it more concisely. The rewritten inequalities this time have the form

$$
x^{2}+(b-2) x+(c+2023)>0 \quad \text { and } \quad 2x^{2}-b x-c-2022>0.
$$

In the case $a=2$, the quadratic polynomials $P(x)$ that satisfy the inequalities are those for which $b=0$ and $0>c>-2022$. Clearly, there are 2021 such polynomials.

Conclusion. The number of polynomials sought is $2 \cdot 2021=4042$.

For a complete solution, award 6 points. In incomplete solutions, evaluate partial steps as follows:

A1. Noting that it is necessary that $a \in\{1,2\}$ (which can be taken as an obvious consequence of known properties of quadratic functions): 2 points.

A2. Determining $b$ (which can be taken as obvious) and bounding $c$ in both linear inequalities: a total of 1 point.

A3. Bounding $c$ in the two quadratic inequalities: 1 point for each of them.

A4. Determining the correct number of polynomials: 1 point.

In total, then award $\mathrm{A} 1+\mathrm{A} 2+\mathrm{A} 3+\mathrm{A} 4$ points. If the solver only deals with the cases $a \in\{1,2\}$ and does not state that this is sufficient, award no more than 4 points.