Revision history [back]

You can get the associated formal power series as follows:

sage: g
q - 3*q^2 + 5*q^4 - 7*q^7 - 3*q^8 + 9*q^9 - 6*q^11 + 21*q^14 - 11*q^16 - 27*q^18 + O(q^20)
sage: parent(g)
Cuspidal subspace of dimension 1 of Modular Forms space of dimension 3, character [-1] and weight 3 over Rational Field
sage: g.q_expansion()
q - 3*q^2 + 5*q^4 - 7*q^7 - 3*q^8 + 9*q^9 - 6*q^11 + 21*q^14 - 11*q^16 - 27*q^18 + O(q^20)
sage: parent(_)
Power Series Ring in q over Rational Field