
// Make newform 322.2.o.b in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_322_o();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_322_2_o_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_322_o();"
function MakeCharacter_322_o()
    N := 322;
    order := 66;
    char_gens := [185, 281];
    v := [55, 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_322_o_Hecke(Kf)
    return MakeCharacter_322_o();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_322_2_o_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_322_2_o_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_322_o();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![39501840932401, -13464108729932715, 2099920720470927268, -194345937674067775995, 9519317021621329458766, -172173011797185383794890, 2161172016596123351127246, -21046442863967038012767048, 170422408858545917972632221, -1143744036529618238381039484, 6671985240441645886296288098, -34279958652217925673361341381, 158647626212059022684612960765, -658451842700814827857982382189, 2478201652995234889083244400934, -8520963294864810523139150020482, 27055341490657531333496310786139, -79442404832010308766798191523147, 214663848159019359214428370639348, -528672072564166406973206813204484, 1177511574908216486030169573945451, -2350942851959224668836129374604022, 4163489294300239137454249061666221, -6453253979554840235889231140048022, 8474457526670891247576358785695727, -8306325392572266950449936836987621, 2054203908332355624359170754258754, 15767320903744611106982609563777461, -47740968138350554566949628489555052, 86310062352093423324320628923584605, -108803967358207778203853950318239899, 87801969421899217353111156722512227, -3562801343617936151145891731027800, -133356769044969457864868535201206475, 267155909467072506856439706010368098, -332327791224036513992132499891511851, 299849091673149603541978588910472986, -136935679889069858245357191572211534, -140527095978525132319646670635963315, 402195497401973552970330441094315014, -525863450607634665421142540893422255, 435174122348507426577088764697284657, -112771286590656904969306161921029537, -117629357944805408348772049442483799, 182983045773026493909016403930634807, -305642459762473120376123856150939321, 372948635828897770075159807656334107, -49928646481732508793441225530798307, -193516844705640474700284855255636679, 45374459577631317389924537059814529, -102077547642197395044168273505221013, -11063707641881754020169814844747439, 115600963168203285317232051990828131, 293740852715560263031085427857798967, 267582838473299334980090998007529416, 109681566323777339151507325841722110, -52300142882257729952497399905082848, -436330184578263225508355422975401030, -449517424400351711319769038454819592, -342942835825092759250573780432679607, -100550960591525684041964972115099416, 192454070833272805031065378391613729, 342205431056851218095661982752141522, 278048062316485018634174857499938647, 126341437022517594019474460710487660, -19113544753152759940000455008494242, -113642566725550476212215017751680398, -122928362313530344032465757768288581, -59831431547870915290066701655677111, -3429972946039613639566744104202815, 35058266378356924012457453080658717, 44143920863847147795946598880324744, 34753581903617978301020998538514208, 17188746831154741978087444329879681, 7103206413697341299794629953327847, 1502844174234448368169854760275258, -113900716830453836547346576418655, 131689548078182352846710802219762, 236836777527034981966137082375686, 75795946165288965625503069806790, 97959605537060423606314418444296, 1599978621190765145971229610180, -547356268219208796299306529488, -17453354348244975533013413249151, 10276544365914094476819657853875, -3306337676805128201714950133979, 5114112490934945925051508263635, 3359295096149131603682113748745, 972222184571109579343782305744, 648558826605759432066505189872, 64879243446591603610116490928, -638414544708065187429241724481, -64474988070101232076252612203, -292568598520327690423495122852, 2989382993151703568773967464, -34427542841716511798755573500, 19537007802999079028199214231, 5229087928803048931291699806, 8032086576861261185000029435, 1373373242139718080920007894, 467269707482303552216085859, -94979528254492567721849472, -285204661011580539185500655, -105912132816911794076238588, -52213341817340425871817528, -1477123596531335541751374, 714094145689693041488644, 4211723396429037559009254, 2523318693331627013073589, 559220578914397061290383, 294364889040810869781928, -27289280321427886469622, -17498915684828931389019, -27575801311619345738844, -10879132322732246277911, -3108855348607543508505, -1526281327891734740800, 29100654794271108003, 13684033671117230255, 99215541399995201484, 30026116865496435638, 12838237037126696865, 4300134037629364425, 220478995823469471, 1585720939085481, -181715300218254018, -54589145428702799, -29039243028926937, -6524294862495497, -2298522883871679, -505217266232554, 55088072577186, 67881209297564, 70353148749138, 22005891581703, 9346561052457, 3085590229941, 822277772631, 302724259164, 37867124523, -1589512806, -6941974527, -2204516759, -72600552, 68967369, 102498048, 39115036, 14340744, 4259421, 918657, 267911, 32718, 934, -2799, -1115, 93, 118, 72, 24, 6, 1]>],Snew);
    return Vf;
end function;