I am trying to prove that in RSA,
if choose any number $M < n$ and repeatedly calculate the exponentiation repeatedly i.e. $M^1 \bmod n, M^2 \bmod n,\cdots,M^i \bmod n,\dots$, it will generate the complete set $\{0,1,2, \cdots, n-1\}$.
Is there anyone can show me the prove or give me some hints ?
Are you sure your statement is correct?
Take $n=15$ (a valid RSA modulus), $M=6$, then all powers of $M$ are still $6$..., and for $M=2$ we only get $1,2,4,8$ as powers, etc.
You might be after the cycling atack on RSA: if $(n,e)$ is an RSA public key( so the encryption function $E$ is is $E(x) = x^e \pmod{n}$), and we have a cipher text $c$, we keep computing $x_0 = c$, $x_{n+1} = E(x_n)$ until $E(x_m) = c$ for some $m$ and then the plaintext was $x_{m-1}$. This isn't practical for large and well-constructed $n$ but is based on a cyclic property of the exponentiation.
See here for a fuller discussion.