Question 13 of chapter 2 in "Principles of mathematical analysis" by Rudin:
Construct a compact subset of real numbers which has countable limit points.
Please help to decide whether this solution is correct:
$A=\{ 1/2^n \} \bigcup \{1/2^n + 1/2^m\} \bigcup \{0\}$ where $n=1, 2, \cdots $ and $m$ is an integer such that $m>n$
An illustration of some points in the subset:
This set is bounded as $\forall x \in A \implies 0 \le x<1$.
Notice that the interval $(1/2^n+1/2^{(n+1)}, 1/2^{(n-1)})$ contains no point in set $A$. Since this is an open interval each point in this set has a neighbourhood which does not contain anypoint of A. Therefore this interval contains no limit points.
Further each interval of the form $((1/2^n + 1/2^{m+1}),(1/2^n + 1/2^m))$ does not contain any point of A so being open intervals they have no limit points.
Thus no limit point of $A$ lies outside $A$. Therefore $A$ is closed.
Being closed and bounded $A$ is compact.
The points $ \{ 1/2^n \} \bigcup \{0\}$ where $n=1, 2, \cdots $ are limit points as each neighbourhood contains point of $A$.
On other hand points $\{1/2^n + 1/2^m\}$ where $m>n$ are not limit points as they have intervals on both side which do not contain any point of $A$.
The set $ \{ 1/2^n \} \bigcup \{0\}$ is countable (can be mapple to tupple (n,m which is countable)) therefore $A$ is a compact set having limit points which form a countable set.