Solution (source code)

= Solution

The normalizing constant satisfies
$$
B^{-1}=\sum_{n\in\mathbb Z}e^{-n^2/2}.
$$
For an integer $k$,
$$
\mathbb E[e^{kY}]
=B\sum_{n\in\mathbb Z}e^{kn-n^2/2}
=Be^{k^2/2}\sum_{n\in\mathbb Z}e^{-(n-k)^2/2}.
$$
Translation by the integer $k$ merely permutes the summation indices, so the final sum is $B^{-1}$. Consequently
$$
\boxed{\mathbb E[e^{kY}]=e^{k^2/2}
=\mathbb E[e^{kX}]}.
$$
The last equality uses the <moment-generating function> of the standard normal variable from part (b).