
// Make newform 177.2.e.a in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_177_e();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_177_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_177_e();"
function MakeCharacter_177_e()
    N := 177;
    order := 29;
    char_gens := [119, 61];
    v := [29, 1];
    // 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_177_e_Hecke(Kf)
    return MakeCharacter_177_e();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_177_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_177_2_e_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_177_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![23694752761, -1602188196673, 57818084160102, -1396178860411002, 24738542408167088, -338839649666846163, 3708859267729164526, -33131930645981697667, 244845356321532139023, -1512760182442245699898, 7900340067085126506545, -35326919275787417632497, 137195607788708872994712, -468975943479520751147677, 1424672364901898309685880, -3864333941775059393696468, 9374767783922914903480705, -20397187575941091084689656, 40115886729110085457780984, -72350550048364060692709214, 121642924643005441904715847, -192318140287684529122949877, 285399070568427810431360393, -398659612066936481694313503, 535901160272685179729155600, -711381848135650784253222864, 934790162531745112146270061, -1209750127394943356345178574, 1558409233216015646499244893, -1994182582273488809497026167, 2484629375222976322705916865, -2964360788452670026195920036, 3347646381282578028268627111, -3521323609294240699218938825, 3409006509656656884428010538, -3113413433128808317025545078, 2596851980740716082358449135, -1994444867736573538502249851, 1657088567771859885169280563, -976236150973441208261271756, 980503241657903753409218200, -409007643452486244231361588, 389894777073055303942866151, -162799307958679586050688760, 104376763840147508693618055, 139884494020569627292600004, 258515882350776044158982524, 422636137334921374939293858, 595712825536960372640156187, 568016366152624727253731593, 579523808186533089713301211, 533929706094247594745526375, 467698331569681482887966246, 381264659394512792602263507, 480993715567908300281840567, 470908373608690086991978165, 519478418062655705244900610, 536356567949272892354448638, 497638725240969651357719038, 399550257923783293738539090, 314549445579201856662588629, 223315617639274638365806843, 140138160474860027281090636, 90833003022307074510575816, 55741586505781484244998480, 30170624080336878043642427, 16872527614065112325806548, 9998646965568838560093074, 4305147143058886558265196, 1921173685944668419314459, 1122745016024546173236194, 235952500326617644409350, 137072850977707156585780, 86845488364971931801121, 71597065087414232180371, 16388447320941732805785, 16751331091933805525822, -8921350010312531239648, 13992813182074549307130, 4926306083431580860408, 916349970194454864550, -44240294249256653626, 620614409520735636214, 83926108273701394466, 483679719147475016456, -46650529042952997487, -4894678960793565226, 6620152853108053753, 11596425300006728744, -1886915581052817641, 4344670601800839899, -3322286882174590480, 357151346350740742, 282687015881507567, 84942687764196726, 57083886097806605, 21999409472676047, -26445168886985697, 13266566082746506, 40219024961745, 2177549045901905, 857007908590970, -525190646321748, 95123299597264, -44411560013452, 19640988351224, 26357359036718, -5496121497981, 1530032504473, -1750887363276, 193999676792, -13422728445, 106348924179, 30399845805, 2403037092, 1341020233, 1082125314, 1231731867, 245429782, 316714389, 81179624, 46221483, 21059531, 7713054, 6269084, 706750, 1213696, 110389, 201700, 22032, 28920, 7281, 3598, 876, 498, 121, 88, 14, 10, 1, 1]>],Snew);
    return Vf;
end function;