Martingale Hats problem N gentlemen throw their identical bowler hats in a heap and collect them in random order.Those gentlemen who by chance get back their own hats happily go home.The remaining ones yet again throw their hats in a heap and collect them randomly.
Those who get back their own hats happily go home.. . . The procedure continues till all gentlemen go home with their own hats on. 
We define as $X_{n}=\text{the number of bowler hats that remain in the heap after the n time that gentlemen chose in random hats} $( which we don't know if it is a martingale)
and as $T=\inf\left\{k\geq 0:X_{k}=0\right\}$ the stopping time that indicates the number of times that we need until everyone goes home.
Also we introduce $M_{n}=X_{n\wedge T}+n\wedge T$ and we to prove that is martingale .
I have a really hard time to prove that $\mathbb{E}[M_{n}|\mathcal{F_{n-1}}]=M_{n-1}$
I've tried to split $M_{n}$ in the expectation with the indicators $\mathcal{1}_\left\{n< T\right\}$  , $\mathcal{1}_\left\{n\geq T\right\}$ but it doesn't work.I also tried 
$\mathbb{E}[M_{n}-M_{n-1}|\mathcal{F}_{n-1}]=0$ but it doesn't help.
Any idea or advise would be really helpful!
 A: I'm not sure why you lost faith in your indicator approach, but I think it should work.
\begin{align*}
  \mathbb E[M_{n+1} \mid \mathcal F_n] &= \mathbb E[ M_{n+1} \mathcal 1_{\{n \geq T\}} + M_{n+1} \mathcal 1_{\{n < T\}} \mid \mathcal F_n] \\
&= \mathbb E[M_{n+1} \mid \mathcal F_n] \mathcal 1_{\{n \geq T\}} + \mathbb E[M_{n+1} \mid \mathcal F_n] \mathcal 1_{\{n < T\}}
\end{align*}
For the left term: on this event, the process has ended and we will have $M_{n+1} = X_T + T$. For the right term: here, the process has not ended and there is at least one more round to play. This problem is equivalent to the expected number of fixed points of a random permutation of size $X_n$, and that expectation is $1$ regardless of the size of $X_n$ (see here for a solution for that sub-problem). Thus, 
$$\mathbb E[X_{n+1} \mid \mathcal F_n] = X_n - 1$$
on the event that $n < T$. Putting it all together:
\begin{align*}
\mathbb E[M_{n+1} \mid \mathcal F_n] &= (X_T + T)\mathcal 1_{\{n \geq T\}} + [(X_n - 1) + (n+1)] \mathcal 1_{\{ n < T\}} \\
&= (X_{T \wedge n} + T \wedge n) \mathcal 1_{\{n \geq T\}}  + [X_{n \wedge T} + n \wedge T] \mathcal 1_{\{n < T\} }
\end{align*}
as desired.
