
// Make newform 287.2.h.c in Magma, downloaded from the LMFDB on 17 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_c();".
// 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_c();".
// 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_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_287_h();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![92416, 170240, 436992, -415616, 5279360, -13248768, 45150080, -93465024, 191497392, -278011652, 390781516, -415529984, 445717369, -348087967, 306159794, -162858632, 156155201, -60725070, 73821332, -16035398, 32853758, -384376, 13619385, 2295810, 4675386, 996432, 1282248, 277399, 283259, 65443, 57416, 14362, 9831, 2107, 1329, 270, 150, 31, 16, 3, 1]>],Snew);
    return Vf;
end function;