Prove $K=\left \{\sum_{1}^{\infty}\frac{a_k}{3^k}:a_k\in\left \{0,2\right \}\right \}$ is compact Struggling with proving that the set above is compact. I've been approaching this by using the the theorem that a set is compact if and only if it is closed and bounded.
I can do the bounded part of the above theorem by proving that the minimum of the set is $0$ when we take $a_n=0$ for all $n\in\mathbb{N}$ and the maximum of the set is $1$ when we take $a_n=2$ for all $n\in\mathbb{N}$. So the set $K=\left \{\sum_{1}^{\infty}\frac{a_k}{3^k}:a_k\in\left \{0,2\right \}\right \}$ is bounded below by $0$ and above by $1$.
I'm struggling with proving this set is closed though. I know that since it is bounded and monotone all sequences are convergent, but how would I use this to prove that every sequence converges to a point in $K$? Or should I use another approach?
 A: Here are a few ideas:
You could show that for any sequence of elements from $K$ that converges to a real number $r$, we have $r\in K$. One idea here is to show that for any such sequence and any particular index $n$, the $a_n$ for the different terms in this sequence eventually stays fixed. Use these fixed values to get an $a_n$-expansion for $r$, proving $r\in K$.
You could show that $K$ is an intersection of closed sets (i.e. more or less prove that it is the Cantor set, with the standard iterative remove-the-middle-third construction).
You could prove that the complement of $K$ is open. For this you would need to find the form of an element in the complement of $K$, and price that it has a neighborhood disjoint from $K$ (I suggest splitting into cases depending on whether the arbitrary element is in $[0,1]$ or not). Using something similar to the definition of $K$, but requiring that at least one $a_n$ is $1$ is almost good enough; there are some $0.999\ldots=1$-related subtleties that you also need to handle.
