Show that $S=\{\frac{p}{2^i}: p\in\Bbb Z, i \in \Bbb N \}$ is dense in $\Bbb R$. Show that $S=\{\frac{p}{2^i}: p\in\Bbb Z,  i \in \Bbb N \}$ is dense in $\Bbb R$.
Just found this given as an example of a dense set while reading, and I couldn't convince myself of this claim's truthfulness. It kind of bugs me and I wonder if you guys have any idea why it is true. (I thought of taking two rational numbers that I know exist in any real neighborhood and averaging them in some way, but I didn't get far with that idea..)
Thank you!

I like to think of the answer intuitively. Represent $p$ in binary (base 2). Then $\frac{p}{2^i}$ is simply a number with finitely many binary digits. Conversely, any number whose binary representation has finitely many digits can be written as $\frac{p}{2^i}$.
To show a set is dense, we have to show that given an element $a$ in the set, we can always find an element $b\neq a$ such that $a$ is arbitrarily close to $b$. As a consequence, the density is infinite: You can find infinite numbers from the set in an unit interval. That's the intuitive meaning of "dense".
If you look at the intuition, it should be clear that the set is dense: You can always find a number that is as close as you want to any other number.
