Let $S$ be a subset of the natural numbers, and sample $x$ and $y$ uniformly from $[0,1]$.
What is the probability that the integer part of $x/y$ is an element of $S$?
For example, if $S$ is the set of even numbers, then the probability is $1-\ln(2)/2$.
Can you generalize this calculation to sets of the form $\{mn+b:n\in\Bbb N\}$?
What about sets of the form $\{p(n):n\in\Bbb N\}$ where $p$ is a polynomial?