Problem

Source: XII International Festival of Young Mathematicians Sozopol 2023, Theme for 10-12 grade

Tags: number theory



Find all prime numbers $p$ for which there exist quadratic trinomials $P(x)$ and $Q(x)$ with integer coefficients, both with leading coefficients equal to $1$, such that the coefficients of $x^0$, $x^1$, $x^2$, and $x^3$ in the expanded form of the product $P(x)Q(x)$ are congruent modulo $p$ to $4$, $0$, $(-16)$, and $0$, respectively.