Known dense subset of Schwartz-like space and $C_c^{\infty}$? After reading this question, which asked for some examples of commonly used (proper) dense subsets of $C_0^{\infty}(\mathbb{R}^n)$ with the $L^p$-norm I wonder.  What are some "well-known" examples of countable subsets of $X\subseteq C_c^{0} \cap \mathscr{S}(\mathbb{R}^n)$ (the Schwartz space) for which

*

*$X$ is dense in $C_c^{0}$ for the topology generated by the sup-norm $\sup_{x \in \mathbb{R}^n} \|f(x)\|$

*$X$ is dense in $\mathscr{S}(\mathbb{R}^n)$ for the topology generated by the semi-norms
$
p_{\alpha,\beta,K}(f):=\sup_{x\in K} \|x\|^\alpha \left\|  (D^{\beta} f)(x) \right\|
.
$
 A: I don't know about "well known" or canonical answers to this question, but it is easy to construct an $X$ that works as follows.
Using the definition of Hermite polynomials given by
$$
H_n(x)=(-1)^n e^{x^2}\left(\frac{d}{dx}\right)^n e^{-x^2}\ ,
$$
we define the one-dimensional Hermite functions
by
$$
h_n(x)=\pi^{-\frac{1}{4}} 2^{-\frac{n}{2}} n!^{-\frac{1}{2}} e^{-\frac{x^2}{2}} H_n(x)
$$
and then the $d$-dimensional Hermite functions by
$$
h_{\alpha}(x_1,\ldots,x_d)=h_{\alpha_1}(x_1)\cdots h_{\alpha_d}(x_d)
$$
for every multiindex $\alpha$.
These functions form an orthonormal basis for the Hilbert space $L^2(\mathbb{R}^d)$ as well as as an unconditional Schauder basis of Schwartz space $\mathscr{S}(\mathbb{R}^d)$.
Clearly, finite linear combinations of the $h_{\alpha}$ with rational coefficients is a countable dense subset of $\mathscr{S}(\mathbb{R}^d)$. To simultaneously satisfy the other condition one can pick a smooth cutoff function $\rho:\mathbb{R}^d\rightarrow [0,1]$, constant equal to $1$ on the ball $B(0,1)$ and equal to zero outside the ball $B(0,2)$. Now take previous linear combinations and multiply them by $x\mapsto \rho(\frac{1}{k}x)$, for $k=1,2,\ldots$ This will give a set $X$ that fulfills the two requirements.
