Is there a cubic $Q(x)\in \mathbb{Z}[x]$ so that $|Q(p_1)|=|Q(p_2)|=|Q(p_3)|=|Q(p_4)|=3$, where $p_1, p_2, p_3, p_4$ are distinct primes? [duplicate]

Is there a cubic $Q(x)\in \mathbb{Z}[x]$ so that $|Q(p_1)|=|Q(p_2)|=|Q(p_3)|=|Q(p_4)|=3$, where $p_1, p_2, p_3, p_4$ are distinct primes?

Clearly there must be at least one $Q(p_i)=3$ and at least one $Q(p_j)=-3$ (otherwise there will be 4 roots of a third degree polynomial)

Lets suppose that $Q(p_1) = 3$ and $Q(p_2) = -3$.

$Q(p_1) - Q(p_2)/ (p_1-p_2) = n$ where $n \in \mathbb{Z}$

The dividers of $6$ are $1, 2, 3, 6$. $(p_1-p_2) \in \{1, 2, 3, 6\}$

That’s what I’ve got so far.


Clearly values $Q(p_i)$ can not be all the same since third degree polynomial can take only 3 times the same value. Then we have a following cases:

  • Suppose $Q(p_1)= Q(p_2)= Q(p_3)=3$ and $Q(p_4)=-3$, so $$Q(x) = a(x-p_1)(x-p_2)(x-p_3)+3$$ and thus $$-6 = a(p_4-p_1)(p_4-p_2)(p_4-p_3)$$ Since primes are all different (say $p_1<p_2<p_3$) we have: $$6 = |a||(p_4-p_1)||(p_4-p_2)||(p_4-p_3)|\geq 1\cdot 1\cdot 2\cdot 3 = 6$$ and this means that $|p_4-p_1|$ and $|p_4-p_3|$ are odd so $p_4=2$ which is impossible or $p_1=p_3 = 2$ which is again impossible.

  • If $Q(p_1)= Q(p_2)= Q(p_3)=-3$ and $Q(p_4)=3$ we proceed similarly as in first case.

  • Suppose $Q(p_1)= Q(p_2)=3$ and $Q(p_3)=Q(p_4)=-3$, then we have: $$p_4-p_1\mid Q(p_4)-Q(p_1) =-6$$ and similarly for all other pairs, so

$$|p_4-p_1|,|p_4-p_2|,|p_3-p_1|,|p_3-p_2|\in\{1,2,3,6\}$$

  • If $|p_4-p_1|= 6$ then we have $|p_4-p_2|=1$ so $p_2=2$ and $p_4 =3$ and $p_1=9$ or $p_2=3$ and $p_4 =2$ and $p_1=8$. A contradiction. Similarly we see that all absolute differences can not be 6. So two differences must be the same.

If two of them are 3 or 1 then we have two primes to be 2. Impossible.

If two of them are 2 then we have two subcases:

  • $|p_4-p_1|= |p_4-p_2|= 2$ then $|p_2-p_1|=4$ but $4\nmid 6$.
  • $|p_4-p_1|= |p_3-p_2|= 2$ then $|p_3-p_1|$ and $|p_4-p_2|$ are odd so we have again two primes equal 2. A contradiction again.