Rational functions invariant under a cyclic group