Possible Duplicate:
A cyclic subsemigroup of a semigroup S that is a group
My homework: An element $s^{i+k}$ on the cycle is idempotent iff
$$ s^{i+k} = s^{2i+2k} ,$$
or equivalently
$$ i+k = 2i+2k \pmod p .$$
I'm stuck here (this is my first modulo equation).
Also, is there algebraic proof, not referring to semigroup structure depicted on Figure 1?