If $\{p_1,..,p_n,...\}$ are the prime numbers.
Let $\displaystyle A_n:= \left\{\frac{k}{p_n}\ : k\in\{1,...,p_n-1\}\right\}$
Which is the closure of $A\,=\displaystyle \,\bigcup_{n\,=\,1}^\infty\,A_n $ in $[0,1]$.
Thank you all.
If $\{p_1,..,p_n,...\}$ are the prime numbers.
Let $\displaystyle A_n:= \left\{\frac{k}{p_n}\ : k\in\{1,...,p_n-1\}\right\}$
Which is the closure of $A\,=\displaystyle \,\bigcup_{n\,=\,1}^\infty\,A_n $ in $[0,1]$.
Thank you all.
There are infinitely many primes.
Let $x$ be a real number in the interval $[0,1]$. Given $\epsilon\gt 0$, we want to show that there is a prime $p$, and an integer $k$, with $1\le k\le p-1$, such that $\left|x-\frac{k}{p}\right|\lt \epsilon$.
Let $p$ be any prime $\gt \frac{1}{\epsilon}$. Consider the numbers $\frac{m}{p}$, where $m$ ranges over the integers from $0$ to $p$. There is a smallest such $m$ such that $\frac{m}{p}\ge x$. Then $\frac{m-1}{p}\lt x$, and $$\left|x-\frac{m-1}{p}\right| +\left|\frac{m}{p}-x\right|=\frac{m}{p}-\frac{m-1}{p}=\frac{1}{p}\lt \epsilon.$$ It follows that we have $$\left|x-\frac{m-1}{p}\right| \lt \epsilon\qquad\text{and}\qquad \left|\frac{m}{p}-x\right|\lt \epsilon.$$ But one of $m$ or $m-1$ is not equal to $0$ or $1$. That will do for the desired $k$.
Remark: Any infinite set of positive integers can replace the primes. Same proof.