This is related to homework but I am trying to find a special case first and see if I can generalize it. The problem is to construct some sequence $(x_n)$ in $[0,1]$ such that the accumulation points of $(x_n)$ are the points in the interval $[0,1]$.
I am extremely stuck and honestly have almost no idea how to approach the problem. I was given a hint to consider the subcover formulation of compactness for the interval, but I couldn't identify how that would help me. Intuitively it seems that I should somehow be able to define a sequence which in essence goes through the entire interval. For instance the sequence $$ (0, 1/2, 1, 3/4, 2/4, 1/4, 0, 1/8, 2/8, 3/8, 4/8\ldots)$$ seems to have the properties I hope for, but I cannot turn this intuition to rigorous mathematics.
Edit: Is it possible to glue together a sequence which consists of sequence that are known to have accumulation points? So for instance if $a \in [0,1]$ we know that the sequence $$ x_n = a - \frac{1}{n}$$ Has an accumulation point $a$. The problem is that there are infinite $a$ from which to choose from.
$$ \frac 1 2, \underbrace{{}\ \frac 1 4, \frac 3 4\ {}}_{\text{denominator}=4}, \underbrace{\frac 1 8, \frac 3 8, \frac 5 8, \frac 7 8}_{\text{denominator}=8}, \underbrace{\frac 1 {16}, \frac 3 {16}, \frac 5 {16}, \frac 7 {16}, \frac 9 {16}, \frac {11}{16}, \frac{13}{16}, \frac{15}{16}}_{\text{denominator}=16}, \ldots $$
To show that every point in $x\in[0,1]$ is an accumulation point of this sequence you need to show that for every $\varepsilon>0$, no matter how small, one of the fractions above is between $x\pm\varepsilon$. For that it is enough to show that the length of the interval, $2\varepsilon$, is less than the distance $2/2^n$ between consecutive terms in the sequence. The number $\varepsilon>0$ cannot be a lower bound of the seqence $1/2,1/4,1/8,1/16,\ldots$ because $1/\varepsilon$ cannot be an upper bound of the sequence $1,2,4,8,16,\ldots$. To prove that, suppose the latter sequence has a least upper bound $a$. Some power of $2$ must be bigger than $a/2$ since otherwise $a/2$ would be an upper bound, so what about $2$ times that power of $2$? It is more than $a$ and we have a contradiction.