A game involves flipping a coin until the first head appears and winning $2^n$ dollars if the first head appears on the $\mathrm{n^{th}}$ coin flip. We want to determine the expected winnings for this game.
Based on my understanding on the problem,
$$\begin{align}&X=\{ \mathrm{Coin\ Flips}\} \sim\mathrm{Geo}(p=0.5) \\ &W=\{\mathrm{Winnings}\}=2^X\\ &E[W]=E[2^X]=\sum_{n=1}^\infty 2^nP(X=n)=\sum_{n=1}^\infty (2^n)(0.5^n)=\sum_{n=1}^\infty 1=\infty \end{align}$$
However, this doesn't sound right to me because we also know that
$$E[X]=\frac{1}{p}=\frac{1}{0.5}=2$$