The density of polynomials of degree $n$ over $\mathbb{Z}_p$ having exactly $r$ roots in $\mathbb{Q}_p$
We determine the probability that a random polynomial of degree $n$ over $\mathbb{Z}_p$ has exactly $r$ roots in $\mathbb{Q}_p$, and show that it is given by a rational function of $p$ that is invariant under replacing $p$ by $1/p$.