Let $(S_n)_{n\geq 0}$ be the simple symmetric random walk in $\mathbb{Z}$:
$$\begin{cases} S_0=0 \\ S_n = X_1 +\dots + X_n ; n>0 \end{cases} $$
where $(X_i)_{i\geq 1}$ is an i.i.d. sequence with $\mathbb{P}(X_1=-1)=\mathbb{P}(X_1=1)=1/2$. Let $(\mathcal{F}_n) = \sigma(S_j, 0 \leq j \leq n)$. Recall that $(S_n)$ is a $(\mathcal{F}_n)$-martingale.
- Show that $({S_n}^2 - n )$ is a martingale w.r.t. $(\mathcal{F}_n)$ for $n \geq 0$
- Let $P(x,y)$ be a polynomial in two variables. Show that $(P(S_n,n))$ is a $(\mathcal{F}_n)$-martingale, if for all $k, n \in \mathbb{Z}$ we have $$P(k+1,n+1)-2P(k,n)+P(k-1, n+1) = 0$$
I solved part 1 but now I am struggling with 2 as I don't understand how to approach the problem for the proof of the martingale property. Any hints or suggestions?