
// Make newform 287.2.e.d in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_287_e();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_287_2_e_d();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
// To make the character of type GrpDrchElt, type "MakeCharacter_287_e();"
function MakeCharacter_287_e()
    N := 287;
    order := 3;
    char_gens := [206, 211];
    v := [2, 3];
    // chi(gens[i]) = zeta^v[i]
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    F := CyclotomicField(order);
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),[F|F.1^e:e in v]);
    return MinimalBaseRingCharacter(chi);
end function;

function MakeCharacter_287_e_Hecke(Kf)
    return MakeCharacter_287_e();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_287_2_e_d();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function MakeNewformModSym_287_2_e_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_287_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![215296, -144768, 2776944, 1524328, 25956809, 9283595, 75749673, 32388342, 143769104, 62218711, 183360328, 79438061, 173118183, 70757726, 120068426, 45155183, 63681874, 21903710, 25993967, 8151977, 8327977, 2381400, 2089136, 540057, 411996, 95268, 62775, 12615, 7272, 1233, 609, 79, 34, 3, 1]>],Snew);
    return Vf;
end function;