
// Make newform 384.5.e.c in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_384_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_384_e_Hecke();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_384_5_e_c();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_384_5_e_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 ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [21479188203, 25672770504, 12462543468, 866573964, 385003542, 210288484, 45109352, -2262056, 724325, 391324, 22064, -8992, 1348, 356, -32, -4, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-8715058843720293423896203878119986746225633475015040386880476242, -3093896690198746895728101799376444027758066677566990865538519230, -732089105890146427213150900603857270462591610378652480472813447, -145102142538893040799626031868016133476363021888926745227314230, -58196830532827982650817878788766715981523903823087664702903633, -10547164274165260843061489179537752786149506792289297737208842, -782496521208656598048214112751340616463298167844433820200027, -246798548798373400338028463761509438673192668994457316097750, -63885770252037835522772743112143253554468896311452421740265, -8058922516492423695759357007702092572941314702122342262196, 585934930075583834574215301612174575296358077200087534437, -243227921990177808702914774230950143883201005787768847748, -65576901520051147603920184533969829095638141249170991338, 6284015103551728302269967942795387297522107250227313910, 527096732614161851418209294071845850203269862386588258, -220703504023904302951538137639490844213374422599749528], [-10423396094192756741698056772411430788933785086254786435490973237, -948733697153455083029593821755067096354734417620384293328997730, -700428373807784280413653316305682089929208342412284114624810977, -826502580689843349341213997712286363246310041391896483226378930, -27402221347611336448830004893698740959125678654955667971213923, -7299723093460965629552284833274748288218045622869275461665702, -3166637585292004564181170087451404505627474385906551135147897, -1625999574658297753071810496035426937405966361338833876069010, 193770115096845306343721201785080978748891282116770913410995, -5041907837784371232402338605255363652350881598865267376316, -8426861397133739280339957237765523340813042888646473552173, 223028776121318722287451473713834135029890245976383773492, 43538597907716489253795634184056978632497158835590492892, -18063025196424279464630622805364884568322587325244687430, 2403387753354922683746252359018660523140849702009350158, -358052320646846534986938663226931673805267045897612808], [-9498870344778294496024279475080875699762550343120289794383955856, -8963474114610768123911477069531441341217588672441221510967342580, -753433922987979918339052491070875923244906409619779076515836366, -155566864839078414830082158992434250039832990592225542094423720, -104436602667846559246040031049862959216051342579666962897306044, -34976770271266603678267399863122852939096551136574082710902416, 1231013807837737522590711546488487234758020761256870452128284, -138850095870392344221031308972338933942560307704331075831620, -228165592710077091089287617145369027234669153849664285911550, -28248622667365891487305402005903876016530795389641705426888, 6578680139190950208692090796617981179365352580937661076396, -491343913972361614029636728656680406337620199284311791624, -266313079209871473749729759154058002237838719106952327884, 15983496212164404425646034867054189169222275389432034360, 3618348906998688204447152946997520471627516675471432474, -681477551561160490334006228133010575973586702992399544], [2575353491880559068760530291796847353933206410782302622026718053, -3500350877272035139951729729060661831736796619580588693796597770, -699271592809348083218640080450059917116479536851936983267801287, 59289312194118794867243906128769485336264552441026787734637590, -2102232357128938651060754830064134655131042291670353625233253, -19565223802976019498126757537461301424393817023864638238499322, -77472264068210456149528300144691395743794747311281893489597, 393003665983209746770400344121110561915879405006948181259710, -62129339677079411164786059547511867028329189831991828179315, -28568305407188695873806293226322801855995782191449316069936, 3702861231405039580541108129412982932910914021047651127647, 305631869352064413454934305507519852062240768655847147272, -147577717642780327320390280027521661625531437033231059628, 789416296122730682191827280187888397491084001620561290, 2377005165229489482745569439166519452676435592356701148, -269188267812460519988488265939980063882533937349593028], [31003747190999661453820401990045749002121734282852353101139831783, 12414494134030415325276446908250602576659034044476696481911591190, 833010490938783951347227869186757842725494845883067375244219183, 371757272794080654284093720029087082584972518234002246570558370, 336230714350071233789764543750101340468837492948345336671501607, 42488815390385163834727293082939167772005272767589384517406358, -2876528311653544128551371129031715121812273285661212561675077, 1124252242262813658261268253814190285554096458576255538547790, 576233061800129309129712734118324521176655549390499788822725, -7999565700538377055340839230713820156629756709150426507136, -9638135766676468643022846544811847369292390924094577285973, 2750206833122734411498211414461452977343807029329957087252, 302128452504230025582395620183654304684536189759717667162, -56543737385581631923361465418275696093149094325906990050, -321081429621565423601186176483956622164833422694688202, 953852795643636193642303555013874412436430754508525212], [-54835204433116308976415489306219300250159136745422221627695271216, 50986391836296157674601965114990202072928741869264060057683352080, -1874601935913780391981577529921304485798460655125411556791635966, 1625716308858366304161237289388409008335453796820872746383980880, 5943304091960022825226005838069341904038811565667331411792246, 182353499265570105192562285857950259786281002583151365911014284, 4856116726782684404206717997577780548309809615266002779710184, -236863849664718314844569837418908099279113528850926667979400, 525356722650708015581547657650458497827778078171959226354610, 173730220084702710348768917463221964308144392958430295280132, -21225833776690961064303258682834555177884520502413062105304, 1261632898690302882911665792886096864843923557108392295436, 957300674433449574636535687762976046835428870950473479176, -31600339116423224720338763252933423977454855076644441480, -17988867565846567444822289399909847348841159500480553486, 3027800883645935603615786194080661847979912964775228956], [-356616929934851594746549355927493987183406993085915830069953, 19461084053222204702323420998140180025892757090544266228844, 13241400951718689792215212329017871396427321620349476677106, 3206969050599837713915934395905173336938080718682970597908, -171072635612125007255984698317637523122583298278468203798, 321048988541789898115692323592692105339542684467792493324, 30930719296350159088492140353075161709597601396119790794, 3447229955396059385692682603928220066891103332713747940, 447414541010783152849107732119234148401920431722867876, 316531602152439203829716502174548119631822366555746336, -14398162849831379471926152819770358112997460629336138, 4564938344192025633762851116605644917972480221218624, 1905046427357300189032858596775935733586808405603862, -119928357526396457130947326415477564785893308449036, -34533697018600221663762015825538813852524876492560, 7551109798418552870272693487210604310860002278904], [-68294982517930930617672416716458244060240114007472899549331101967, -33385290236659806712993326824087770866924012290920613300584883610, -9212417923688621349509756029053111589210574642500632551558249997, 3326889279784433409493140155188568324256891413729726724211740030, -960933743733938657694007471145707488279006356044047913053923603, -183087943388366504709686588441261676843173614366772164699137982, 16647397593065297083274328616799366722957233918725124989075833, 4125328914469837877128537190156343848737015980483139866415550, -2176009360624686622201526252712396347428716809942454923214515, -141896472863698791297636889420288014573187944153308752911376, 76073805384492365755474322888145378359554836439418224918697, -5357768803137036699101378875498375004193299541964417303628, -2287023858775158657847084199338029963816339736089275424178, 248400080117096592882428625716123895576206837388059055250, 13720456321689059810207091560858736573980797530191017748, -3716070913948038119194968352373185969843913634847182428], [16022877904949489492980479861350396009086732521749342968379119458, 12144602755307665684491702436491628020483290404265481190985448480, -3094143824946664617724272474720515683724642331012832617350603982, -468467605322812794474542030261573531341115468123098968641732760, 426422762575755063349308621189562783003359267776994593673114782, 135687321162512069759168195297305100231662748656012239618511468, -17490758109408919920470536978764780867800716031214110801427292, -197673076812639963801879028787614022500583421797925080833040, 1275878609445621552563399261032195009454427370332439308392840, 138918927221665892924654840862184591780121291514545943704884, -53667604115105789297928500189423006060484877473851530559768, 2656090114991826640260728203125334417882605993074531409932, 1923870478166913073553738769615383668129671567725008394242, -121272100291988770406474879343390624081572500913308314280, -28095733992591991966094110278146056180059573103548165542, 4361598287757788039442560877543258370994918200214327852], [-44013132320152515440659297487708081094432, -40265228441968860355008630779263870549440, -1722841534534307297276129109978808246752, -459837995914463264031696304915306488960, -628362737814238777751657329079454805408, -198993391334864224764367051801069617152, 12387389581978303846406124922979836928, -928140510545805541029704401231302080, -1542415596965550248478941496468045280, -164643318733841528714659928999110016, 50554767306633622888186593659547712, -3544259968666087260441581855500288, -1931650357119967318624367576603648, 126005419800997440478927022992640, 25871728873346714002012541207968, -4668889956073961853105883639168], [30736881342727219675820977629838441952253218819040768067056911103, -22835638287423524148300495688274831598648147061458718080770419410, 922090841518580717632628813091285579337557939087015175576222503, 595313446776326794249761057920505989098349555065304075916394410, 97370614564843168847706025748340767300499971952116054027972887, -123190408992014742406044745332238937356607273334599895664851802, 9374411299418498122639319729400998316880891157178695976402463, 1876357602266389334331784713333040493682598758432935803503590, -269127823918291739833706637021983981574908179527959688479075, -149103655112547740378149616499029645981797819059082423317496, 19275996187035830468656454700873367993206473991939471849527, 2615452085014389862270745728635620895083800162639479850732, -770942972572414172743822369265631101328450906239121552418, -33038331344486505877069461325361687091417363708448502570, 18615921267661514585507102856952525674907769916514247978, -1614077979945701344986846732332191558269746574890189948], [-32754462947478368445275197053683645265760889734551659102986895808, -15642945976325657051781761350976048886907026794596882439732764650, -2898989661188988577036966406320857764103842716316560654192834263, -722293718852926622151476857586177006688938619574631514836039310, -191552461934120433805076494784509983338110249415642147793585667, -118858918553281727802206552897680841081876377557889536487188278, 792089283490227864999133793328908002656940682370021833173367, -104988458373363220119246990963687617716364729171519322335810, -607409924440018608514169892619140817062231528288097345795375, -102830216064055687707405104862657014609512796367142146100724, 19623807975527539665937387023329582266965846285155164046923, -884113077511024339224425293851853030719909729538024488832, -883682793300243691797533081367520437211533185899184647352, 39217491189304654190519742955243885185534688901782007390, 13638808173573462715185837199379412735502192760818205272, -2242857797261868779155075905850497574833151137310433872], [-9343646271676162097107387050509010747264972017910305326905686592, -10085184298450316524327452136010312670775658880503936430949900320, -387430538074683424584066531352303542875963181302408292046306272, -27837867373257819331538028862995988113595727964360482196056160, -128876597299259909819621364238767695856039210019455213032848928, -36264557291655943749672838813078840827407175467459339300963392, 2689395640265369017653552561320936152547287061410383908111968, -143150656257421641448719646546661419143627432105585596361760, -301908776611520711494309352896087666580173311313418860356320, -20408430417130263760102642938236116782208770919546856736256, 8455035890567139539191006360206243898014492516548165093792, -806043097529511413420063766317701624955095351791261289568, -286218699757792734809952669462540696351458197406919435808, 22137774959832650532047421125059239411666646389054127840, 3406200482380143293459451498187189503130036199293514528, -697371145106912785373778949010338299648477474503299328], [7356402391209661027804403466998886759839696265773535001274030694, 158730659943122738963994530869294023943756615743433356685323072390, 17514071474315583629174231621410292527074657350304781764704099319, -31321397053951256553463536819136690301101092811011726575933370, 1266441560520862521858953824289719429426590054208613784380744081, 753247318679314477156859687456921603625022483436465885652669514, -39418812821925011111080543668434215602555380180773205929827151, -1262283253873434440268579380060062606420717627573113132023450, 4094943755827716157584770856652370328587149592262701146081835, 667768082877631150540814729465652330771605750325567780029392, -141656542859385484579726959242611134947060823485189091297059, 4588862049273188700228599924606154992466474791558796409916, 5592550914600517510064231261948562210038327434333718710876, -244319979562673872354438254458669718909981957783190764670, -86985439652761164285161558981446594622834703641002377236, 13675186690571672995990287032764325908746217605171389396], [40104025754396567871673644450827212509624572291950294558824439338, 25329331335168139778599522137513390340745416449874499440889873820, 632334709956680196857115520364684227888286984569668063344099598, 452947240344772381198622455824790512220974950284348445282728320, 402197927889682744064271440100614810356236936006116954610036592, 94812962515135186584768045091440302383192113123275101726517688, -8194526164888033081168968493442277000173290403176931082822892, 1074752383179944731805939227479289157314182619016278091471540, 820376612986925711020452866215003857361054448885967305896500, 50129859220287490316615208042237203737922381882745190083064, -21248384454127749991098656218942229018037077367188906921488, 2375205161622391159781818343782905047743487997857610075552, 781930516002115073598318881318489142948103488473103879322, -60798969453552083935587743615713744522557120711068202200, -9838689776395677413879786560036446503904013377586182822, 2059529731886036112075908525785816399365674088249325112]];
    Rf_basisdens := [1, 652890532498752510828597757648334377779086550711304186745842005, 652890532498752510828597757648334377779086550711304186745842005, 217630177499584170276199252549444792593028850237101395581947335, 72543392499861390092066417516481597531009616745700465193982445, 217630177499584170276199252549444792593028850237101395581947335, 652890532498752510828597757648334377779086550711304186745842005, 1450819489347582882411914619842303873824398188307732379467, 652890532498752510828597757648334377779086550711304186745842005, 652890532498752510828597757648334377779086550711304186745842005, 672108280477603974429885920125776082365, 217630177499584170276199252549444792593028850237101395581947335, 217630177499584170276199252549444792593028850237101395581947335, 34362659605197500569926197770964967251530871090068641407675895, 652890532498752510828597757648334377779086550711304186745842005, 72543392499861390092066417516481597531009616745700465193982445];
    Rf_basisnums := ChangeUniverse([[z : z in elt] : elt in Rf_num], Kf);
    Rfbasis := [Rf_basisnums[i]/Rf_basisdens[i] : i in [1..Degree(Kf)]];
    inp_vec := Vector(Rfbasis)*ChangeRing(Transpose(Matrix([[elt : elt in row] : row in input])),Kf);
    return Eltseq(inp_vec);
