When is $a^k \pmod{m}$ a periodic sequence? Let $a$ and $m$ be a positive integers with $a < m$.  Suppose that $p$ and $q$ are prime divisors of $m$.  Suppose that $a$ is divisible by $p$ but not $q$.  
Is there necessarily an integer $k>1$ such that $a^k \equiv a \pmod{m}$?  
Or is it that the best we can do is say there are $n>0$ and $k>1$ such that $a^{n+k} \equiv a^n \pmod{m}$
What can be said about $n$ and $k$?
EDIT: Corrected to have $k>1$ rather than $k>0$.
EDIT: The following paper answers my questions about $n$ and $k$ very nicely.
A. E. Livingston and M. L. Livingston, The congruence $a^{r+s} \equiv a^r \pmod{m}$, Amer. Math. Monthly $\textbf{85}$ (1978), no.2, 97-100.
It is one of the references in the paper Math Gems cited. Arturo seems to say essentially the same thing in his answer.

This is related to a question of mine, namely To what divisors $a$ of $n$ can Euler's Theorem multiplied by $a$ be generalized, i.e. when is $a^{\phi(n)+1}\equiv a \pmod n$? and one answer is that $a^k$ and $m=\gcd(a,n)$ must be coprime, where $k=\phi(n)/\phi(m)$.
In your case, $n=pq$ with $p\neq q$ primes and $\gcd(a,n)=p=m$, therefore $k=\frac{\phi(pq)}{\phi(p)}=\frac{(p-1)(q-1)}{p-1} = q-1$, i.e.
$a^{q-1}\equiv a\pmod{pq}$ with $\gcd(a,pq)=p$ iff $a^{q-1}$ and $p$ are coprime or $a\equiv0\pmod{pq}$. Since $p$ divides $a$, the former cannot be the case and therefore the only possible solution is $a\equiv0\pmod{pq}$, which however means $a$ is also divided by $q$ which contradicts your assumption. Therefore, the answer to you question is "No".
