HMMT-Nov 2022 thm, Problem 5

Alice is once again very bored in class. On a whim, she chooses three primes $p, q, r$ independently and uniformly at random from the set of primes of at most 30. She then calculates the roots of $p x^{2}+q x+r$. What is the probability that at least one of her roots is an integer?

Solution: Solution: Since all of the coefficients are positive, any root $x$ must be negative. Moreover, by the rational root theorem, in order for $x$ to be an integer we must have either $x=-1$ or $x=-r$. So we must have either $p r^{2}-q r+r=0 \Longleftrightarrow p r=q-1$ or $p-q+r=0$. Neither of these cases are possible if all three primes are odd, so we know so we know that one of the primes is even, hence equal to 2. After this we can do a casework check; the valid triples of $(p, q, r)$ are $(2,5,3),(2,7,5),(2,13,11)$, $(2,19,17),(2,5,2),(2,7,3),(2,11,5),(2,23,11)$, allowing for $p$ and $r$ to be swapped. This leads to 15 valid triples out of 1000 (there are 10 primes less than 30 ). $\fbox{\frac{3}{200}}$.

Answer: \frac{3}{200}