Problem: Let $X$ random variables. Let $g$ be the generating probability function of $X$ $$g(s) = E[s^X] = \sum_{n\ge0}s^n\mathbb{P}[X=n].$$ Show that $g(s)$ is continuous on $[0,1]$.
My attempt: Let $(s_k)$ be a sequence in $[0,1]$ such that $\lim_{k\to \infty} s_k = s$. We prove that $$\lim_{k\to \infty} g(s_k) = g(s).$$ Indeed, we have $$g(s_k) = \sum_{n\ge0}s_k^n\mathbb{P}[X=n].$$ Hence we have $$\lim_{k \to \infty} g(s_k) = \lim_{k \to \infty}\sum_{n\ge0}s^n\mathbb{P}[X=n].$$ Now, if I can bring the limit into the infinite sum then the problem will be solved, but I wonder whether I can do that and if there is any condition to bring the limit into the infinite sum.