I'm referencing the solution to this question Expectation of Square of Stopping Time where it says that this function: $S_n^4-6nS_n^2+3n^2$ is a martingale and I'm trying to prove it. Here, $S_n$ is a simple symmetric RW - that is: $S_{n} = \sum_{k=1}^nX_k$ where $X_k$ are i.i.d Bernoulli RVs (support -1 and 1) with probability 1/2.
We need to show: $E[S_{n+1}^4-6(n+1)S_{n+1}^2+3(n+1)^2|\mathscr{F}_n] = S_n^4-6nS_n^2+3n^2$. Here's what I've done so far.
1) $E[S_{n+1}^4|\mathscr{F}_n]=E[(S_{n}+X_{n+1})^4|\mathscr{F}_n] =E[S_n^4+4S_n^3X_{n+1}+4S_nX_{n+1}^3+6S_n^2X_{n+1}^2+X_{n+1}^4|\mathscr{F}_n]=S_n^4+6S_n^2+1$.
2) $E[6(n+1)S_{n+1}^2|\mathscr{F}_n]=6(n+1)E[S_{n+1}^2|\mathscr{F}_n]=6(n+1)(S_n^2+1)$
3) $E[3(n+1)^2|\mathscr{F}_n] = 3(n+1)^2$
1)-2)+3)
$=S_n^4+6S_n^2+1-6[nS_n^2+n+S_n^2+1]+(3n^2+6n+3)$
$ = S_n^4+6S_n^2+1 -6nS_n^2-6n-6S_n^2-6 +(3n^2+6n+3)$
$= S_n^4-6nS_n^2-6n-5+(3n^2+6n+3) $
$=S_n^4-6nS_n^2+3n^2-2$
I've redone this problem several times to try to remove the $-2$ and I can't seem to figure out where my mistake is.