I'm currently working on a problem that requires me to know, for some $x=.x_1x_2x_3....x_n \in [0,1]$, when the $nth$ digit is equal to $0$ or $1$, in base $2.$ For example the interval where $x_1 = 1$ in base $2$ is $[\frac{1}{2}, 1)$, I think. And $x_2=1$ between $0$ and $\frac{1}{4}$ and also between $\frac{3}{4}$ and $1$. But when the $n$ gets larger, I feel that I should use some kind of pattern, but I'm not sure what to do.
I would like to do the same thing for the numbers in $[0,1]$ in base three.
Any help is appreciated.
Sometimes a picture is worth 1000 words.
Regions represented by a $1$ in successive digit places
base 2
base 3