Inspired by this Google Code Jam problem - Vanishing Numbers
There is a pool of numbers which are arbitrary decimal fractions from the interval (0, 1). In the first round of the game the middle third of the interval disappears, and the numbers from this interval are eliminated from the pool. In the next rounds the middle thirds of each of the remaining intervals disappear. In the first round the the interval [1/3, 2/3] is eliminated and in the second round the two intervals [1/9, 2/9] and [7/9, 8/9] are eliminated, and so on. The endpoints of each removed interval are removed as well.
It seems that if we keep repeating this process, at the end there will still be some fractions that will not get removed, for example 0.3. How to determine which numbers will never get removed, other than by actually repeating the process?
If a number $0<x<1$ is represented in base-3 by $0.d_1d_2\ldots$ then the first digit represents in which third it lies, when dividing $(0,1)$ into 3 segments, the second digit represents in which third of that third the number is, etc.
This means, that by the end of the process, you remain with exactly all numbers that have a base-3 representation containing only $0$s and $2$s.