
// Make newform 50.26.a.f in Magma, downloaded from the LMFDB on 05 February 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_50_a();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_50_26_a_f();".
// 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_50_26_a_f();".
// 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 := [-6900880, -1, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0], [-270, 540]];
    Rf_basisdens := [1, 1];
    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_50_a();"
function MakeCharacter_50_a()
    N := 50;
    order := 1;
    char_gens := [27];
    v := [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_50_a_Hecke(Kf)
    return MakeCharacter_50_a();
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]];
    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 := 26;
    raw_aps := [[4096, 0], [219294, -1], [0, 0], [17004298318, -2667], [9672341395992, 3895722], [63898024016794, -47271012], [1499428967789238, -2203187748], [6767391197660, 3971672172], [88400260391312034, 44999906019], [-838048743654516690, 722007011304], [3562932578173188332, 2010960349914], [-42004911760904472182, 7687825185912], [-139488472569271504878, 83343268228236], [-213240801453411246866, -164046329250333], [-553810330320592270122, 353164108644573], [-2052818452318813204926, -235170858905772], [-1882780560994884384180, 14860272438149928], [544420304502201408062, 1018380001496208], [59082477263078964023578, 31056479117109729], [60743751025793642434212, -114696628759211022], [-771579537408887277986, -229827789456201012], [410694352766822420865320, -138369522893144748], [-539344981965578603074626, -892086148748866425], [2529609964702247860496490, 435505514236676760], [-1196684165395392696991082, -2053669692005990460], [10402757371290838946451222, -2128054814442279624], [-1548162590695191060500486, 13572168528387061455], [303347037319309467746538, 21288075176818353669], [2645066863692857264379230, -2363293399166273064], [18297559304589553933620414, -9775855390313960856], [241931523511949941933180918, 91270020470522512869], [165731187862104495172618872, -43014329791832401194], [-370426820616284710053949962, 219234537456019135008], [43051632306657432190240700, -324301738697968477992], [-794902977444736166143993050, -1073131826809820772120], [-814989164566034039548333948, -644509545139358235030], [1109202426142544599784838418, 621783757931231978328], [-2853171160140524925119046266, 1637845080491682850875], [3744413969952263988612839478, 3365444930570282272209], [1256692891216416390254292354, 9665833865942959788120], [12166016826419797748020077300, 5343372046769872023216], [5212065751148760631413436982, 12468654784184950542864], [898374820398331848019745412, 41718027441529733565918], [40383441086485566986299365094, 13859908508064868560300], [-9240795878903895126784482702, 9118086784212841508724], [-18984370168043437281822515320, 4725774958943133446784], [-195147638002412511130091323048, -17904175668376396581810], [83460415540388774486194784674, -57259056927694434133089], [372952537151062472357569653978, -97268023272037388223183], [231258627374364872761259950790, 74889860389921621191648], [162530850188584586826593084814, -287628930540400468356828], [440283972951732591604500764280, -116466803644033629570948], [-433089526102618073448476828998, 55130389485666126181500], [-599397747295904015286575301048, -600022325509728690174390], [-228716069374269034197247548402, 143667654311862065948472], [-754988480757922098944636636046, 1589309791941082246627011], [1139955653425028049013680940590, 444438555744037485514176], [1978569387186911242670240528372, 647982813752674708319886], [-2006401246810491154981905190502, 2587376701810531321465848], [-2178230465962008552148318415598, -475122696941752412457660], [2906699861134029033144074811694, -1101846126949443056687349], [-3048425483165224259862475164006, 900631567355278271151600], [-611608766704771151003119169942, 9507295444147880562617985], [-2358891338335360119689485238868, 1375037583305731469295654], [5728997329402069230718905428374, 2452788133894644444135672], [4952183243496426959482594371978, 8757838545332184594753804], [23017308889925224476000500106992, 23374887598063906583954142], [396631465446024936756124291678, -29825238363788311872418200], [7829031235616170427865711966138, 6527033328115231039926501], [-39018018019541010089810297398690, -30012054497188480711511952], [-61400206605161219501915579627826, 3522642011501828359481448], [11315978414796594235795486349640, 21112706876476258236209904], [-98574537715088538740149349270162, -8422156758996970417175823], [134481296879897720104946675102554, -83468003092051330810932120], [-153200586201297594686323885067740, -52308386779102856373592356], [-274365821005294507776103356819486, -45297366254107327350669393], [-85306849741924173511650696130650, -158499882481846705888762272], [271766775962225916841021656984538, 79519902640965724064697276], [404382741311768589439598577046482, -27483562776484916724768096], [-77193865986261671664744276670510, 45241267880589362686106724], [717849888560278694113975760697780, 107261648448530917298494728], [-716829561619457619512854810538698, 149494547856133208114472360], [-70880388008537228837573898595548, 656935830910478842777796550], [650656078867443850905209811527014, 421158027668295102055557492], [-64433995992546464464227018155080, 303769423419379983122346144], [-490601100243210641975333137792746, -768952283592953299117509177], [1028072910576098091571534492818090, 707493969626451944579109612], [1466729914758485160243854597027158, -130931422673030491046171760], [-195626999144851727507682709204098, -961051981277719685034541800], [911525370722849377275842652730594, -1043851631133640842733443897], [-3280029212858145587225857087160622, 841401779479181000656484349], [3619005477293852934038219672871480, 903279065659411863346210260], [1162423971838262970298690068490918, -81315053221477144982950023], [1347632037333293657533900378171032, -2913914601007873901037470886], [267112602554110520863005449688380, -2095303593442191206660478036], [5729544686055999323413486553717754, 724728592867240877554583367], [-3347591151467401052857904473956450, -1813758056782690328345185248], [-2595761651332931479033811943289398, 3174702806146016133405552000], [811753930646761264299723790720894, -5529849513176568655435346133], [4511217992840664984563687612905262, -16739772107392195480396939992], [-7070612462995538448184258718125142, 6999765706184510661348733737], [13522810131406021069917335808726978, 16899769493379311933510880696], [-10905472115696035827876961730338626, -16719330060696841577934329193], [12068976780480218979848947457075730, 12874645337173012822836053268], [-9996978511297914358744872125620048, -7430346246382002984770237130], [1123848194537619229314511279430878, 11457203681919658544932863792], [26345171242354058920885883457896658, 15951113488847458685130644769], [15828973299419900181969412914917454, -18942552129424845345074041872], [-71541822394156383506639189923471680, -22543001208959276885984452884], [46998245090233746530487925661477042, 36681334496137771744882893972], [87929674437679948321202010737867398, -15503487983931097500515522643], [74067156244887970701319194908174914, -637385355524528375951598276], [-95552794780995894374008509309598002, -2513497416517857940422539580], [79792004512744890980253212311707620, -26486646878431739937480009420], [12510459320755434959268156159132932, 50663389925591897008825740954], [-99261998995402994502659540945214198, -20753202535578957334625833380], [-66508121294369446422692888693093066, -16008602150593790758926590733], [-110798194764243265547265625238603322, 76954772432345465289690457113], [125627099453970911478854022260183274, 47851315477342641805586117748], [42668529852758187457626796103517780, 48089728711115863247637388656], [-13021245338532855010295059386496618, -89953888100535487639041721296], [44691854889883498841301422080500454, 40862821584132158018129732220], [229888016975181454739705700831068418, 85163083841314369918343380284], [73175266765642882436919357526712094, -129094908367409256223355231349], [307942744154339815028086655557960352, 127170496985882506800271398810], [-255959795136819299672724140133891858, 51855734748189339610883972472], [208300536877940241284840328042526550, 396652313356260217475814509832], [231817734004794619093428651271624920, 105221791964090698557072612540], [-569467020297743899431686557096902002, 204585280902037184461305293133], [-1028851892611375960005926895496217246, 59755464100981909638691995024], [-414929884134414287403463560701434540, -351693313950658339592053343784], [275016158162222733869671958433428394, -413665771930226646288823609545], [-50150727255232441347765775433251828, 528743645490487566575299235826], [117236240366709638607832825529145898, -475280789760154439180557522368], [775990865780227884143609307448813242, 532230137798368935381472917312], [-881242576529043356848970486464782190, -111465636827299275624122758728], [629192550113544641996840771018480754, -397687321942438060271908923180], [1059334531272289832392466114101801138, 1084419527295228502938799153773], [-2174352722092172185731573572367507942, 87732859327174808786158280532], [730745742233910212247354602382374250, -252115586679501762520936584768], [3246532281810777653298438784386234392, -867399205722634049559848845638], [1403178754887144356696576288315957382, -1375933242433881845826223026936], [-314268818222366536383565906062066926, -958978390910200426624223342949], [996962015844964571715376693610418858, -497533643985003390320672361219], [1523136138919033783001662669320505790, -1486724055980415341210880680112], [-317766401038196443988552140991880720, 2671264325342876971899352256652], [-1191131806809533578243827693455840606, 579937441050209873057467701204], [590445753811916824855182639921209238, -1845358705793337400772521301976], [2899107325449813830403965861356357340, 3187619166456588709378876061424], [3634374932609109333717149926036901274, 4216284377376714701855731650147], [3082689144836490706851386047445441938, 884874345534840115014431334000], [2688565046125464279896439291103162602, 537932518342190179783906203300], [-2178178337683691121444127733154636626, 2615587521475158396297763330815], [-5779555057557345148584706543970703522, 4198347702948916702481406004245], [-7014843363630716300183363336474808062, 1828824930203174791228757608809], [-678149051604206627476069426171612548, -2812345314637687430353743285750], [-3948904410426548998485727876925059600, 1712281125557002680641065598964], [-10890851978235683071121612839127735670, -503959448824595161430824867860], [-3128293816187465018278253476699878722, 1331529529785416615461532805420], [10628093594389381427089631436505831182, 98126714407904240571526313664], [25931447811149558987379696086180530218, -3533542068340925955998004497055], [-3801622278990730632336224344278353946, -2698472207424430983952720968048], [-6383878003560655942528974627998160002, -16036046756949616647157739778915], [-1522133279403372757751805393138339648, 20209730021877897594598691010870], [-4256972209278475800370095581471881002, -5676967207908240842716381089492], [22634601458438910242935746626679528114, 11395428456682082925261261629307], [-15853958642242077657346464157825642948, 11333940242816032350820571962770], [-1726675038638605845049419483852686462, 20686851129731032766079318128796], [3373099815163015399744694062872494690, -43587060537520064885751437262456], [28664457185428055659841041180497713874, 29194813479821166830951130077292], [5250405703955519126874736954629370500, -7466839172933780454783551197716], [12774204765008819462920860854793022622, -11506173214837593663179179549344], [8504304431296083416650455201304008252, -6676586997444578516804959643130], [30341166293650964834363494945482368494, -10304305605847457976952790313564], [-27668694484181421621391206061187970880, 8985278421420941657714902197864], [1117355758575290515259145584732974410, -27753251441099329096174891892472], [-17848965716603414936229927934760231008, -38712775382162443374401380044498], [-27449561452294562298298866427086513018, -24679850647379670632272875013536], [16144135220513817329012797929733959154, 25443420994350204077435441225331], [-21302291249057905837025286402843676210, -51194723518046564469157457783424], [-52849742616273235015750887974881664162, -26595741898350945404110955653167], [67249340928438344982276852305099949912, -1428040240804475948786976036282], [-37196413440433574784530575935342758846, 8222646917365734371621486562828], [12570678864912533990512822216444708158, 7352818535505676973422566891612], [106825775209837411642766676605751352554, -25821010088817347728970181712893], [128518995004634859332837209978933271430, -3421279550536043226758321829384], [29679446282875371335027297834260748818, -97252505634970973190829413589704], [108382157858971004797155412406473367734, -62397763871183609981869656170301], [-41547057927759065442832006261565186110, 7762257572402590540652800768788], [10041162706329866352603258385753985052, 206591683172504574650360542047090], [-42371225525312584397521019682662109506, 166191667218391717749369632737824], [195652993156847576510954718360599040774, -59605435278007183759190348763993], [112265159669193918262469746208127756512, -29803407014727640562936451944982], [167062038947220977837096141212010897502, -204405873025138004839047244675920], [-194770614643523936647645604294121725262, 50403055562939614527681297250533], [-136325020853297003104579551045734589666, 19752764342320005110865517743612], [-309365357847273388097056491654655530358, -129480786965229058535591159872908], [-75780643012809069580528144191358652726, -296976892777222547707483783256148], [-592964456450220984606982766653582614882, 18042607088869467419959828155216], [-208796270621574717635483179527835731366, -107071029330469906030520619821841], [390565549116172402560453787489456193790, 144132023716085959106887661480088], [-509214661851167261519304676178694675388, 103097117896946843441061560021958], [151313946812850246164094023996999102098, 95602830029600094407157873124956], [-405695820238908627229771894980756503710, 302187525327088124314425444616512], [224424821585519094401180526965905375980, -117285951736036544448766309513104], [69619264017467481406375435047822005058, -244167998364980324514889831235184], [-961748680130151708656929081329238822240, -213997906728731531622955039711056], [-967069020442773413540987715853107339306, -153437324450826626261876811372189], [-386206014735780612375603742199674986150, -88748326692927314571288987513672], [-148155678706748539906746807206514678688, 779495882196894657294213353156358], [-247350472067900943217216857847158209882, 60836676467148070630945720569060], [-746887834352711801434926751240942813338, 191512061351305218166068463373448], [-468801923527265823767929567907154148046, -142369540838426705399656239542373], [-652173044636128841403874940665012273902, 94538146446732117781600326418137], [861239950084290108358023995175026321520, -433163673963025692121332351548100], [73227409155873215578417145318106894482, -123945742579127987519820116883636], [668341417751186276901166586594499208918, 535612205148230270300496919986909], [10715147714144546087052362662413297042, 521753803848655087210906393231392], [877026130528587699388716365617674572598, 1088459925780999808264023112687545], [-447480745388117801530979340293061914406, 1466983675977122791679075595142932], [-2735014043734444549772847468244769068378, -131426450027757061654851023225904], [3113704583301151651808282287594417868480, -285474035190409452837519585156], [-292655624721123799156575070680015340590, -123075914371033804667582975058600], [501428339346790381121047659439088399194, 937900182523316094600511397907627], [24811397719104185644607652024295741698, -747359055637269742253719498019067], [1057010351788991370937536670681381020470, -1019250416931121974596169054075168], [686773318523463311219813101631288221374, -2526928028952954130471413167828940], [-1693265404975684201576517937669975831120, -1078901846071148596798328358688008], [204804822567987347481675289193960605438, -811705233583230281724222558600339], [364281444444723100087834519479107412912, -1791139203598526896565274847226322], [559104263441674400568788052663551448394, 938456126400215779871248614704244], [2871029408470886352731884157537773756220, -864058487675303068911087757083252], [906851968813201679160951706246529555972, -2254086886327962572846249356735074], [-2513859773986348900244256668542033679358, 108936979314379295763266722061412], [6322608234834134635163818560368513827894, -1240907544761054730722823440509329], [-5988820782904493566189629639241604398602, -64036134244730837088471752635779], [-1335879708208775755216273733892233669350, 2375043956388073593068967695145468], [1572683894677469693344801654650124348914, -4079828458159316840891758219850964], [-448734948378477293758015719219693790380, 3679019521645517324972276972473716], [-6275809900432140714294222413100648154548, -3128935658808913130494375321041810], [-8134006906185751035243129415402119623586, 1926894169188652731173579596787943], [5350755397952452384797913750926916583912, 3370271104078039378805120535220218], [6546403682023045164206390356641593913514, -2436149691651379607090327753267289], [-5981158225132289594648128494748672541170, 1161919711278937576935356810937264], [-7569769020044271206154370588572314742306, -837099386416703682751494840810936], [-2258421678252843438156174873595660229880, 1298303326597911253971410838032808], [3872208491628350963711886025713518186758, -2267506527710192034691543352216307], [-7869922358928836886052937020952769257088, 2264266581341782762437527849734818], [5660691007106271461098761772233676164860, -3174935461501234248187757475102456], [-2968485019599556850045631435664621099566, 5439929767164547231447840609945503], [7702176263196326995957621919535656421898, -634664657418015520219910271679476], [-1076462510338333107726310516721253881598, 5014404219559278088287430952111520], [-11696739307673674575021719161209700869402, 3085641664921465012159182239910057], [8294937721367522482610876455876225713410, -8154523106484475528569208970869020], [-8453601062630041310701649930955788946126, -726469006575655335319288665430608], [4765493391712746437326876033654577167500, -5780762801968464059680219316520396], [9830678488233939466930253932535266315142, 7753834637423687215486418640336312], [3777517891938846412343143840442927681818, -10813845027131897514562704538358091], [2496547861239436763708079193975623928938, -3241299296418578963847356479178712], [6206941757947394486915392720698047032198, 7007872487266179515564664612473952], [12107410618833321800672813175756024149914, 7412941318014059122703473289506899], [-6140975846828135689302119195318789237382, 15342542446823149870404790306405521], [15670076500055662961846087158023899717030, 9903262594604120736741844890783168], [-26310207739024694485816725215652532003166, -495171637329020370548252029418928], [-1094081594734111052797793687021372123562, -16292818907867460420401687646521724], [14291194295851594787118037966320863259980, -3208375820850037240958735713138116], [6049440059945855866150219951560298811790, 1673426344536537611661255855952704], [-19203964162679939868169627989641422544358, -18985939408901631526581691441302288], [4048172696404003855847479755525982035094, 11007864933043548740127911831838087], [-6761351857788183635535922809135509381046, 26999208283257535261539190777525704], [-5282539266215500840391796128179597886578, 30184493998411414809056366377422096], [-37747437938306093687470560046739147806862, 11797738382943280385295864070638381], [8808813243741175581024522029909904220414, -123920647323398131123247311871820], [16172970218748985584459860954851238620160, -27937633143963940859522606433048720], [41909724233440566091842543140906050164718, 10273166659679924251616223972722064], [-49712617301497233471235498299175276580246, -4342544623566009623398533101147121], [19034495902963595424919438990914942983298, -43810243061236502426441591262341199], [-16296339158367362686850907981835381052530, -17722379609496386695339924323569496], [70092864129390158291631062743830604940642, 2149939794492535864989756558434772], [-5013844395245640510913877002870953210648, -28898549013444730977900478009054170], [-9631371404334014895231591501747711977286, -34144639767285593989514325070079757], [74451745615831769414322491397396420684092, 17211991688744321555608104862810902], [-69716759884537065599346559134267025142562, -15899004004859562997337656084991499], [-35833728063461498269760515967082684304858, -14688088719697196193099365402835168], [-86229879552200847587553064758908070710222, 12949390174351141783234844658334449], [-56599022972214041438794969330218593661348, -66239062337491098318293279317605510], [-19466110428203938761187019061465952624106, -86053919920337453194814638935162228], [-34125499131343299240518770137782429695182, 81503952407703677821446967969706124], [-53981951141615682254790394793217746614720, -43601805094550699906682966682335060], [-129680276600893805337649050199522689467190, 5175788856415942778864289593208876], [16886960347805703809735413302416458672062, 13371435030369243818302964679780648], [-10562023713048068850521325069181505475822, 28635437676902993011249451630572941], [95588609927631169323323584804977246201054, -23393978847369412622371216354986444], [71219882268263397458652656327201037910632, -80673145872366991756204458458366526], [-70711875406723912322075353344535299815246, 34728611614823460392536039278747984], [101394165101189598755191438480685433979470, 97828163953214042298432394728223416], [50960103652838378794694761138297097839052, 50601864881354590855364061665048490], [-213975248160817429240861792354749254153046, 8774569738367187513918060822459360], [-24535994138279481464355387842287564832700, 137189976519455233385086995705984876], [8809951551255635514195317522934726382018, 94996155506730151631507070847298637], [30798289097820239444385763167824568769654, -29551746923149225418290253080108992], [-59970299462399788228931217775247268360702, 167144213249477851798286447071927944], [11406100683792569794058788525524518432120, 158011916163303301277396073859534956], [118892689052947662205063664705176979235414, -25910519541846926883144541912925445], [26598946609530213393909389077732015668152, -183686699386651218927025827664230270], [142086035823382186046399081727458222789158, -113451999615049508109214529683850052], [-223705024479812596520455608236080216317822, -115468588788144543840926209711460103], [-74568586884376879528865035605157557984130, 100360608451946185087016543750399592], [214556443520100787943867058471293330995560, 38316679989125247965234167897666536], [237565017799818022600826860055776464791434, -51145510975260929207817959575062264], [-112348522003683775428575793982198065326046, 243895029902697408860813769495104391], [14131500549173308204385952761687006502870, 42399462576475926487256375265311280], [109166509701811200997953082466505378190722, -250031574809080853220576674641867824], [214076257060269697140735567828723189854494, 235410920414857726882914681135314991], [-407504015225169129247913519051821281986922, -110358404545051931164009512715698975], [48584001113300634720556576160495738460890, -285883866028160603657393030599651320], [-90713517292946190589105939786593405383700, 242162045998886001895195666683551220], [53663369341319820603937655649192944599692, -97209707515578039758271225595673958], [-120807492819867931317958266993157406779826, 258027594040478236121098604188039032], [530291432218451183713676122760923551399930, -68545727425591843594341027996781620], [128520724056493812874458868839192955436912, 154337440666197952794435998153608578], [653330446206968356789397519893793271574918, 44510714544180332807085546898395312], [-170943484493149456937205050292850057434018, 442974463413499578235092134740126224], [-335435877996956345252089248439396388706686, 316233264834055114233019584185078511], [-358560562330057047830401558336449268862586, 74074683888345563502144483789406440], [371536393943909056174173278130745437515162, -131971775452952655824036481276494772], [-407106611118335042171868130269095149288900, -168814925815724024160403337394662604], [-468712871603075695590050443957981947958586, -381094034647550849898001847366372865], [-549545473010696394644671332920632687141242, 119409564788362017148457483981466765], [-505418902986969445920117877307140416851166, -212635255289158878595101113901199380], [388064596392516097341846677106713336005502, -577822419121343375521109755543731480], [613078347247010896161765748699439735376258, -3843010203298337910024963898922736], [-698723063588501597199682156530252947255560, -245187581818296336173447727815434140], [242325436487510769574148284204653807449934, 364535248393580386179729048747137607], [1364288023906572044041850866330659573205112, 114017161628120288606136115863072858], [515367561222396524451241611720903876073818, -558477677407844041497704405923481259], [160346692232743447196525989275654055869230, 521922121738194519874313511589621608], [-653060331452610533081809383216622859089506, 358176159317454637518429971511518592], [574980189813514684409372693580283353291362, -419508743337191456623249558968239292], [-83996784863489086259217995038224383599682, -733717835394897797061983191639274103], [544083054534701603744063384259419493233194, 838549351106011251969996760309278720], [-93296935127741219151422776342695411323322, -925772875168766172160664237286397632], [204903808552192679060172212369696724018390, -1203426960437688534828257322773694456], [1517229218865111725403231644901390313209572, 449457461030694728969719520702955186], [-143641986574842438890578163783226642122286, 1098927503780051084918360728097511672], [-201531835708980156181509444541679294788980, -27793171877727260669994852288057636], [1553712013060143980035517109553520757893222, -19868003067310735576631429967190704], [940943983330129423208821305875693761395178, -872031371126692227754021233039280347], [-1755448742908887944227025809262197384001748, 564238601242804352588846435583395970], [827910312685623003661546188025599440168898, 565992160330186516671435495961577172], [104364286787460136670594897701083141593672, -1126572409901429155596339562911722034], [-342617408925757354250277797498510761829882, -849313226656033280533135325776690056], [485942001725634929201547186869105530048302, 422448774685870350858746235190644960], [-1585686718251389111901713079226366534541846, -212410693865405939956689210111375741], [-724962183877576522568191897713867300471370, -272237683965134305125079124689006368], [941002780215254371112172069958081571329614, -147978786447105903271790669123765364], [-775898687497731150833670684519783490149240, -1714476717729669532698675868886394132], [-2155051730256228989769252960437237351156448, -1061061905604267958690168609753170090], [-1363400780506481576160443503477642729333002, -983563074635308783764471901948694580], [-2934993599404556329028586425790323148008406, 387886892722534076398297704977195247], [1235074815982567039129575647344375663142818, 440031498007227285132472447575000252], [436225998528896593688570468193915597297162, -1473403954586743402514438796306700512], [-2931268179308366937645178819819046277488802, -560888037313344202261359566603671191], [-763059995272469948194764388589025644110740, 69280513755449557454227729411655880], [3484542767501024670930982395006617092792738, 52035984443933353304525456382040557], [610896868566033050402252984739963031790014, 172714876663768260169122007153650348], [414496156510385074018836208529619171967338, 2076943535053831118993913235912192740], [3117031500519566549467398324734624219238274, -275272261443447523781340873998247717], [4290948764015675704964606813029502392671842, -694814420150309960134286755832584068], [-1199500453606952047038794042173393033562328, 2179675889604900109018500328588885806], [-2521443314271614598692625822853415491486300, 2697058940646525635233884253720521108], [1332756203247661138083778728542248502815554, -1399350739959752757817800979456943097], [-2258747808033669532434883288731115687473210, -1792829697833362985205240943187193528], [-2121672972796664845794729971930380341038428, 2293560595736404609147776853009878666], [1847993235705114519490350708709874946589258, 564069882951521792227026346255012620], [4737413031553902288796415365666071315070140, -2058435972190844986213593832626311172], [5915031067044680580214958490619911572777052, 427827152461175996401787087018903970], [2510382572209681994838605519114472338719774, -2677987804156757377775552120518918176], [-3144088676584384528542264838694270427379590, -24398207476770157387696150918800900], [-119224343123835473067651859367039348373482, -2691697307090229762534732386224157064], [2370291303630602090380705861335924369980382, 2543468765240536892755512754908263904], [-5731072943075442240965992324543050384451386, 470571973218822265081678285479571032], [1480689689907361007197216254324005085524878, 7192246502973738278979948596933682573], [-1362212778552379380881529191385779415615522, -3308975824784867294001333641819157024], [-935304469817196502198887200229222446875540, 2314817781082352490282603036099954060], [4131516601523111285081658891572973200871714, 294419704662603021559705281425008059], [7072965927941517345979220699120242882295492, 1054383806184800230430211054101408982], [-5778054990089276373268986307520411999856902, 4442193597661333577380544568280841688], [6566672327061282720968864179009440539187814, 4609040913572724110695846406913976767], [4767914410415897106035407729795161626659158, 5062638434056276890076692370373885109], [-4785114572421413630056491971152611605709910, -960409272859183132015763281341436980], [470782982890962896952310260347493754542474, -5424342127057956782857462883495462136], [-1328039869674326878356765146879653464091380, -4491130498480881764359387530426112464], [154921914342099369176579192216433734761618, -2982137547529113000076679442221427267], [1647631615818793000533501761970525040785972, 496806512315318301189554855587438866], [7270069307610697278907642051016498535492454, -3429401782934575889969166331187303904], [6717202330101631075521263502478461671968520, 5782105168986518606501320552425148620], [934150587264437242480092275654246898494250, -590909314214719363772463243107013984], [5762887354207236325960039965300094061295752, 726657235460925758172703989349803330], [3752697382760376974737730538705217271825622, 1375454500503984601578595491781953696], [44056399663864866986563712321348373470990, -10530464529266820500578104417948384408], [-1043901726169264775479296081917276948782506, 5274306382411471324506444306445355124], [9165483618192015594349396219786246776851758, -4330165328375036664205075308608969247], [9398861456345383517264616618280984044540198, -4862921275558734926298968425592593632], [-3765140006440549881801499386849508267543770, 6721833079218292714375695217231318992], [-7568477801263905324403592595758626608728668, -9654523549708890884546576680444169406], [8711203357545022946481119409421734522069418, 723214969841974932785863726227670500], [997643135909763366902842365573724784007762, -14193585624396531061702176700039879152], [-12520323636805810314244757228424831446993186, -6141703181912532561600809411019999705], [-46073440357318332794861019938649955605660, 5512686379204134578064020522024023776], [-1971863148766473644008229760236889593364866, -16875519845714687032062723939856232712], [-9674489781097397768908992661323736392302982, 6610588156443880055662248808401408072], [-3869312512966914717194749190710399394785746, -7776810484518980359927631744829838197], [11709336119674113295486682298144125195487032, 818226473184433674025158401929213254], [-11007499680478021354395145473406930354337282, -8655338986325356153005661406959457652], [1920424794123246727502008037254053701600862, 4027073818073535191303531316834773208], [7259013935232243921829782006334624982662080, -13135002616348408671923623099236895680], [-1371780408061381603044120072720436691079482, 13221714633653410367628257356108306617], [-21694876978588576327838144144758082378733402, 6852045654873190935861251389207099524], [-4201059040142511428076792474619219098743526, -3137885734708001549622731431029301497], [-17385226054016680003449555380228837497738530, -956111810105618531255976693862205232], [-8908158862423810769828145607842493240342622, -10131529619206799523717540592459673076], [19357356282096227878098981470810682390846438, -14047173648117139284047357284222506315], [-10071825805352592161499842872212840514019460, -5251045953612326924643002304384853200], [-37665837250046621711287156858367047986169706, 4544603083273354920159625593124393104], [-9464775272820283770878839312793484227151582, -9577248386497121324724770029628662632], [20578875636828008191677476639632041773886294, 1451829618253738200112153430267861403], [-9284884150683707539354943209702227460866510, 423642716725507055172235666013297076], [22406167566641600858508573234089923963738832, 2273034985971317470103545978937874774], [-16064596544107837433459583352257825690410280, -23020746714949460420719725408619603824]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_50_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_50_26_a_f();".
// 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_50_26_a_f(:prec:=2)
    chi := MakeCharacter_50_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 26));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(2999) - 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_50_26_a_f();".
// 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_50_26_a_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_50_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,26,sign)));
    Vf := Kernel([<3,R![-1964206822464, -438588, 1]>],Snew);
    return Vf;
end function;