Let $X\ge 2$ be large. Let $$A = \left\{\frac{a}{q}: 1\le a < q\le X,\ (a, q) = 1\right\},$$ and let $$B = \left\{\frac{a}{p}: 1\le a < p\le X,\ (a, p) = 1,\text{ and $p$ is prime}\right\}.$$ Note that for distinct $\frac{a}{q}, \frac{a'}{q'}\in A$, we have $$\left\lVert \frac{a}{q} - \frac{a'}{q'}\right\rVert\ge\frac{1}{qq'}\ge\frac{1}{X^2},\quad\text{where}\quad\lVert\beta\rVert := \min_{n\in\mathbb{Z}} |\beta - n|.$$ It follows that in any interval of length $X^{-2}$ in $[0, 1]$, there are at most $O(1)$ elements of $A$, and this is clearly the best result possible, since $|A|\gg X^2$. Is it possible to get better results for $B$, since we have that $|B|\asymp X^2 / \log X$ by the prime number theorem. In particular, is it possible to get a bound of $o(\log X)$ for the number of elements of $B$ in an interval of length $$|B|^{-1}\ll X^{-2}\log X?$$ Note that the inclusion $B\subseteq A$ gives the trivial bound $O(\log X)$.