Let $\left(X_{i}\right)_{i}$ be i.i.d. bernoulli random variables. More precisely $\mathbb{P}(X=0)=\mathbb{P}(X=1)=$ 1/2. Let $$ T=\inf \left\{n \geq 4: X_{n-3}=0, X_{n-2}=1, X_{n-1}=0, X_{n}=1\right\} $$
$\text {Find } \mathbb{E}[T] \text { (Hint, you have to find a suitable martingale first!). }$
My attempt:
I am a bit confused with how to go about finding $\mathbb{E}[T]$. This is what I have done so far:
I defined the martingale as such:
$$M_{n}=-n+2^{4} \sum_{k=4}^{n} \mathbf{1}_{A_{k}}+2^{3} \mathbf{1}_{\left\{X_{n-2}=0, X_{n-1}=1, X_{n}=0\right\}}+2^{2} \mathbf{1}_{\left\{X_{n-1}=0, X_{n}=1\right\}}+2 \mathbf{1}_{\left\{X_{n}=0\right\}}$$
I then showed it satisfied the 3 martingale conditions and it has bounded increment as $\left|M_{n+1}-M_{n}\right| \leq 1+2^{4}+2^{3}+2^{2}+2<\infty$
Using the optional stopping theorem, I know $0=\mathbb{E}\left[M_{0}\right]=\mathbb{E}\left[M_{T}\right]$ but I am struggling to find $\mathbb{E}[T]$