I have difficulty understanding the following passage.
Let $E$ be a locally compact separable metric space. Let $(x_p)_{p\geq 0}$ be a dense sequence in $E$. Define $$I:=\{(p,k)\in \mathbb{N}^2:\bar{B}(x_p,2^{-k}) \text{ is compact}\},$$ where $\bar{B}(x,r)$ is the closed ball with center $x$ and radius $r$. Using the fact that $E$ is locally compact and the density of $(x_p)$ it is easy to see that $$E=\bigcup_{(p,k)\in I} \bar{B}(x_p,2^{-k}).$$
I don't know why the last sentence is true. If I take $x\in E$, then I need to show that $x$ is in some $\bar{B}(x_p,2^{-k})$ for $(p,k)\in I$. Since $E$ is locally compact, I know that there exists $r>0$ such that $\bar{B}(x,r)$ is compact, since $(x_p)$ is dense in $E$, there exist $n$ such that $x_n\in \bar{B}(x,r)$. But this does not get me to where I need to prove.
I appreciate any help!
Let $x\in E$ be given.
Choose $\varepsilon\gt0$ so that $\overline B(x,\varepsilon)$ is compact.
Choose $k\in\mathbb N$ so that $2^{-k}\lt\frac\varepsilon3$.
Choose $p\in\mathbb N$ so that $\operatorname d(x_p,x)\lt2^{-k}$.
Then $x\in\overline B(x_p,2^{-k})\subseteq\overline B(x,\varepsilon)$, so $\overline B(x_p,2^{-k})$ is compact.