Consider the following subspaces of $\mathbb{R}$ with the usual topology: $$X = (0, 1) \cup \{2\} \cup (3, 4) \cup \{5\} \cup \cdots \cup (3n, 3n + 1) \cup \{3n + 2\} \cup\cdots$$ $$Y = (0, 1] \cup (3, 4) \cup \{5\} \cup\cdots\cup (3n, 3n + 1) \cup \{3n + 2\} \cup\cdots$$ Is $X$ homeomorphic to $Y$ ?
For $X$ to be homeomorphic to $Y$, we need to specify a bijective function from $X$ to $Y$ and inverse function from $Y$ to $X$ are continuous. From $(3,4)$ onwards, we can map by identity function. How can I map $(0,1) \cup \{2\}$ to $Y$? $(0,1]$, in usual topology is not open and closed. Can I write $(0,1]$ as $(0,1)\cup\{1\}$, and then map $\{0,1\}$ by identity map and $\{1\}$ to $\{2\}$. Please forgive me if any of what I think is stupid.