The current question is motivated by this question. It is known that the number of imaginary quadratic fields of class number 3 is finite. Assuming the answer to this question is affirmative, I came up with the following question.
Let $f(X) = X^3 + aX + b$ be an irreducible polynomial in $\mathbb{Z}[X]$. Let $p = -(4a^3 + 27b^2)$ be the discriminant of $f(X)$. We consider the following conditions.
(1) $p = -(4a^3 + 27b^2)$ is a prime number.
(2) The class number of $\mathbb{Q}(\sqrt{p})$ is 3.
(3) $f(X) \equiv (X - s)^2(X - t)$ (mod $p$), where $s$ and $t$ are distinct rational integers mod $p$.
Question Are there infinitely many primes $p$ satisfying (1), (2), (3)?
If this is too difficult, is there any such $p$?
I hope that someone would search for such primes using a computer.