A solution follows, but I encourage you to think about these hints first:
- approximate $y \in D$ by $x$ in the span of the sequence. Now approximate $x$ by something in $A$. By taking both of these near enough, one should obtain an element of $A$ as near to $y$ as desired.
- union of countable sets are countable, so it suffices to show that each $A_n$ is countable. Think about why finite rational sequences are countable.
Let's see that $A$ is dense in $D$. Pick $y \in D$ and $\varepsilon > 0$. By definition of closure, you can take $x \in \langle x_n \rangle_{n \geq 1}$ such that $\|y-x\| < \varepsilon/2$. Now, the element $x$ must be a finite linear combination of terms of this sequence. There must exist then $a_1, \dots, a_n \in \mathbb{R}$ such that
$$
x = a_1x_1 + \cdots a_nx_n. \tag{1}
$$
Think about why this is true: surely $x$ is a linear combination of some terms, so you can "fill the gaps" between these by choosing $a_i = 0$ obtaining $(1)$.
Finally, by density of the rationals, pick rationals $q_1,\dots,q_n$ such that $|q_i-a_i|\|x_i\| < \varepsilon/2n$ so that noting $z = \sum_{i=1}^nq_ix_i$ we have
$$
\|x-z\| = \left\|\sum_{i=1}^n(a_i-q_i)x_i\right\| \leq \sum_{i=1}^n|a_i-q_i|\|x_i\| < \varepsilon/2.
$$
Therefore $z \in A$ and $\|y-z\| \leq \|y-x\| + \|x-z\| < \varepsilon$.
Now let's show that $\#A_n$ is countable. Recall that if $X$ is countable, so is $X^n$. Finally, note that the assignment
$$
(q_1,\dots,q_n) \in \mathbb{Q}^n \mapsto \sum_{i=1}^nq_ix_i \in A_n
$$
is surjective, and so $\aleph_0 = \#\mathbb{Q}^n \geq \#A_n$.
Best Answer
To elaborate on above answer, let $M$ be the set of all sequences $(r_{0}, \ldots, r_{n}, 0,\ldots)$ with $r_{i}$ being rational and $n \in \mathbb{N}$. (This is the set of sequences with finite support and rational entries).
Since $\mathbb{Q}$ is countable and finite product of countable sets is countable and then countable union of countable sets is countable, we see that $M$ is countable.
Now let us see that $M$ is dense in $\ell_{p}(\mathbb{R})$. To do this, given any $x = (x_{n}) \in \ell_{p}(\mathbb{R})$, and for $\epsilon > 0$ we must find an element $y \in M$ such that $d(x,y) <\epsilon$. We have
$$ \sum\limits_{n=0}^{\infty} |x_{n}|^{p} < \infty $$
Hence, given $\epsilon > 0$, there exists $m \in \mathbb{N}$ such that
$$ \sum\limits_{n=m+1}^{\infty} |x_{n}|^{p} < \epsilon/2 $$
Now for $0\leq i \leq m$, choose $r_{i} \in \mathbb{Q}$ such that $|r_{i} - x_{i}| < \left(\frac{\epsilon}{2m}\right)^{\frac{1}{p}}$ (using that the rationals are dense in reals).
Then the element $y = (r_{0}, r_{1}, \ldots, r_{m}, 0, 0, \ldots) \in M$ is the required element.