23 Aug 2013
The power series ak = ak is pre-periodic in Z/nZ, and the period must be a divisor of phi(n). here is a simple proof.