Solution (source code)

= Solution

The independent identically distributed <sequence> $(X_n)$ is itself a <Markov chain>, since the conditional law of $X_{n+1}$ is its common marginal law and does not depend on the past.

Also,
$$
S_{n+1}=S_n+X_{n+1}.
$$
Because $X_{n+1}$ is independent of the past, the conditional law of $S_{n+1}$ depends on the history only through $S_n$. Thus the partial sums $(S_n)$ are a Markov chain.