Here's an exercise in An Intermediate Course in Probability by Gut.
The probability generating function (pgf) of a nonnegative integer-valued random variable $Y$ is $g_Y(t)=Et^Y$, and the pgf of a sum $S_N$ of a random number $N$ of i.i.d. random variables $X_1,X_2,\ldots$ is $g_{S_N}(t)=g_N(g_X(t))$.
Exercise 6.2 Consider a game of roulette and [someone] who bets one dollar until number $13$ appears, with the roulette wheel having numbers $0,\ldots,36$. Then [they bet] one dollar the same number of times on number $36$. Find the pgf of [their] loss in the second round. Try also finding the pgf for [their] overall loss.
Here's my attempt. Let $N\in \text{Fs}(1/37)$ be the number of bets on number $13$ (here $\text{Fs}(1/37)$ is the geometric distribution that models the first success), and let $Y_1,Y_2,\ldots$ be the losses in the bets on number $36$. Thus $$Y_k=\begin{cases} 1,&\text{if number 36 does not appear}\\ -35&(\text{i.e.} -36+1)\quad\text{otherwise},\end{cases}$$and $Y_1,Y_2,\ldots$ are independent with $P(Y_k=1)=36/37$ and $P(Y_k=-35)=1/37$ (note that a negative loss is a gain).
So the player's loss in the second round equals $X=Y_1+\ldots +Y_N$. We know the generating function of $X$ is $g_X(t)=g_N(g_Y(t))$. Computing the generating function of the geometric distribution is straightforward; it is $\frac{tp}{1-(1-p)t}$ where $p=1/37$. But what is the pgf of $Y$? $Y$ seems to be both positive and negative, and hence I'm confused if it even has a pgf.
The total loss is $X+N-36$, but from the first part I am unsure how to find the pgf of this random variable.