
// Make newform 287.2.h.d in Magma, downloaded from the LMFDB on 18 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_287_h();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_287_2_h_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_h();"
function MakeCharacter_287_h()
    N := 287;
    order := 5;
    char_gens := [206, 211];
    v := [5, 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_h_Hecke(Kf)
    return MakeCharacter_287_h();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_287_2_h_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_h_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_287_h();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![891136, -8926464, 57026560, -201632832, 444518496, -150910016, 571321524, -84689904, 1059048925, -163025071, 1435010236, 298851885, 1654399529, 589339425, 1289854328, 418062561, 744425369, 190917110, 338983619, 75698382, 130709910, 28590667, 42655035, 8843575, 11976977, 2261157, 2886895, 535316, 604935, 119486, 107341, 20347, 16596, 2797, 2087, 365, 228, 37, 19, 2, 1]>],Snew);
    return Vf;
end function;