  In this paper we study the generating function f(t) for the sequence of the
moments \int_{\gamma}P^i(z)q(z)d z, i\geq 0, where P(z),q(z) are rational
functions of one complex variable and \gamma is a curve in C. We calculate an
analytical expression for f(t) and provide conditions implying the rationality
and the vanishing of f(t). In particular, for P(z) in generic position we give
an explicit criterion for a function q(z) to be orthogonal to all powers of
P(z). Besides, we prove a stronger form of the Wermer theorem, describing
analytic functions satisfying \int_{S^1}h^i(z)g^j(z)g'(z)d z=0, i\geq 0, j\geq
0, in the case where the functions h(z),g(z) are rational. We also generalize
the theorem of Duistermaat and van der Kallen about Laurent polynomials L(z)
whose integral positive powers have no constant term, and prove other results
about Laurent polynomials L(z),m(z) satisfying \int_{S^1}L^i(z)m(z)d z=0, i\geq
i_0.

Complex Variables;Dynamical Systems