end function;


// To make the character of type GrpDrchElt, type "MakeCharacter_384_e();"
function MakeCharacter_384_e()
    N := 384;
    order := 2;
    char_gens := [127, 133, 257];
    v := [2, 2, 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;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_384_e_Hecke();"
function MakeCharacter_384_e_Hecke(Kf)
    N := 384;
    order := 2;
    char_gens := [127, 133, 257];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := true, Kf := Kf); // the value of chi on the gens as elements in the Hecke field
    F := Universe(values);// the Hecke field
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),values);
    return chi;
end function;


function ExtendMultiplicatively(weight, aps, character)
    prec := NextPrime(NthPrime(#aps)) - 1; // we will able to figure out a_0 ... a_prec
    primes := PrimesUpTo(prec);
    prime_powers := primes;
    assert #primes eq #aps;
    log_prec := Floor(Log(prec)/Log(2)); // prec < 2^(log_prec+1)
    F := Universe(aps);
    FXY<X, Y> := PolynomialRing(F, 2);
    // 1/(1 - a_p T + p^(weight - 1) * char(p) T^2) = 1 + a_p T + a_{p^2} T^2 + ...
    R<T> := PowerSeriesRing(FXY : Precision := log_prec + 1);
    recursion := Coefficients(1/(1 - X*T + Y*T^2));
    coeffs := [F!0: i in [1..(prec+1)]];
    coeffs[1] := 1; //a_1
    for i := 1 to #primes do
        p := primes[i];
        coeffs[p] := aps[i];
        b := p^(weight - 1) * F!character(p);
        r := 2;
        p_power := p * p;
        //deals with powers of p
        while p_power le prec do
            Append(~prime_powers, p_power);
            coeffs[p_power] := Evaluate(recursion[r + 1], [aps[i], b]);
            p_power *:= p;
            r +:= 1;
        end while;    
    end for;
    Sort(~prime_powers);
    for pp in prime_powers do
        for k := 1 to Floor(prec/pp) do
            if GCD(k, pp) eq 1 then
                coeffs[pp*k] := coeffs[pp]*coeffs[k];
            end if;
        end for;
    end for;
    return coeffs;
end function;


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 5;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-5, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 1, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, -1], [-51, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0], [-5, 9, 0, -4, 1, 2, -1, 0, -1, 0, -1, -1, 0, 1, 0, -1], [6, -13, 2, 1, -1, -1, 1, 1, 0, -3, 3, 1, -1, -2, 1, 3], [-38, 11, 1, 0, -2, 5, 0, 3, -1, -1, 3, 2, -1, -1, -1, 0], [156, -44, 15, 0, 1, -1, -3, 4, 2, -1, -1, 1, -1, 2, -1, 3], [-16, 26, 4, 5, 4, 1, -1, 2, 0, 7, 1, 1, -2, -4, 2, 3], [-9, 5, -5, 0, -4, 13, -2, -1, 2, 0, 4, 6, -3, 2, 0, 2], [-12, 11, -2, 30, -1, -15, 1, -1, -4, -1, -2, 3, 1, 6, -1, -1], [-24, 42, 4, 1, 6, -4, -4, 2, 4, 8, 14, 4, -2, -8, 2, 0], [37, -71, 4, -60, -7, -18, -2, 2, 8, -2, 0, 10, -2, -12, 2, 2], [-244, 126, -33, 0, -17, 9, -5, 10, 6, 1, 1, 7, -7, 6, 1, 5], [247, -69, 8, 0, 1, -16, -10, 12, 10, 0, -12, -2, 0, 10, 0, 10], [-25, 56, -10, -102, 4, 15, 12, -5, -5, -13, -39, -10, 5, 15, -5, 2], [352, -219, -44, 0, 23, 3, -7, 3, 12, 5, -11, 1, 7, 12, 5, 7], [898, 25, -17, 0, 2, 13, 2, -17, -9, -7, 9, 0, 11, -9, -7, -2], [24, -46, 20, 152, 2, 14, 8, 10, 6, 7, -20, 4, -10, -26, 10, 28], [-116, 236, 0, -52, 30, 3, -4, 0, 24, -12, -45, 7, 0, -24, 0, -4], [36, 368, 48, 0, -52, 5, -2, -30, 8, 6, -1, 7, -14, 8, 6, 2], [-258, 497, 14, 21, 65, 59, 5, 7, 12, 5, 61, -11, -7, -26, 7, 19], [-999, 19, -7, 0, 8, 10, 10, 10, -10, 0, 4, -6, 18, -10, 0, -10], [-19, 27, 24, -228, 11, 28, -10, 12, -2, 6, -68, -2, -12, -22, 12, 14], [928, 544, -5, 0, -63, -25, -7, 8, 14, 7, -21, -7, 3, 14, 7, 7], [404, -718, 12, 60, -74, 20, -6, 6, 8, 58, -92, 0, -6, -20, 6, 6], [1240, 247, -3, 0, -6, -73, 16, 1, -11, 5, -15, -26, -11, -11, 5, -16], [51, -89, -20, 136, -17, -62, -48, -10, 18, -20, -148, 20, 10, 2, -10, -68], [-668, 1180, 16, 235, 134, 15, -13, 8, -16, 3, -157, -5, -8, 0, 8, 3], [1161, 149, -200, 0, 35, -80, 28, -24, -4, 24, -32, -36, 0, -4, 24, -28], [-632, 1044, -8, -45, 100, -188, -12, -4, 0, -92, 284, 60, 4, 8, -4, -20], [-5585, 239, -3, 0, -36, 92, 10, 8, 4, 14, 26, 30, -8, 4, 14, -10], [944, 1321, 135, 0, -144, 64, 32, -73, -16, 16, 16, 0, 32, -16, 16, -32], [-3785, 169, -41, 0, -36, 93, -22, 135, 2, -20, 24, 26, 37, 2, -20, 22], [-79, 73, 28, -24, 9, -112, -49, 14, 13, -178, -235, 51, -14, -41, 14, -21], [608, -1130, 12, -49, -126, 72, -8, 6, -60, -108, 290, -40, -6, 48, 6, 4], [-105, 95, 4, 92, -1, -66, 58, 2, -52, 38, -344, 6, -2, 48, 2, 62], [916, -963, -301, 0, 104, 272, -12, 51, -20, -32, 100, 80, 44, -20, -32, 12], [582, -1095, 78, -394, -99, 21, -29, 39, 6, -89, -312, 21, -39, -84, 39, 49], [1440, 2203, -428, 0, -183, -31, -5, -91, -32, -37, 11, -21, 37, -32, -37, 5], [-1246, 2409, -58, -69, 269, 317, 3, -29, -48, 71, 273, -141, 29, 106, -29, -55], [-11857, -713, 9, 0, 40, 0, -38, -124, 36, -2, -6, 30, -52, 36, -2, 38], [-13539, -91, 182, 0, 45, -86, 40, -90, -56, -16, 0, -56, 42, -56, -16, -40], [23086, 1401, 131, 0, -266, 165, -94, 55, 67, -27, 21, 88, -5, 67, -27, 94], [-36, 142, -76, -856, -2, 78, 104, -38, -26, -1, -652, -60, 38, 102, -38, 28], [-9836, -943, -437, 0, 268, -412, 72, -65, -76, -4, -72, -148, -40, -76, -4, -72], [-572, 1124, -128, 1274, 90, -103, 74, -64, 40, 18, -711, 5, 64, 88, -64, -54], [-824, 1437, 42, -878, 169, -181, 15, 21, 80, 85, -550, 101, -21, -122, 21, 57], [-2872, 1219, 180, 0, -47, -163, 107, -123, -80, 27, -17, -97, 21, -80, 27, -107], [-336, 282, 20, 256, -6, -290, -68, 10, -142, -171, -572, 56, -10, 122, 10, -48], [220, -434, -12, -530, -58, 70, 96, -6, -80, 120, -782, -54, 6, 92, -6, 84], [-733, 1426, 66, 1398, 198, 273, 2, 33, 15, -63, -647, -64, -33, -81, 33, 68], [520, -600, -160, 149, -80, 204, 108, -80, 88, 132, 512, -92, 80, 72, -80, -52], [22734, -3255, 219, 0, 238, 285, -46, 159, 19, -27, 149, 168, -173, 19, -27, 46], [2964, -224, 607, 0, -91, 395, 9, -168, -62, -53, 211, 149, -61, -62, -53, -9], [-252, 416, -40, -2090, 26, 11, -94, -20, -72, 298, -669, -41, 20, 112, -20, -134], [36087, -1001, 1014, 0, 23, 234, 86, 82, -30, 56, 76, 46, 10, -30, 56, -86], [294, -329, 10, 231, -5, 343, 41, 5, 24, -371, 695, -103, -5, -34, 5, 51], [-35629, -421, 702, 0, -109, -86, -126, 458, 46, -80, -20, 26, -38, 46, -80, 126], [809, -1324, -62, 934, -152, 205, -256, -31, -27, -103, -933, -98, 31, 89, -31, -318], [-8218, 2797, -1484, 0, -141, 10, 27, -15, 36, 63, -38, -2, -11, 36, 63, -27], [-916, 1454, 84, -531, 166, -202, -86, 42, -16, -398, 726, 90, -42, -68, 42, -2], [43611, 843, -768, 0, -79, 84, -50, 504, 62, 12, 16, 78, -100, 62, 12, 50], [4970, -2749, 20, 0, 93, 398, -199, 79, 80, -119, 154, 234, -105, 80, -119, 199], [204, -98, 52, 1144, 46, 286, 200, 26, 150, 381, -820, -28, -26, -202, 26, 252], [-28492, -1997, -1829, 0, 386, 142, 14, -211, 72, 86, -6, 66, -70, 72, 86, -14], [-1808, 3060, 136, -1648, 364, -296, -236, 68, 72, -372, -84, 168, -68, -208, 68, -100], [-1657, 3142, -238, -1626, 282, -95, 134, -119, 11, 193, -891, -44, 119, 227, -119, -104], [64354, -7849, -403, 0, 1046, -483, 36, -173, -89, -53, -121, -210, 111, -89, -53, -36], [13584, 3589, 167, 0, -412, 28, 52, 315, 200, 252, -260, -60, 156, 200, 252, -52], [76755, -819, 905, 0, -50, -217, -62, -563, 102, 40, -124, -22, -89, 102, 40, 62], [4046, -7547, 54, -58, -855, 249, 295, 27, -330, 147, -652, -175, -27, 276, 27, 349], [2908, -5376, 184, -919, -548, -2, -318, 92, 12, 430, 276, 66, -92, -196, 92, -134], [1872, -6062, 339, 0, 543, 121, -9, 262, 66, 57, 101, 167, -371, 66, 57, 9], [-3248, 5488, 192, 1285, 632, -500, -155, 96, 64, 293, -36, 252, -96, -256, 96, 37], [9606, 4886, 1152, 0, -934, 214, -274, -110, 120, -154, 138, 258, -286, 120, -154, 274], [1452, -2732, 224, 848, -236, -240, 248, 112, 184, 75, -48, 216, -112, -408, 112, 472], [2236, 4959, 2315, 0, -954, 434, -70, 129, 104, 34, 102, 206, -114, 104, 34, 70], [-7184, 13381, -246, 4866, 1457, 379, 7, -123, 40, -587, -406, -195, 123, 206, -123, -239], [-6692, -8294, -728, 0, 1058, -613, 4, -568, 188, 192, -403, -215, 28, 188, 192, -4], [-71605, 6027, -19, 0, -776, 324, -178, 296, -32, -210, 114, 82, 256, -32, -210, 178], [1728, -2724, 184, 296, -180, 500, 4, 92, 256, -207, 904, -20, -92, -440, 92, 188], [-3200, 6296, 80, -1727, 804, 634, 345, 40, 248, 337, -10, -102, -40, -328, 40, 425], [15222, 6860, -1528, 0, -556, -820, -128, 228, 212, 84, -528, -316, 256, 212, 84, 128], [-3818, 6839, -22, -199, 747, -497, -175, -11, 200, -1563, -1017, 225, 11, -178, -11, -197], [110784, -15509, 357, 0, 1998, -541, 260, -419, -163, 97, -203, -366, 297, -163, 97, -260], [-72, -252, 56, 6144, -60, -956, 32, 28, 164, -797, 832, 392, -28, -220, 28, 88], [9536, -16822, -300, -596, -1934, -82, -266, -150, 128, -166, 1248, -30, 150, 172, -150, -566], [-98343, -5175, -1769, 0, 452, 738, -348, -42, 70, -278, 266, 336, 78, 70, -278, 348], [-1255, 2215, 40, -1176, 255, 332, -212, 20, -176, 792, 528, -156, -20, 136, 20, -172], [-138135, 1917, 126, 0, -107, -290, 136, -110, -12, 124, -116, -128, -42, -12, 124, -136], [4637, -7570, -450, -7766, -902, 383, -250, -225, 185, -713, 423, -216, 225, 265, -225, -700], [-3076, 6244, -256, -2229, 696, 598, 154, -128, 164, 174, -1160, -230, 128, 92, -128, -102], [2396, -3156, -416, 3579, -346, 1791, -517, -208, -136, 787, 239, -781, 208, 552, -208, -933], [99845, 1331, 539, 0, -446, 517, -160, 251, -80, -240, 496, 416, -571, -80, -240, 160], [-22580, -8476, 2375, 0, 569, -641, -427, -396, -78, -505, -65, -143, 215, -78, -505, 427], [-99511, 3171, -101, 0, -534, 273, -328, 319, -76, -404, 220, 144, 169, -76, -404, 328], [-2286, 3647, -270, -1037, 239, -731, -269, -135, -284, -253, -1725, 59, 135, 554, -135, -539], [-564, 888, 232, -840, 168, 1244, -68, 116, -560, 1235, 1272, -524, -116, 328, 116, 164], [1052, -1384, -424, -3039, -242, 309, 237, -212, -8, 1141, 2949, -247, 212, 432, -212, -187], [145819, 8539, -1578, 0, -757, 1082, 146, 1050, -282, -136, 532, 250, 186, -282, -136, -146], [-16918, 2163, -2860, 0, 653, -1358, 425, -505, -312, 113, -402, -714, 359, -312, 113, -425], [337, -1015, -228, 5000, -255, -726, 592, -114, -198, -896, 3932, 100, 114, 426, -114, 364], [424, -1424, -304, 2214, -364, -1618, -18, -152, -48, 670, 2542, 422, 152, 352, -152, -322], [7051, -11567, 432, 3668, -967, 2002, 519, 216, 391, -64, 1275, -393, -216, -823, 216, 951], [-32576, 7385, -3836, 0, -61, 391, 437, 31, -396, 41, 281, -115, 299, -396, 41, -437], [218256, 21079, 3337, 0, -3074, 43, -440, 637, 525, 85, -415, 110, 153, 525, 85, 440], [-62984, 1810, -1525, 0, -393, 1953, -121, 550, -214, -335, 1013, 799, -323, -214, -335, 121], [-2020, 1996, -128, 3292, -54, -2539, 764, -64, -368, -1076, 2481, 681, 64, 496, -64, 636], [138351, -721, 2668, 0, -263, 1728, 162, -428, -430, -268, 912, 482, 120, -430, -268, -162], [-92059, 8373, 727, 0, -1504, -582, -680, 2022, 626, -54, -510, 116, -250, 626, -54, 680], [-32, 540, -552, -1321, -80, 1034, 307, -276, -496, -141, 4226, -694, 276, 1048, -276, -245], [-114519, -7025, 1511, 0, 882, -1959, -164, 703, 100, -64, -920, -820, 665, 100, -64, 164], [-6459, 10633, 996, -7176, 1417, -340, -89, 498, 17, -718, 3669, 451, -498, -1013, 498, 907], [3758, -7289, -70, 1629, -909, -773, -75, -35, -160, 1441, -1905, 181, 35, 230, -35, -145], [-4737, 8369, 120, -8536, 953, 916, 996, 60, -512, -1780, 4856, -436, -60, 392, 60, 1116], [72408, -1994, -3325, 0, 1291, -2155, 267, -1374, -430, -163, -663, -1093, 857, -430, -163, -267], [72868, 3874, 5992, 0, -1302, 1079, -204, -568, 12, -192, 241, 253, 524, 12, -192, 204], [-9062, 15007, -446, 3453, 1319, -1887, -833, -223, -628, -681, -5589, 271, 223, 1074, -223, -1279], [1220, -2350, -180, -4872, -350, -1006, 1080, -90, 218, 1657, 2780, 348, 90, -38, -90, 900], [-150269, 11921, -1367, 0, -598, -469, 646, -1071, -730, -84, 448, -282, -269, -730, -84, -646], [2518, -5207, -82, -6569, -703, 167, 81, -41, -780, -391, -2875, -343, 41, 862, -41, -1], [-85052, -17192, 4535, 0, 1461, 1211, 361, -320, -302, 59, 691, 389, -317, -302, 59, -361], [-17546, 30820, 484, 5276, 3500, -1038, -68, 242, 182, -1622, 2922, 568, -242, -666, 242, 416], [-39203, 14031, -1351, 0, -1500, 1562, 126, -2910, 186, 312, 52, 238, 722, 186, 312, -126], [-192972, 17009, -1085, 0, -1580, -740, 176, -641, 100, 276, -400, -300, -16, 100, 276, -176], [509, -515, 5584, 0, -485, -1220, -260, 316, -48, -308, -364, -412, 276, -48, -308, 260], [-7339, 13375, -464, 10012, 1335, -562, 585, -232, 73, -640, 1053, 57, 232, 391, -232, 121], [49428, -32775, -1921, 0, 4110, -1253, 310, 665, 1, 311, -265, -264, -771, 1, 311, -310], [32420, -21393, 1275, 0, 2678, -886, 530, 721, -240, 290, -106, -346, -378, -240, 290, -530], [-11336, 21106, -412, 2811, 2288, 1631, -411, -206, -480, 1997, 7, -841, 206, 892, -206, -823], [-15328, 23163, -5036, 0, -1783, -1507, 59, -2243, -24, 35, -425, -449, -219, -24, 35, -59], [-9866, 16629, 966, -6667, 2053, -601, 489, 483, -4, -535, -799, 521, -483, -962, 483, 1455], [-136645, -7227, -443, 0, 554, 3219, 258, 929, -50, 208, 1004, 954, 99, -50, 208, -258], [13674, -24233, -174, 7675, -2705, -223, -1073, -87, 332, -1913, 347, 127, 87, -158, -87, -1247], [-9800, 16550, -404, -9607, 1536, -4051, -585, -202, 688, 383, 1373, 1445, 202, -284, -202, -989], [-22823, -6589, 4927, 0, 358, -443, 256, 2203, 36, 292, -188, -152, -243, 36, 292, -256], [-4830, 9067, 298, 7945, 1171, -299, 2419, 149, 732, 1963, -6577, 443, -149, -1030, 149, 2717], [-104207, 20357, -789, 0, -1980, 114, 152, -434, -850, -698, 990, 140, -458, -850, -698, -152], [10001, -14333, -176, -10364, -1149, 5072, 762, -88, 766, 154, -1580, -1494, 88, -590, -88, 586], [-164496, 15325, 4327, 0, -2708, 428, -788, 1731, 648, -140, -580, 68, 1012, 648, -140, 788], [-6741, 14102, -1126, 17894, 1418, 1325, 814, -563, 303, -523, 4061, -716, 563, 823, -563, -312], [142456, -32497, 8183, 0, 2050, 1646, -230, -1343, 900, 670, -114, 786, -482, 900, 670, 230], [-11428, 21260, -384, 11137, 2314, -619, -799, -192, 656, 1265, 6433, 297, 192, -272, -192, -1183], [-4605, -11903, -5747, 0, 1526, 255, -322, -275, 198, -124, 360, 558, -1097, 198, -124, 322], [12346, -22283, -1074, 12518, -2887, 1261, 839, -537, -1526, 2631, -1956, -1287, 537, 2600, -537, -235], [376860, 18633, 4003, 0, -3412, -564, -1168, 1671, 636, -532, -104, 532, -992, 636, -532, 1168], [3108, -3754, 500, -1656, 26, 4616, -806, 250, -192, -2430, -2588, -1436, -250, -308, 250, -306], [159921, 17903, -7483, 0, -2364, 1839, -1088, -143, 1444, 356, -540, 904, 215, 1444, 356, 1088], [9629, -18998, -778, 10154, -2634, -4661, -6, -389, 161, 1195, -2629, 1348, 389, 617, -389, -784], [-38685, -6139, 6367, 0, -256, -2907, -898, -569, 462, -436, -1072, -610, -179, 462, -436, 898], [-15912, 30535, -802, -9138, 3355, 1641, 765, -401, 328, 4279, 4898, -705, 401, 474, -401, -37], [162353, 12201, 3003, 0, -1104, -1650, 300, 1082, -834, -534, 234, -600, -150, -834, -534, -300], [15984, -27392, -512, 4519, -3044, -1142, 375, -256, 1464, 2191, 4790, 698, 256, -952, -256, -137], [64300, -19336, 1048, 0, 1068, 5491, -322, -2410, 620, 298, 917, 1537, 1202, 620, 298, 322], [4922, -6847, -474, -2159, -659, 1193, 1607, -237, 920, -4173, 4913, -249, 237, -446, -237, 1133], [17147, -31923, 72, -13284, -3667, -3980, -690, 36, 1054, 1114, 7300, 1702, -36, -1126, 36, -618], [-28, -84, 1744, 19333, 626, -327, 157, 872, 1400, -1643, -1919, 1157, -872, -3144, 872, 1901], [184145, -16843, 8995, 0, -292, 3482, -1320, -602, -50, -1370, 1374, 1324, 830, -50, -1370, 1320], [3160, -5186, -660, -22072, -754, -350, -128, -330, 130, -363, -5476, -60, 330, 530, -330, -788], [11392, -23612, 648, -17617, -2812, -4700, 723, 324, -56, -3189, -5992, 1764, -324, -592, 324, 1371], [2081, -1738, -1418, 7354, -446, 2995, 614, -709, -723, 979, 2911, -1712, 709, 2141, -709, -804], [-267968, 18365, 4531, 0, -2978, 2271, 10, -4867, -99, -89, 1135, 1036, -847, -99, -89, -10], [-201580, -10070, -1457, 0, 1779, -4027, -137, 254, 22, -115, -1291, -1269, -83, 22, -115, 137]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_384_e_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_384_5_e_c();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_384_5_e_c(:prec:=16)
    chi := MakeCharacter_384_e();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 5));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(997) - 1;
    while true do
        trunc_vec := Vector(Kf, [0] cat [f_vec[i]: i in [1..prec]]);
        B := Basis(S, prec + 1);
        S_basismat := Matrix([AbsEltseq(g): g in B]);
        if Rank(S_basismat) eq Min(NumberOfRows(S_basismat), NumberOfColumns(S_basismat)) then
            S_basismat := ChangeRing(S_basismat,Kf);
            f_lincom := Solution(S_basismat,trunc_vec);
            f := &+[f_lincom[i]*Basis(S)[i] : i in [1..#Basis(S)]];
            return f;
        end if;
        error if prec eq maxprec, "Unable to distinguish newform within newspace";
        prec := Min(Ceiling(1.25 * prec), maxprec);
    end while;
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_384_5_e_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_384_5_e_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_384_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,5,sign)));
    Vf := Kernel([<7,R![-519546316544, 271760728576, -22111959680, 12942592, 29617840, -186176, -9800, 40, 1]>,<13,R![115283511800064, -1020751011717120, -13278939766016, 218176770048, 3129196896, -4006400, -107088, 0, 1]>],Snew);
    return Vf;
end function;