I'm doing an old exam of measure theory, and one question is to find an enumeration $\{r_n\}_{n\geq 1}$ of $\mathbb Q$ s.t. $$\bigcup_{n=1}^\infty \left(r_n-\frac{1}{n},r_n+\frac{1}{n}\right)\neq \mathbb R,$$ or in other word s.t. $$\bigcup_{n=1}^\infty \left(r_n-\frac{1}{n},r_n+\frac{1}{n}\right)\subsetneq \mathbb R. $$
How can this be possible ? I have the impression that if there is such an enumeration, then the density of $\mathbb Q$ in $\mathbb R$ fails... Indeed, if $x\in\mathbb R$, then there is $x\in \left(r_n-\frac{1}{n},r_n+\frac{1}{n}\right)$.
Yes, there exist enumerations $\{r_n\}_{n\geq 1}$ of $\mathbb{Q}$ such that $$\bigcup_{n=1}^\infty \left(r_n-\frac{1}{n},r_n+\frac{1}{n}\right)\subsetneq \mathbb R.$$
For example take an enumeration $\{r_n\}_{n\geq 1}$ of $\mathbb{Q}$ such that the rational numbers in $[0,M]$ have indices in $\{m^k\}_{k\geq 1}$ where $m$ and $M$ are integers $\geq 3$. It should be easy to verify that for such enumeration, $\bigcup_{n=1}^\infty \left(r_n-\frac{1}{n},r_n+\frac{1}{n}\right)$ is NOT the whole real line because a non-empty subset in $(0,M)$ remains uncovered.