Let $X_k$ be iid with $P(X_k=1)=p$, $P(X_k=-1)=q$, where $p\ne q$. Now define $S_n=\sum\limits^n_{k=1}X_k$ with $S_0=0$ and Y'_n=S^2_n, and Y_n=Y'_n-\alpha_n =S^2_n-\alpha_n, we want to find $\alpha_n$ such that $Y_n$ is a martingale.
I found $\alpha_n=1+2S_n(p-q)$ but according to Doob's decomposition the compensator should be $F_{n-1}$ measurable, but we don't have that here.
Thanks.