Solution (source code)

= Solution

Set $Y_n=\log Z_n$ and
$$
\mu_*=\log(1+r)-\frac{\sigma^2}{2},
\qquad
\theta=\frac{\mu_*-\mu}{\sigma^2}.
$$
Define a probability measure $\mathbb P^*$ by the positive density
$$
\frac{d\mathbb P^*}{d\mathbb P}
=\prod_{k=1}^T
\exp\left\{
\theta(Y_k-\mu)-\frac12\theta^2\sigma^2
\right\}.
$$
The density has expectation one and is strictly positive, so $\mathbb P^*$ is equivalent to $\mathbb P$. By <exponential tilting>, the variables $Y_k$ remain independent under $\mathbb P^*$ and have distribution $N(\mu_*,\sigma^2)$. Thus $Z_k$ has a <log-normal distribution> and
$$
\mathbb E^*Z_k
=\exp\left(\mu_*+\frac{\sigma^2}{2}\right)
=1+r.
$$
For the discounted stock $\widetilde S_n=S_n/S_n^0$,
$$
\mathbb E^*(\widetilde S_n\mid\mathcal F_{n-1})
=\widetilde S_{n-1}\frac{\mathbb E^*Z_n}{1+r}
=\widetilde S_{n-1}.
$$
\b[Hence $\mathbb P^*$ is an <equivalent martingale measure>.]