The Muntz-Szász theorem (henceforth, MST) states that if $V$ is a set of positive integers, then $\sum_{v\in V}\frac{1}{v}=\infty$ if and only if $\textrm{span}_{\mathbb{C}}\left(\left\{ 1\right\} \cup\left\{ x^{v}:v\in V\right\} \right)$ is dense in $\mathscr{C}\left(\left[0,1\right],\mathbb{C}\right)$, the banach space of continuous functions $f:\left[0,1\right]\rightarrow\mathbb{C}$ under the norm: $$\left\Vert f\right\Vert _{\infty}=\underset{x\in\left[0,1\right]}{\sup}\left|f\left(x\right)\right|$$
In working with the MST, I've been getting a little confused by something. As an illustrative example, let's consider the case where $V=P$, the set of prime numbers (it is a result of Euler's that $\sum_{p\in P}\frac{1}{p}=\infty$). So, consider a polynomial such as $\varphi\left(x\right)=x+x^{2}$ which contains a power of $x$ not present in $P$. This is most definitely a function in $\mathscr{C}\left(\left[0,1\right],\mathbb{C}\right)$, and yet, I am troubled by the notion that there exists a sequence of functions $\varphi_{n}$ in $\textrm{span}_{\mathbb{C}}\left(\left\{ 1\right\} \cup\left\{ x^{p}:p\in P\right\} \right)$ which converge to $\varphi$ under the $\infty$-norm (i.e., converge uniformly to $\varphi$ on $\left[0,1\right]$). Let's write these functions as power series: $$\varphi_{n}\left(x\right)=\sum_{p\in P}c_{n,p}x^{p}$$ where, for each $n$, all the complex numbers $c_{n,p}$ are equal to $0$ for all but finitely many $p$.
Now, here's the line of reasoning that's been bothering me. Because spans are defined as finite linear combinations, each function in $\mathcal{P}$ (and hence, all the $\varphi_{n}$s) is a polynomial, and hence, is analytic on not only $\left[0,1\right]$, but the open unit disk $\mathbb{D}$, as well. Unless I'm misremembering my undergraduate (complex) analysis, if I recall correctly, a sequence of analytic functions that converges uniformly to a limit function necessarily converges to an analytic limit function (right?). But then: $$x+x^{2}=\lim_{n\rightarrow\infty}\sum_{p\in P}c_{n,p}x^{p}=\sum_{p\in P}\left(\lim_{n\rightarrow\infty}c_{n,p}\right)x^{p},\textrm{ }\forall x\in\left[0,1\right]$$ which is impossible: the series on the far right does not contain $x=x^{1}$, since $1\notin P$.
Obviously, I must have made a mistake somewhere, but I can't quite figure out where or how. An explanation of what I'm doing wrong would be most appreciated.
Thanks in advance!
I think the mistake in your proof is carrying the limit through the infinite sum.
The approximation of $x^m$ (and $x^1$) is effectively at the heart of Muntz-Szasz theorem. The proofs tend to be nontrivial except in special cases. In your case we can easily prove Muntz's theorem, assuming that $\lambda_i$ are distinct positive real numbers (which is true in the case of primes). This special case proof is originally due to Golitschek using a very clever choice of polynomials:
Fix $m$ such that $m\neq \lambda_k$. Now define $Q_0(x):=x^m$, and for $n=1,2,...$:
$$Q_n(x):=(\lambda_n-m)x^{\lambda_n}\int_x^1Q_{n-1}(t)t^{-(1+\lambda_n)}dt.$$
Using induction it's not hard to show that:
$$Q_n(x)=x^m-\sum_{i=0}^nc_{n,i}x^{\lambda_i}.$$
Moreover, $\|Q_0\|_\infty=1$, and $\|Q_n\|_\infty\leq |1-m/\lambda_n|\cdot\|Q_{n-1}\|_\infty,$
so that:
$$\|Q_n\|_\infty\leq \prod_{i=0}^n|1-m/\lambda_i|,$$
and if we take the limit in $n\rightarrow\infty$, the right side goes to 0.
In this way we can approximate any term of the form $x^m$, so the Weierstrass approximation theorem finishes the proof.