An Eisenstein series.
EXAMPLES:
sage: E = EisensteinForms(1,12)
sage: E.eisenstein_series()
[
691/65520 + q + 2049*q^2 + 177148*q^3 + 4196353*q^4 + 48828126*q^5 + O(q^6)
]
sage: E = EisensteinForms(11,2)
sage: E.eisenstein_series()
[
5/12 + q + 3*q^2 + 4*q^3 + 7*q^4 + 6*q^5 + O(q^6)
]
sage: E = EisensteinForms(Gamma1(7),2)
sage: E.set_precision(4)
sage: E.eisenstein_series()
[
1/4 + q + 3*q^2 + 4*q^3 + O(q^4),
1/7*zeta6 - 3/7 + q + (-2*zeta6 + 1)*q^2 + (3*zeta6 - 2)*q^3 + O(q^4),
q + (-zeta6 + 2)*q^2 + (zeta6 + 2)*q^3 + O(q^4),
-1/7*zeta6 - 2/7 + q + (2*zeta6 - 1)*q^2 + (-3*zeta6 + 1)*q^3 + O(q^4),
q + (zeta6 + 1)*q^2 + (-zeta6 + 3)*q^3 + O(q^4)
]
Return the conductor of self.chi().
EXAMPLES:
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].L()
17
Return the conductor of self.psi().
EXAMPLES:
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].M()
1
Returns the list coefficients of of the power series of self,
for
in the list
. The results are not cached. (Use
coefficients for cached results).
General case (except weight 2, trivial character, where this
is wrong!) is a primitive character of conductor
is a primitive character of conductor
We have
, and
with if
, and
if
(that
second
is an
-function
).
EXAMPLES:
sage: e = DirichletGroup(11).gen()
sage: f = EisensteinForms(e, 3).eisenstein_series()[0]
sage: f._EisensteinSeries__compute_general_case([1])
[1]
sage: f._EisensteinSeries__compute_general_case([2])
[4*zeta10 + 1]
sage: f._EisensteinSeries__compute_general_case([0,1,2])
[15/11*zeta10^3 - 9/11*zeta10^2 - 26/11*zeta10 - 10/11, 1, 4*zeta10 + 1]
Compute coefficients for self an Eisenstein series of the form
. Computes
for each
.
EXAMPLES:
sage: EisensteinForms(14,2).eisenstein_series()[0]._EisensteinSeries__compute_weight2_trivial_character([0])
[1/24]
sage: EisensteinForms(14,2).eisenstein_series()[0]._EisensteinSeries__compute_weight2_trivial_character([0,4,11,38])
[1/24, 1, 12, 20]
Return defining parameters for self.
EXAMPLES:
sage: EisensteinForms(11,2).eisenstein_series()[0]._EisensteinSeries__defining_parameters()
(-1/24, [1], [1], Rational Field, 2, 11, 1, 1)
An Eisenstein series.
EXAMPLES:
sage: E = EisensteinForms(1,12) ## indirect doctest
sage: E.eisenstein_series()
[
691/65520 + q + 2049*q^2 + 177148*q^3 + 4196353*q^4 + 48828126*q^5 + O(q^6)
]
sage: E = EisensteinForms(11,2)
sage: E.eisenstein_series()
[
5/12 + q + 3*q^2 + 4*q^3 + 7*q^4 + 6*q^5 + O(q^6)
]
sage: E = EisensteinForms(Gamma1(7),2)
sage: E.set_precision(4)
sage: E.eisenstein_series()
[
1/4 + q + 3*q^2 + 4*q^3 + O(q^4),
1/7*zeta6 - 3/7 + q + (-2*zeta6 + 1)*q^2 + (3*zeta6 - 2)*q^3 + O(q^4),
q + (-zeta6 + 2)*q^2 + (zeta6 + 2)*q^3 + O(q^4),
-1/7*zeta6 - 2/7 + q + (2*zeta6 - 1)*q^2 + (-3*zeta6 + 1)*q^3 + O(q^4),
q + (zeta6 + 1)*q^2 + (-zeta6 + 3)*q^3 + O(q^4)
]
Compute the coefficients of of the power series of self,
for
in the list
. The results are not cached. (Use
coefficients for cached results).
EXAMPLES:
sage: e = DirichletGroup(11).gen()
sage: f = EisensteinForms(e, 3).eisenstein_series()[0]
sage: f._compute([3,4,5])
[-9*zeta10^3 + 1,
16*zeta10^2 + 4*zeta10 + 1,
25*zeta10^3 - 25*zeta10^2 + 25*zeta10 - 24]
Compute the q-expansion of self to precision prec.
EXAMPLES:
sage: EisensteinForms(11,2).eisenstein_series()[0]._compute_q_expansion(10)
5/12 + q + 3*q^2 + 4*q^3 + 7*q^4 + 6*q^5 + 12*q^6 + 8*q^7 + 15*q^8 + 13*q^9 + O(q^10)
Return the character associated to self.
EXAMPLES:
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].character()
[zeta16]
sage: chi = DirichletGroup(7)[4]
sage: E = EisensteinForms(chi).eisenstein_series() ; E
[
-1/7*zeta6 - 2/7 + q + (2*zeta6 - 1)*q^2 + (-3*zeta6 + 1)*q^3 + (-2*zeta6 - 1)*q^4 + (5*zeta6 - 4)*q^5 + O(q^6),
q + (zeta6 + 1)*q^2 + (-zeta6 + 3)*q^3 + (zeta6 + 2)*q^4 + (zeta6 + 4)*q^5 + O(q^6)
]
sage: E[0].character() == chi
True
sage: E[1].character() == chi
True
TESTS:
sage: [ [ f.character() == chi for f in EisensteinForms(chi).eisenstein_series() ] for chi in DirichletGroup(17) ]
[[True], [], [True, True], [], [True, True], [], [True, True], [], [True, True], [], [True, True], [], [True, True], [], [True, True], []]
sage: [ [ f.character() == chi for f in EisensteinForms(chi).eisenstein_series() ] for chi in DirichletGroup(16) ]
[[True, True, True, True, True], [], [True, True], [], [True, True, True, True], [], [True, True], []]
Return the parameter chi associated to self.
EXAMPLES:
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].chi()
[zeta16]
Return level at which self is new.
EXAMPLES:
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].level()
17
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].new_level()
17
sage: [ [x.level(), x.new_level()] for x in EisensteinForms(DirichletGroup(60).0^2,2).eisenstein_series() ]
[[60, 2], [60, 3], [60, 2], [60, 5], [60, 2], [60, 2], [60, 2], [60, 3], [60, 2], [60, 2], [60, 2]]
Return chi, psi, and t, which are the defining parameters of self.
EXAMPLES:
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].parameters()
([zeta16], [1], 1)
Return the parameter psi associated to self.
EXAMPLES:
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].psi()
[1]
Return the parameter t associated to self.
EXAMPLES:
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].t()
1
An element of a space of modular forms.
INPUT:
OUTPUT:
EXAMPLES:
sage: M = ModularForms(Gamma0(11),2)
sage: f = M.0
sage: f.parent()
Modular Forms space of dimension 2 for Congruence Subgroup Gamma0(11) of weight 2 over Rational Field
Calculate the product self * other.
An example with character:
sage: f = ModularForms(DirichletGroup(3).0, 3).0
sage: f * f
1 + 108*q^2 + 144*q^3 + 2916*q^4 + 8640*q^5 + O(q^6)
sage: (f*f).parent()
Modular Forms space of dimension 3 for Congruence Subgroup Gamma0(3) of weight 6 over Rational Field
sage: (f*f*f).parent()
Modular Forms space of dimension 4, character [-1] and weight 9 over Rational Field
An example without:
sage: f = ModularForms(Gamma1(3), 5).0
sage: f*f
1 - 180*q^2 - 480*q^3 + 8100*q^4 + 35712*q^5 + O(q^6)
sage: (f*f).parent()
Modular Forms space of dimension 4 for Congruence Subgroup Gamma1(3) of weight 10 over Rational Field
Add self to other.
EXAMPLES:
sage: f = ModularForms(DirichletGroup(17).0^2,2).2
sage: g = ModularForms(DirichletGroup(17).0^2,2).1
sage: f
q + (-zeta8^2 + 2)*q^2 + (zeta8 + 3)*q^3 + (-2*zeta8^2 + 3)*q^4 + (-zeta8 + 5)*q^5 + O(q^6)
sage: g
1 + (-14/73*zeta8^3 + 57/73*zeta8^2 + 13/73*zeta8 - 6/73)*q^2 + (-90/73*zeta8^3 + 64/73*zeta8^2 - 52/73*zeta8 + 24/73)*q^3 + (-81/73*zeta8^3 + 189/73*zeta8^2 - 3/73*zeta8 + 153/73)*q^4 + (72/73*zeta8^3 + 124/73*zeta8^2 + 100/73*zeta8 + 156/73)*q^5 + O(q^6)
sage: f+g ## indirect doctest
1 + q + (-14/73*zeta8^3 - 16/73*zeta8^2 + 13/73*zeta8 + 140/73)*q^2 + (-90/73*zeta8^3 + 64/73*zeta8^2 + 21/73*zeta8 + 243/73)*q^3 + (-81/73*zeta8^3 + 43/73*zeta8^2 - 3/73*zeta8 + 372/73)*q^4 + (72/73*zeta8^3 + 124/73*zeta8^2 + 27/73*zeta8 + 521/73)*q^5 + O(q^6)
Computes the q-expansion of self to precision prec.
EXAMPLES:
sage: f = EllipticCurve('37a').modular_form()
sage: f.q_expansion() ## indirect doctest
q - 2*q^2 - 3*q^3 + 2*q^4 - 2*q^5 + O(q^6)
sage: f._compute_q_expansion(10)
q - 2*q^2 - 3*q^3 + 2*q^4 - 2*q^5 + 6*q^6 - q^7 + 6*q^9 + O(q^10)
Return the eigenvalue of the Atkin-Lehner operator W_d acting on this modular form (which is either 1 or -1), or None if this form is not an eigenvector for this operator.
EXAMPLE:
sage: CuspForms(1, 30).0.atkin_lehner_eigenvalue()
1
sage: CuspForms(2, 8).0.atkin_lehner_eigenvalue()
...
NotImplementedError: Don't know how to compute Atkin-Lehner matrix acting on this space (try using a newform constructor instead)
Return the L-series of the weight modular form
on
.
This actually returns an interface to Tim Dokchitser’s program for computing with the L-series of the modular form.
INPUT:
OUTPUT:
The L-series of the modular form.
EXAMPLES:
We compute with the L-series of the Eisenstein series :
sage: f = ModularForms(1,4).0
sage: L = f.modform_lseries()
sage: L(1)
-0.0304484570583933
A modular form attached to an elliptic curve.
Modular form attached to an elliptic curve as an element of a space of modular forms.
EXAMPLES:
sage: E = EllipticCurve('5077a')
sage: f = E.modular_form()
sage: f
q - 2*q^2 - 3*q^3 + 2*q^4 - 4*q^5 + O(q^6)
sage: f.q_expansion(10)
q - 2*q^2 - 3*q^3 + 2*q^4 - 4*q^5 + 6*q^6 - 4*q^7 + 6*q^9 + O(q^10)
sage: f.parent()
Modular Forms space of dimension 423 for Congruence Subgroup Gamma0(5077) of weight 2 over Rational Field
sage: E = EllipticCurve('37a')
sage: f = E.modular_form() ; f
q - 2*q^2 - 3*q^3 + 2*q^4 - 2*q^5 + O(q^6)
sage: f == loads(dumps(f))
True
Compute self as a linear combination of the basis elements of parent.
EXAMPLES:
sage: EllipticCurve('11a1').modular_form()._compute_element()
(1, 0)
sage: EllipticCurve('389a1').modular_form()._compute_element()
(1, -2, -2, 2, -3, 4, -5, 0, 1, 6, -4, -4, -3, 10, 6, -4, -6, -2, 5, -6, 10, 8, -4, 0, 4, 6, 4, -10, -6, -12, 4, 8, 0)
The -expansion of the modular form to precision
.
This function takes one argument, which is the integer prec.
EXAMPLES:
sage: E = EllipticCurve('11a') ; f = E.modular_form()
sage: f._compute_q_expansion(10)
q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 - 2*q^9 + O(q^10)
sage: f._compute_q_expansion(30)
q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 - 2*q^9 - 2*q^10 + q^11 - 2*q^12 + 4*q^13 + 4*q^14 - q^15 - 4*q^16 - 2*q^17 + 4*q^18 + 2*q^20 + 2*q^21 - 2*q^22 - q^23 - 4*q^25 - 8*q^26 + 5*q^27 - 4*q^28 + O(q^30)
sage: f._compute_q_expansion(10)
q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 - 2*q^9 + O(q^10)
Calculate the eigenvalue of the Atkin-Lehner operator W_d acting on this form. If d is None, default to the level of the form. As this form is attached to an elliptic curve, we can read this off from the root number of the curve if d is the level.
EXAMPLE:
sage: EllipticCurve('57a1').newform().atkin_lehner_eigenvalue()
1
sage: EllipticCurve('57b1').newform().atkin_lehner_eigenvalue()
-1
sage: EllipticCurve('57b1').newform().atkin_lehner_eigenvalue(19)
1
Return elliptic curve associated to self.
EXAMPLES:
sage: E = EllipticCurve('11a')
sage: f = E.modular_form()
sage: f.elliptic_curve()
Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field
sage: f.elliptic_curve() is E
True
Constructor for generic class of a modular form. This should never be called directly; instead one should instantiate one of the derived classes of this class.
Evaluate the q-expansion of this modular form at x.
EXAMPLES:
sage: f = ModularForms(DirichletGroup(17).0^2,2).2
sage: f(7) ## indirect doctest
-4851*zeta8^2 - 16464*zeta8 + 92372
sage: f(0)
0
Compare self to other. If they are not the same object, but are of the same type, compare them as vectors.
EXAMPLES:
sage: f = ModularForms(DirichletGroup(17).0^2,2).2
sage: g = ModularForms(DirichletGroup(17).0^2,2).1
sage: f == g ## indirect doctest
False
sage: f == f
True
Compare self to other.
EXAMPLES:
sage: f = ModularForms(6,4).0
sage: g = ModularForms(23,2).0
sage: f == g ## indirect doctest
False
sage: f == f
True
sage: f == loads(dumps(f))
True
Return the coefficient of the
-expansion of self.
EXAMPLES:
sage: f = ModularForms(DirichletGroup(17).0^2,2).2
sage: f.__getitem__(10)
zeta8^3 - 5*zeta8^2 - 2*zeta8 + 10
sage: f[30]
-2*zeta8^3 - 17*zeta8^2 + 4*zeta8 + 29
Return a list containing the through
coefficients of self.
EXAMPLES:
sage: f = ModularForms(DirichletGroup(17).0^2,2).2
sage: f[10:15]
[zeta8^3 - 5*zeta8^2 - 2*zeta8 + 10,
-zeta8^3 + 11,
-2*zeta8^3 - 6*zeta8^2 + 3*zeta8 + 9,
12,
2*zeta8^3 - 7*zeta8^2 + zeta8 + 14]
sage: f.__getslice__(10,15)
[zeta8^3 - 5*zeta8^2 - 2*zeta8 + 10,
-zeta8^3 + 11,
-2*zeta8^3 - 6*zeta8^2 + 3*zeta8 + 9,
12,
2*zeta8^3 - 7*zeta8^2 + zeta8 + 14]
Return True if self is nonzero, and False if not.
EXAMPLES:
sage: ModularForms(25,6).6.__nonzero__()
True
Compute the coefficients of of the power series of self,
for
in the list
. The results are not cached. (Use
coefficients for cached results).
EXAMPLES:
sage: f = ModularForms(18,2).1
sage: f.q_expansion(20)
q + 8*q^7 + 4*q^10 + 14*q^13 - 4*q^16 + 20*q^19 + O(q^20)
sage: f._compute([10,17])
[4, 0]
sage: f._compute([])
[]
Make sure self and other are compatible for arithmetic or comparison operations. Raise an error if incompatible, do nothing otherwise.
EXAMPLES:
sage: f = ModularForms(DirichletGroup(17).0^2,2).2
sage: g = ModularForms(DirichletGroup(17).0^2,2).1
sage: h = ModularForms(17,4).0
sage: f._ensure_is_compatible(g)
sage: f._ensure_is_compatible(h)
...
ArithmeticError: Modular forms must be in the same ambient space.
Return the LaTeX expression of self.
sage: ModularForms(25,4).0._latex_() ‘q + O(q^{6})’
sage: ModularForms(25,4).4._latex_() ‘q^{5} + O(q^{6})’
Return the string representation of self.
EXAMPLES:
sage: ModularForms(25,4).0._repr_()
'q + O(q^6)'
sage: ModularForms(25,4).3._repr_()
'q^4 + O(q^6)'
Return the eigenvalue of the Atkin-Lehner operator W_d acting on self (which is either 1 or -1), or None if this form is not an eigenvector for this operator. If d is not given or is None, use d = the level.
EXAMPLES:
sage: sage.modular.modform.element.ModularForm_abstract.atkin_lehner_eigenvalue(CuspForms(2, 8).0)
...
NotImplementedError
Return the base_ring of self.
EXAMPLES:
sage: (ModularForms(117, 2).13).base_ring()
Rational Field
sage: (ModularForms(119, 2, base_ring=GF(7)).12).base_ring()
Finite Field of size 7
Return the character of self.
EXAMPLES:
sage: ModularForms(DirichletGroup(17).0^2,2).2.character()
[zeta8]
The coefficients a_n of self, for integers n>=0 in the list X. If X is an Integer, return coefficients for indices from 1 to X.
This function caches the results of the compute function.
TESTS:
sage: e = DirichletGroup(11).gen()
sage: f = EisensteinForms(e, 3).eisenstein_series()[0]
sage: f.coefficients([0,1])
[15/11*zeta10^3 - 9/11*zeta10^2 - 26/11*zeta10 - 10/11,
1]
sage: f.coefficients([0,1,2,3])
[15/11*zeta10^3 - 9/11*zeta10^2 - 26/11*zeta10 - 10/11,
1,
4*zeta10 + 1,
-9*zeta10^3 + 1]
sage: f.coefficients([2,3])
[4*zeta10 + 1,
-9*zeta10^3 + 1]
Running this twice once revealed a bug, so we test it:
sage: f.coefficients([0,1,2,3])
[15/11*zeta10^3 - 9/11*zeta10^2 - 26/11*zeta10 - 10/11,
1,
4*zeta10 + 1,
-9*zeta10^3 + 1]
Return the L-series of the weight k cusp form
f on .
This actually returns an interface to Tim Dokchitser’s program for computing with the L-series of the cusp form.
INPUT:
OUTPUT:
The L-series of the cusp form.
EXAMPLES:
sage: f = CuspForms(2,8).newforms()[0]
sage: L = f.cuspform_lseries()
sage: L(1)
0.0884317737041015
sage: L(0.5)
0.0296568512531983
Consistency check with delta_lseries (which computes coefficients in pari):
sage: delta = CuspForms(1,12).0
sage: L = delta.cuspform_lseries()
sage: L(1)
0.0374412812685155
sage: L = delta_lseries()
sage: L(1)
0.0374412812685155
We check that #5262 is fixed:
sage: E=EllipticCurve('37b2')
sage: h=Newforms(37)[1]
sage: Lh = h.cuspform_lseries()
sage: LE=E.lseries()
sage: Lh(1), LE(1)
(0.725681061936153, 0.725681061936153)
sage: CuspForms(1, 30).0.cuspform_lseries().eps
-1
Return the group for which self is a modular form.
EXAMPLES:
sage: ModularForms(Gamma1(11), 2).gen(0).group()
Congruence Subgroup Gamma1(11)
Return the level of self.
EXAMPLES:
sage: ModularForms(25,4).0.level()
25
Return a list of length n whose entries are the first n coefficients of the q-expansion of self.
EXAMPLES:
sage: CuspForms(1,12).0.padded_list(20)
[0, 1, -24, 252, -1472, 4830, -6048, -16744, 84480, -113643, -115920, 534612, -370944, -577738, 401856, 1217160, 987136, -6905934, 2727432, 10661420]
Return the precision to which self.q_expansion() is currently known. Note that this may be 0.
EXAMPLES:
sage: M = ModularForms(2,14)
sage: f = M.0
sage: f.prec()
0
sage: M.prec(20)
20
sage: f.prec()
0
sage: x = f.q_expansion() ; f.prec()
20
The -expansion of the modular form to precision
.
This function takes one argument, which is the integer prec.
EXAMPLES:
We compute the cusp form :
sage: delta = CuspForms(1,12).0
sage: delta.q_expansion()
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6)
We compute the -expansion of one of the cusp forms of level 23:
sage: f = CuspForms(23,2).0
sage: f.q_expansion()
q - q^3 - q^4 + O(q^6)
sage: f.q_expansion(10)
q - q^3 - q^4 - 2*q^6 + 2*q^7 - q^8 + 2*q^9 + O(q^10)
sage: f.q_expansion(2)
q + O(q^2)
sage: f.q_expansion(1)
O(q^1)
sage: f.q_expansion(0)
O(q^0)
Same as self.q_expansion(prec).
EXAMPLES:
sage: CuspForms(1,12).0.qexp()
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6)
Return the valuation of self (i.e. as an element of the power series ring in q).
EXAMPLES:
sage: ModularForms(11,2).0.valuation()
1
sage: ModularForms(11,2).1.valuation()
0
sage: ModularForms(25,6).1.valuation()
2
sage: ModularForms(25,6).6.valuation()
7
Return the weight of self.
EXAMPLES:
sage: (ModularForms(Gamma1(9),2).6).weight()
2
Compare self with other.
EXAMPLES:
sage: f1, f2 = Newforms(19,4,names='a')
sage: f1.__cmp__(f1)
0
sage: f1.__cmp__(f2)
-1
sage: f2.__cmp__(f1)
-1
Return True if self equals other, and False otherwise.
EXAMPLES:
sage: f1, f2 = Newforms(17,4,names='a')
sage: f1.__eq__(f1)
True
sage: f1.__eq__(f2)
False
Initialize a Newform object.
INPUT:
EXAMPLES:
sage: sage.modular.modform.element.Newform(CuspForms(11,2), ModularSymbols(11,2,sign=1).cuspidal_subspace(), 'a')
q - 2*q^2 - q^3 + 2*q^4 + q^5 + O(q^6)
Return True, as newforms are never zero.
EXAMPLES:
sage: Newforms(14,2)[0].__nonzero__()
True
Compute the coefficients of of the power series of self,
for
in the list
. The results are not cached. (Use
coefficients for cached results).
EXAMPLES:
sage: f = Newforms(39,4,names='a')[1] ; f
q + a1*q^2 - 3*q^3 + (2*a1 + 5)*q^4 + (-2*a1 + 14)*q^5 + O(q^6)
sage: f._compute([2,3,7])
[alpha, -3, -2*alpha + 2]
sage: f._compute([])
[]
Return the q-expansion of self to precision prec.
EXAMPLES:
sage: forms = Newforms(31, 6, names='a')
sage: forms[0]._compute_q_expansion(10)
q + a0*q^2 + (5/704*a0^4 + 43/704*a0^3 - 61/88*a0^2 - 197/44*a0 + 717/88)*q^3 + (a0^2 - 32)*q^4 + (-31/352*a0^4 - 249/352*a0^3 + 111/22*a0^2 + 218/11*a0 - 2879/44)*q^5 + (-1/352*a0^4 - 79/352*a0^3 - 67/44*a0^2 + 13/22*a0 - 425/44)*q^6 + (17/88*a0^4 + 133/88*a0^3 - 405/44*a0^2 - 1005/22*a0 - 35/11)*q^7 + (a0^3 - 64*a0)*q^8 + (39/352*a0^4 + 441/352*a0^3 - 93/44*a0^2 - 441/22*a0 - 5293/44)*q^9 + O(q^10)
sage: forms[0]._compute_q_expansion(15)
q + a0*q^2 + (5/704*a0^4 + 43/704*a0^3 - 61/88*a0^2 - 197/44*a0 + 717/88)*q^3 + (a0^2 - 32)*q^4 + (-31/352*a0^4 - 249/352*a0^3 + 111/22*a0^2 + 218/11*a0 - 2879/44)*q^5 + (-1/352*a0^4 - 79/352*a0^3 - 67/44*a0^2 + 13/22*a0 - 425/44)*q^6 + (17/88*a0^4 + 133/88*a0^3 - 405/44*a0^2 - 1005/22*a0 - 35/11)*q^7 + (a0^3 - 64*a0)*q^8 + (39/352*a0^4 + 441/352*a0^3 - 93/44*a0^2 - 441/22*a0 - 5293/44)*q^9 + (15/176*a0^4 - 135/176*a0^3 - 185/11*a0^2 + 311/11*a0 + 2635/22)*q^10 + (-291/704*a0^4 - 3629/704*a0^3 + 1139/88*a0^2 + 10295/44*a0 - 21067/88)*q^11 + (-75/176*a0^4 - 645/176*a0^3 + 475/22*a0^2 + 1503/11*a0 - 5651/22)*q^12 + (207/704*a0^4 + 2977/704*a0^3 + 581/88*a0^2 - 3307/44*a0 - 35753/88)*q^13 + (-5/22*a0^4 + 39/11*a0^3 + 763/22*a0^2 - 2296/11*a0 - 2890/11)*q^14 + O(q^15)
Return the modular symbols space corresponding to self.
EXAMPLES:
sage: Newforms(43,2,names='a')
[q - 2*q^2 - 2*q^3 + 2*q^4 - 4*q^5 + O(q^6),
q + a1*q^2 - a1*q^3 + (-a1 + 2)*q^5 + O(q^6)]
sage: [ x._defining_modular_symbols() for x in Newforms(43,2,names='a') ]
[Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 4 for Gamma_0(43) of weight 2 with sign 1 over Rational Field,
Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 4 for Gamma_0(43) of weight 2 with sign 1 over Rational Field]
sage: ModularSymbols(43,2,sign=1).cuspidal_subspace().new_subspace().decomposition()
[
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 4 for Gamma_0(43) of weight 2 with sign 1 over Rational Field,
Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 4 for Gamma_0(43) of weight 2 with sign 1 over Rational Field
]
Return the name of the generator of the Hecke eigenvalue field of self. Note that a name exists even when this field is QQ.
EXAMPLES:
sage: [ f._name() for f in Newforms(38,4,names='a') ]
['a0', 'a1', 'a2']
Return the abelian variety associated to self.
EXAMPLES:
sage: Newforms(14,2)[0]
q - q^2 - 2*q^3 + q^4 + O(q^6)
sage: Newforms(14,2)[0].abelian_variety()
Newform abelian subvariety 14a of dimension 1 of J0(14)
Return the eigenvalue of the Atkin-Lehner operator W_d acting on this newform (which is either 1 or -1). A ValueError will be raised if the character of this form is not either trivial or quadratic. If d is not given or is None, then d defaults to the level of self.
EXAMPLE:
sage: [x.atkin_lehner_eigenvalue() for x in ModularForms(53).newforms('a')]
[1, -1]
sage: CuspForms(DirichletGroup(5).0, 5).newforms()[0].atkin_lehner_eigenvalue()
...
ValueError: Atkin-Lehner only leaves space invariant when character is trivial or quadratic. In general it sends M_k(chi) to M_k(1/chi)
Find an element of the ambient space of modular forms which represents this newform.
Note
This can be quite expensive. Also, the polynomial defining the field of Hecke eigenvalues should be considered random, since it is generated by a random sum of Hecke operators. (The field itself is not random, of course.)
EXAMPLES:
sage: ls = Newforms(38,4,names='a')
sage: ls[0]
q - 2*q^2 - 2*q^3 + 4*q^4 - 9*q^5 + O(q^6)
sage: ls # random
[q - 2*q^2 - 2*q^3 + 4*q^4 - 9*q^5 + O(q^6),
q - 2*q^2 + (-a1 - 2)*q^3 + 4*q^4 + (2*a1 + 10)*q^5 + O(q^6),
q + 2*q^2 + (1/2*a2 - 1)*q^3 + 4*q^4 + (-3/2*a2 + 12)*q^5 + O(q^6)]
sage: type(ls[0])
<class 'sage.modular.modform.element.Newform'>
sage: ls[2][3].minpoly()
x^2 - 9*x + 2
sage: ls2 = [ x.element() for x in ls ]
sage: ls2 # random
[q - 2*q^2 - 2*q^3 + 4*q^4 - 9*q^5 + O(q^6),
q - 2*q^2 + (-a1 - 2)*q^3 + 4*q^4 + (2*a1 + 10)*q^5 + O(q^6),
q + 2*q^2 + (1/2*a2 - 1)*q^3 + 4*q^4 + (-3/2*a2 + 12)*q^5 + O(q^6)]
sage: type(ls2[0])
<class 'sage.modular.modform.element.ModularFormElement'>
sage: ls2[2][3].minpoly()
x^2 - 9*x + 2
Return the field generated over the rationals by the coefficients of this newform.
EXAMPLES:
sage: ls = Newforms(35, 2, names='a') ; ls
[q + q^3 - 2*q^4 - q^5 + O(q^6),
q + a1*q^2 + (-a1 - 1)*q^3 + (-a1 + 2)*q^4 + q^5 + O(q^6)]
sage: ls[0].hecke_eigenvalue_field()
Rational Field
sage: ls[1].hecke_eigenvalue_field()
Number Field in a1 with defining polynomial x^2 + x - 4
Return the subspace with the specified sign of the space of modular symbols corresponding to this newform.
EXAMPLES:
sage: f = Newforms(18,4)[0]
sage: f.modular_symbols()
Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 18 for Gamma_0(18) of weight 4 with sign 0 over Rational Field
sage: f.modular_symbols(1)
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 11 for Gamma_0(18) of weight 4 with sign 1 over Rational Field
Return the index of this space in the list of simple, new, cuspidal subspaces of the full space of modular symbols for this weight and level.
EXAMPLES:
sage: Newforms(43, 2, names='a')[1].number()
1
Return the L-series of the modular form Delta.
This actually returns an interface to Tim Dokchitser’s program
for computing with the L-series of the modular form .
INPUT:
OUTPUT:
The L-series of .
EXAMPLES:
sage: L = delta_lseries()
sage: L(1)
0.0374412812685155
Return True if x is a modular form.
EXAMPLES:
sage: from sage.modular.modform.element import is_ModularFormElement
sage: is_ModularFormElement(5)
False
sage: is_ModularFormElement(ModularForms(11).0)
True