In probability, a martingale is given by a sequence of integrable 
 random variables $(S\_n)$ and an increasing sequence of 
 $\sigma$-algebras ${\cal F}\_n$ such that
 $S\_n$ is ${\cal F}\_n$-measurable and 
 $E(S\_{n+1} \mid {\cal F}\_n) = S\_{n}$.

This is an important notion because there are many results concerning
 convergence of martingales sequences, e.g. if it is bounded in $L^2$
 then it converges in $L^2$ norm and $a.e.$

If $X\_i$ is a sequence of i.i.d. random variables and 
 ${\cal F}\_n = \sigma(X\_i, i\leq n)$, then the following sequences 
 are martingales:

* $S\_n - E(S\_n)$,
* $ \exp(S\_n)/E(\exp(S\_n))$,
* $(S\_n)^2-E(S\_n^2)$,

These are used in the theory of random walks to compute e.g. the mean time before reaching a given state.

Are there any other interesting examples of discrete time martingales?