Sequence of $C^2$ function with compact support generating borel-sigma-algebra. I'm looking for a sequence of functions $(f_n)_{n\geq 0}$ all $\mathbb{R} \mapsto\mathbb{R}$, twice continuously differentiable and with compact support such that the sigma-algebra generated by them is the borel sigma-algebra on $\mathbb{R}$.
Does anyone know of a such?
 A: For rationals $a,b$ and a positive integer $n$, let $f_{a,b,n}$ be a $C^2$ function which is $1$ on the interval $[a,b]$ and $0$ outside $(a-\frac{1}{n}, b+\frac{1}{n})$.  As $n \to \infty$, $f_{a,b,n} \to 1_{[a,b]}$ pointwise, so any $\sigma$-algebra that makes all the $f_{a,b,n}$ must contain all the rational intervals $[a,b]$, and hence all the Borel sets.  So the countable set $\{f_{a,b,n} : a,b \in \mathbb{Q}, n \in \mathbb{N}\}$ generates the Borel $\sigma$-algebra.  You can re-index to make it into a sequence if you really want.
There are lots of other possibilities.  It's worth noting that you could replace $C^2$ by $C^\infty$ by a convolution argument.
A: First, show that given numbers $a<b$, we can find a smooth function with compact support $f$ such that $0\leqslant f\leqslant 1$ and $f^{-1}(\{1\})=[a,b]$.
Once this step is done, consider for rationals $r<r'$ a corresponding function $f_{r,r'}$. Then the $\sigma$-algebra generated by $\{f_{r,r'}\}$ is contained in the Borel $\sigma$-algebra and contains intervals $[r,r']$, hence intervals. 
