1 | initial version |
Consider the situation:
sage: M4 = EisensteinForms( Gamma0(1), weight=4 )
sage: M6 = EisensteinForms( Gamma0(1), weight=6 )
sage: M4
Eisenstein subspace of dimension 1 of Modular Forms space of dimension 1 for Modular Group SL(2,Z) of weight 4 over Rational Field
sage: M6
Eisenstein subspace of dimension 1 of Modular Forms space of dimension 1 for Modular Group SL(2,Z) of weight 6 over Rational Field
sage: e4 = M4.0
sage: e6 = M6.0
sage: e4
1 + 240*q + 2160*q^2 + 6720*q^3 + 17520*q^4 + 30240*q^5 + O(q^6)
sage: e6
1 - 504*q - 16632*q^2 - 122976*q^3 - 532728*q^4 - 1575504*q^5 + O(q^6)
So the coefficients of the expansions are available. To have more of them, set a corresponding precision:
sage: e4.q_expansion(prec=10)
1 + 240*q + 2160*q^2 + 6720*q^3 + 17520*q^4 + 30240*q^5 + 60480*q^6 + 82560*q^7 + 140400*q^8 + 181680*q^9 + O(q^10)
sage: e6.q_expansion(prec=10)
1 - 504*q - 16632*q^2 - 122976*q^3 - 532728*q^4 - 1575504*q^5 - 4058208*q^6 - 8471232*q^7 - 17047800*q^8 - 29883672*q^9 + O(q^10)
The coefficients can also be calculated via the formula in
https://en.wikipedia.org/wiki/Eisenstein_series#Fourier_series
So we can also ask for them separately, for instance to get $29883672$, the last coefficient above, we may ask for
sage: sum( [d^5 for d in 9.divisors()] ) * 504
29883672
Evaluations can be done numerically up to some precision. For instance:
sage: e4.qexp(prec=100).polynomial()(exp(2*pi*i * 2*i)).n()
1.00083698724053
sage: e6.qexp(prec=100).polynomial()(exp(2*pi*i * 2*i)).n()
0.998242175959214
For more (specific issues) we need more (specific) input.