How does one determine the length of the smallest period of the following sequence: $f[n] = \left< n \right>_N - \left< n \right>_M$ where $\left_N$ represents $n \pmod N$ and $\left_M$ represents $n \pmod M$. It is clear that $N$ is the period length of the sequence generated by $\left< n \right>_N$ and $M$ is the period length of the sequence generated by $\left_M$. It would not be too difficult to show that $f[n]$ is periodic with $NM$, but this may not be the smallest period.
My initial reaction is that the period length of $f[n]$ is the least common multiple of $N$ and $M$, but how does one go about showing this?