
// Make newform 798.2.bu.b in Magma, downloaded from the LMFDB on 21 January 2026.
// To make the character of type GrpDrchElt, type "MakeCharacter_798_bu();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_798_2_bu_b();".
// 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_798_bu();"
function MakeCharacter_798_bu()
    N := 798;
    order := 18;
    char_gens := [533, 115, 211];
    v := [9, 12, 11];
    // 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_798_bu_Hecke( : Kf := Kf)
    return MakeCharacter_798_bu();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_798_2_bu_b();".
// 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_798_2_bu_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_798_bu();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![56673867154103092985137287576768, 1087927876001144667637532371730400, 11882306962783132730249027476070880, 42611616681212674912198254810815088, -51217413106126888760711804449855776, -2019105772292016402165158625689511456, -6263097434329780892080731192058970271, -5349400170565594981866624364490760150, 124384970957132613261329276854987592136, 146311691088622939937029075135299705450, 252346978359578576273612043708544923639, -720071092839524157496290565068781971042, 17446799466026102506105883521566700523604, 37313222120414971584707772354425444131284, -122807889807673588655293763915287572027810, -5310311656376356894006598970869859014148, -428692218202416425978793061025227425571506, -1470146533276247774997148805709692405429658, -4367804026334213496945966327514096765191162, -6365245376623520783575023856380419440187952, 69637427196033433889676385074514885323368436, 40615846855845753488116669424119309022537058, 100194789445587391065258956784419978237515491, -343968254906016533459475317953662024813616896, -79504856257189441744733245548878928924482616, 2107571235976078089515071133311742888044234242, -4604659225124480704269673603053754790193860241, 6758429083239977634968341868831475630801994524, -10186300665401342811777616836342341183708998017, 1588102110068867841836944467667682091187595622, 49576602505618892055179089331501200592744999772, -164371365181315066776165542977372979304073476840, 317818494143823885936466297187159022588267428298, -465027444231355019981916136574148363115968180684, 601951999102245863940712440642590405768705031060, -726996902287117960322983396779696352076583657060, 761119321403452285151319134353322135597586990279, -552945795442513259686021318033520452917720960102, 50862446754252458174056354978692611543507930892, 590834194963218337559013325971612548612412077676, -1110748534120654850989576201656291153323949364596, 1284940279861819357855195868239840196118445690974, -1027277764260390868925915468770132625058403525898, 398544416954480670281649459123881214241842653796, 368250032506522234077784082657516255499160517655, -955331353389032803982071530907853230971036032064, 1158797235297878141013398913653647426243309513617, -986672981478056488970799383800471670209598645676, 613881699190553071238447557004326955577877837668, -219135099221083380800107571765556397767605087010, -72156273827521133665648896692114955962473512708, 203392608619938210338930728394028299406591478878, -196922481953629788581324683116899914921779368892, 120189640542096466061060921285944048740089078466, -46129539763462440722697764897008753171595755313, 881688164132251925446152204692664940643629860, 18205071164068603168540359326531065217991421146, -19580745598201039153776631931325893231819998128, 12738123582441843151181362179779124650975314521, -4236795586948168637967732905843050017204539460, 468255598426598929867659363506814276954305539, 471659143696780323180907260184431916470280050, -706044234815576812976435134723957849327115343, 728683189604167647180782386700295934174650522, -543863696376593125954015114464026769146260653, 84538787313462382064170461126601825438982010, 30501553123752246030070657951877302651477533, -20072464354625839807892305300104144569401656, 13627718953711321262156876659355510117821113, -16281904560538332524509281280537201174129380, 24256708486200579055817590077676720726204569, 1572678257070597463673145926275992255885654, -3583353743073371161214696505301093257498961, -84747566462199852117912439523511317280078, -159952672891482467552050492902271260725943, -149102879181901595572787659749526249277502, -787603365104409316218172502010461706165429, 5555953823075575472681365765762736854692, 184389500150432718728349834705679624551316, 25827012445813571851185830265072706948686, -3924488296157746180824204831950945435736, 5284954884920165128258332978737806888326, 14861469206900570191827940402841368596954, -452390351724841208392416809536890923892, -3787824753301647668407318342866112252827, -360527550281704662427200836693927921364, 296471061250640645346750348930195238368, -80365549337345012595717730737671877990, -217168326741902784168027404324314631142, 4492716401973464437100898953618730744, 52832837090679526334497510060711446568, 6206430671382125036638968579118681086, -4499438710531981259544409668259187931, -125457181833182931213706777566650046, 1685795809135611067917313870739765286, 62995276008494975788362653806934478, -367725401265309142830377206255434810, -47063064464923606806614665482380490, 28262101570186972740290092627766079, 1782421604169537729308475627474060, -8232469806110438902494724347983772, -149449938180982019332016402970030, 1734556124630272622246633432465841, 148450675507168376543665945092198, -110914489744167978023394869539137, -3081353307563146399136965338894, 22522165219498505646993765975843, -31088766710545303724744335758, -4540085699239813092492517337269, -295455248252081173641190866348, 177172330617241828758147798651, 1530569919403167695222622090, -29710190213810966450186078163, 328759732480509530629476966, 8307686274935487002868623004, 356703077530332647372282418, -278681547264286860537841509, 28777393709866327560141912, 20431266042094954076331039, -1707998661555298888754754, -9405669329942623190480549, -395943374076114520697838, 264412513255305064736406, -46742183663591616448800, -3610648994590056106590, 2398669281857703850500, 7844888631181546799573, 298224238553584135416, -181709930502958984707, 45458711480937484290, -5840271783441207294, -1680657374570907912, -4601334318764557701, -150848173193812254, 70770936484968390, -25489765753902756, 5793858485173962, 583891490163348, 2033638929750199, 42344231295252, -12943409422002, 8490002916084, -1874962121154, -134798507490, -570362128263, -6436271004, 1808797647, -1884059130, 438781113, 15932226, 115155468, 363672, -141000, 236340, -48120, -2070, -13220, 12, 27, -18, 3, 0, 1]>],Snew);
    return Vf;
end function;