
// Make newform 354.2.e.a in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_354_e();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_354_2_e_a();".
// 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_354_e();"
function MakeCharacter_354_e()
    N := 354;
    order := 29;
    char_gens := [119, 61];
    v := [29, 9];
    // 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_354_e_Hecke(Kf)
    return MakeCharacter_354_e();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_354_2_e_a();".
// 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_354_2_e_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_354_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![7229590729, 139750462227, 1586458017827, 8959257667721, 29879029667170, 61672670172712, 86913254709195, 110111651931153, 217635714421982, 418583957877490, 494790563788119, 100307681118585, -108790742090631, 576568155067861, 1298275599828516, 1478019283151000, 1805772918210685, 1567758781070792, 927061757212371, -37653322803708, 434858908890633, 69927448688788, -88782069670648, 58568294230460, 18797920289703, 73661752102084, 9313769862872, 218230902200, 20790295699220, -4905928482897, 1386540530047, 3580357918242, -760652985742, 385898565551, 213590485011, -101506670445, 33767156690, 3258234001, -2742505775, 1972186230, -28083283, -128422626, 29539232, -17023339, -4851567, 1981316, -574449, -114168, 71480, -8008, -255, 1639, -110, 22, 27, -4, 1]>],Snew);
    return Vf;
end function;