Solution (source code)

= Solution
{c}

For a nonnegative integer-valued <random variable>, its <probability generating function> is
$$
\boxed{G(s)=\mathbb E[s^X]=\sum_{j=0}^\infty p(j)s^j.}
$$
The convention $s^0=1$, including at $s=0$, gives $G(0)=p(0)$. The <power series> has <absolute convergence> for every real $|s|\leq1$, since $\sum_jp(j)|s|^j\leq1$. More generally its real domain as a finite <expected value> is $\{s\in\mathbb R:\sum_jp(j)|s|^j<\infty\}$, which may extend beyond $[-1,1]$. No extension beyond that guaranteed <interval> is automatic.