Let $\Omega = [0,1]$, $\mathcal{F} = \mathcal{B}(0,1)$, P=Lebesgue measure and $X_{n}$ is a random variable defined as $X_n(w)= \begin{cases} 0 \quad \frac{1}{n} < w \leq 1 \\ n-n^2w \quad 0 \leq w \leq \frac{1}{n} \end{cases}$
and $F_n=\sigma(X_{1},...,X_{n})$ is the sigma algebra generated by $X_{1},...,X_{n}$
I want to prove that $X_n$ is a martingale, I succeeded in proving the first 2 statements of the definition but I've problems with the Martingale property $E(X_{n+1}|F_{n})=X_n$.
$(X_n)_{n\in\mathbb{N}}$ is not a Martingale:
Let $n\geq1$. Then $X_n^{-1}((n-n^2\frac{1}{n+1},\infty))=[0,\frac{1}{n+1})\in\sigma(X_n)$. Now we compute \begin{align*} \mathbb{E}\left(\mathbb{1}_{[0,\frac{1}{n+1})}(X_{n+1}-X_n)\right)&=\int_0^{\frac{1}{n+1}}n+1-(n+1)^2t-(n-n^2t)\text{ dt}\\ &=\int_0^{\frac{1}{n+1}}1-(2n+1)t\text{ dt}\\ &=\left[t-\frac{2n+1}{2}t^2 \right]_0^\frac{1}{n+1}\\ &=\frac{1}{n+1}-\frac{2n+1}{2(n+1)^2}\\ &= \frac{1}{2(n+1)^2}\\ &\neq 0 \end{align*}