We want to find $\theta \in \mathbb{R}$ such that $(\theta^{S_n})_{n \geq 0 }$ is a martingale under the initial conditions that are stochastic process is a random walk with $P(S_{n+1} = k+2)=0.5$ and P(S_{n+1} = k-1) = 0.5. I am stuck on the algebraic manipulation which I suspect requires some conceptual knowledge to solve for the parameter $\theta$ which satisfies martingale properties.
We can set up the following $$E[\theta^{S_n+1}|F_n] = \frac{1}{2}\theta^{S_n+2}+\frac{1}{2}\theta^{S_n-1}$$
However, how may this simplify to $$=\theta^3-2\theta+1=0$$
Of course, the next idea is to find such an equations roots.