  For even dimensional manifolds, we prove some twisted anomaly cancellation
formulas which generalize some well-known cancellation formulas. For odd
dimensional manifolds, we obtain some modularly invariant characteristic forms
by the Chern-Simons transgression and we also get some twisted anomaly
cancellation formulas.
