Let $(\Omega, \mathcal{F}, P)$ be a probability space and let $X$ be such that; $$P(X=(\frac{3}{2})^n) = 2^{-n}.$$
For $n \geq 1$, define $A_n = {\{X = (\frac{3}{2})^n)}\}$, and let $\mathcal{F_n}$ be the sigma field generated by $A_1, ..., A_n$.
Set $Z_n = E(X|\mathcal{F_n})$. It is easy to show this is a martingale with respect to the sigma field above.
Now, for $n \geq 1$ define $B_n = {\{X > (\frac{3}{2})^n)}\}$, then ${\{A_1, A_2, ..., A_n, B_n}\}$ forms a finite partition of $\Omega$ that generates $\mathcal{F_n}$.
I have shown that $$Z_n = \sum_{k=1}^{n}(\frac{3}{2})^k\cdot I_{A_k} + 2(\frac{3}{2})^{n+1}\cdot I_{B_n}$$
Where $I_{A_k}, I_{B_n}$ are indicator functions.
Define $T =$ min${\{n \geq 1 : Z_n = X}\}$. How do I show that $T = \sum_{n=1}^{\infty} n \cdot I_{A_n}$?
My thoughts are that $X = E[X|\mathcal{F_n}]$, so it is the smallest $n$ such that $X$ is independent of the sigma field, but this is getting me nowhere.
How can we be sure that $T$ is a stopping time? I'm not sure how to show that the events ${\{T \leq n}\} \in \mathcal{F_n}?$
Fix $\omega \in A_m$, i.e. $X(\omega)=\left (\frac{3}{2}\right)^{m}$.
Then by definition $Z_i(\omega)=2\left (\frac{3}{2}\right )^{i+1}$, when $i<m$.
And since $2\left (\frac{3}{2}\right )^{i+1}\neq \left(\frac{3}{2}\right)^{m}$ for $i<m$, we see that $Z_i(\omega)\neq X_m(\omega)$, so we conclude that $T\geq m$.
Also, again, by the formula of $Z_m(\omega)=\left (\frac{3}{2}\right)^{m}$. However, $X(\omega)=\left (\frac{3}{2}\right)^{m}\Rightarrow Z_m(\omega)=X(\omega)$. Consequently, $T(\omega)=m$ when $\omega \in A_m$. Which is exactly what we wanted to show i.e. $T=\sum_{m\geq 1}m1_{A_m}$.
Notice that $\{T\leq n\}= \bigcup_{i=1}^nA_i\in \mathcal{F}_n$.