Solution (source code)

= Solution

Condition first on $X$. A <Poisson distribution> with parameter $k$ has conditional <probability generating function> $e^{k(s-1)}$, including the degenerate zero case when $k=0$. The <law of total expectation> gives
$$
G_Z(s)=\mathbb E\bigl[e^{X(s-1)}\bigr]=G_X(e^{s-1})=\boxed{\exp\!\left(\mu\bigl(e^{s-1}-1\bigr)\right)}.
$$
For $0\leq s\leq1$ the inner argument is in $(0,1]$, so this use of the generating function is justified directly. The result is a <compound Poisson distribution> with a <Poisson distribution> of unit parameter for each jump, also called a <Neyman Type A distribution> in this case. It is generally not an ordinary <Poisson distribution>.