Approximating a continuous function on a positive interval with a series with arbitrary prescribed powers? This relates to a recent question which asked whether it was possible to approximate $\cos x$ with a series for an odd function (series with odd-powered terms). It occurred to me the answer maybe yes is we restricted to a finite positive interval and ask for approximation instead of absolute equality.
So here's my question. Suppose we have a pretty nice function $f$ (say, continuous) defined on a positive interval $[a,b]$ ($a,b > 0$). Suppose also we are told an infinite sequence of which powers $0 \leq n_1 < n_2 < n_3 < \ldots$ we are allowed to use (all $n_j$ non-negative integers). For $\epsilon > 0$, can we find coefficients $a_{n_j}$ defining a series
$$\hat{f}(x) = \sum_j a_{n_j} x^{n_j}$$
so that $||f-\hat{f}||_\infty < \epsilon$, where the $L_\infty$ distance is computed over the interval $[a,b]$? If we can't, then are there restrictions on $a,b$ and the sequence of powers which makes it possible, such as $\sum_j 1/n_j$ diverges, and/or $a,b$ are both greater than $1$ or both less than $1$? Or maybe also/alternatively changing the norm for the approximation error?
 A: If we have a sequence $0 \leqslant n_1 < n_2 < n_3 < \dotsc$ of admissible exponents (not necessarily integers), then the linear subspace of $C([a,b])$, for $0 < a < b$, generated by the functions $t\mapsto t^{n_k}$ is dense if and only if
$$\sum_{k=2}^\infty \frac{1}{n_k} = \infty.\tag{1}$$
If the lower bound of the interval is $a = 0$, then $n_1 = 0$ is necessary.
If $a > 0$ and $n_1 > 0$, the function $\psi \colon t \mapsto t^{-n_1}$ is continuous, bounded, and bounded away from zero, so $f$ can be uniformly approximated by a linear combination of the $t^{n_k}$ if and only if $f\cdot \psi$ can be uniformly approximated by a linear combination of the $t^{n_k-n_1}$, and $(1)$ isn't changed by substituting $n_k$ with $n_k - n_1$.
So we can, without loss of generality assume that $n_1 = 0$.
Then a small variation of the proof of the Müntz-Szasz theorem given in Rudin, Real And Complex Analysis, 15.26, pp. 313/314 in the third edition, namely replacing the function
$$f(z) = \int_{[0,1]} t^z \,d\mu(t)$$
by
$$\tilde{f}(z) = b^{-z}\int_{[a,b]} t^z\,d\mu(t)$$
for a complex Borel measure $\mu$ on $[a,b]$ that annihilates all $t^{n_k}$, yields the result that the closure of the subspace generated by the $t^{n_k}$ contains all $t^k$ and hence all polynomials, and by Weierstraß' theorem all of $C([a,b])$.
A: The same sort of argument about positive and negative powers applies.  The Legendre polynomials are orthonormal and complete on $[-1,1]$, which says that you can't approximate any one of them well in terms of the rest.  Using linear algebra techniques, you can change the basis to the monomials in $x$.  The (finite approximation to the) transformation matrix is even triangular, so easy to invert.
