
// Make newform 98.13.b.c in Magma, downloaded from the LMFDB on 17 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_98_b();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_98_b_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_98_13_b_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_98_13_b_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 := [166146008225686888975158615912586831592255841, 0, 111400901558110496276819595183126508110288, 0, 1439579890626389563511626657632573372, 0, 7194684838492777650788022411888, 0, 17814546644991454004799078, 0, 23874431083308410544, 0, 17532494948988, 0, 6613776, 0, 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], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-5260324009289780797756128473448618259075543856752051320965679098628568227, 0, -883709693404455358986878618578209726606770576285371768478432418275835, 0, -7658589423615956590988846040707488803578535072590917657396909191, 0, -24429281106164464899341491642554383610492607546568328581103, 0, -37525326005789436062898698051661429541328483615973513, 0, -29809609268437465030909277551816879994376366897, 0, -11784858787618912111176900733973516985933, 0, -1833263318430833872861825909044965, 0], [1833380399810375997638093499277553975788964207983094311526087667588994186869, 0, 8359078200169312701367875122617901252384784113112262388734682461349085, 0, 53610125965311696136921922284952421625049745508136423601778364337, 0, 171004967743151254295390441497880685273448252825978300067721, 0, 262677282040526052440290886361630006789299385311814591, 0, 208667264879062255216364942862718159960634568279, 0, 82494011513332384778238305137814618901531, 0, 12832843229015837110032781363314755, 0], [71622868069324987235665287612372777035216352211624370690485433274086398160104117861655312632569, 0, 1722989122228622332657348796853591143276561845236371941283595158240415422055246755057376669, 0, -48014497800715468020318971312339538771089588272638584357314623338199626966837730131883, 0, -371931648493421710103117821908942639456889351160029022029553276260016649425139927, 0, -882963795775585688465821088130915698826147981375628970745790488471846188373, 0, -911871303922670533428799113384479708052378761504335775996222677434345, 0, -428794161655372853926874781430660204318149303132575107296938745, 0, -75329651029085480733506808930093517721985093526505065949, 0], [-3642246796441409308404763492279876192381761989200859137929154056593571773500680351695539408392444664137, 0, 204524326615036242485017143706727972016934553910315383690330726831912006660082279681817847468547513, 0, 1932713489248023355643622564853192302462773649959749283923384145279068431703066871373198901479, 0, 6252807392757338264247783606597231242530177166557931333431164154084521606048915487814061, 0, 9688804365693485609220821320223726218700916120042955834363271468225728485731678829, 0, 7733556450429620220951806817311547982827044236923433332358728429037350580155, 0, 3059434294847310932432556097551527006387713386639689997396506698911285, 0, 474713459250930089474616913255756400041345363692351311852843167, 0], [14799880932494128498496365286219494921176152041853369805476196479936097679921043735094980660499131460, 0, 1493106248058523411927683392725712955583019086050085959408658072580656650149982132360830730790593, 0, 27678689398629281422104187960327863789378985798740058154597820086627071870804754511394329330, 0, 151839205402062669744381832200251136746569589026208815846238282733714678797158203397899, 0, 326505255861225176672463545802165421951769079726527465135338923696700246105128432, 0, 322548560823701446719999870464733115894167810269903706727237790622204802887, 0, 148157994063791565107409256990006035293139532942273022221657237469658, 0, 25701467192162159545823628732358531658282321878549427444308717, 0], [-32937325551889974870317486398805799224675623661058818463548231696245151624683810240105370773977092355879, 0, -4582166807163089420327971364666839068242965738081371697619399833381749171714524229926247742074046095, 0, -40941963056758408474539146755763788570959759722473982410281732007078227476339674184188285282347, 0, -138732474998525176289064309811833782062383843660420344184792100624143448878642425184371811, 0, -227350962134728708041138481982206995534694889171655301653153438882521368738865141301, 0, -191419166613556422989168709195381670232234864251056330623561921572128124676109, 0, -79521661893608778924847697400424532282762965498197851149579541270981241, 0, -12899453016579818887752059589142792211910747486804501700909181185, 0], [-6537276958688212272529985986491808010018071688914146499202246711734264487163842143634579908438237598703, 0, 6422717394654922601945877798659945022140562315219982280271521760341021674609252560981934045369137075, 0, 62193297525432157517166975111794561734306144198133684778413162625693190657145666862955803396381, 0, 214296594583447338045193326868275721239618239202355177669176488592292210278454129338659703, 0, 350545522077906762580302421495499155029876268014239511527983769145854723980180965363, 0, 293278519385790689032421423221047467222667862035922966839017045214889743450777, 0, 121063805762454425051889087502538698991813379921322850418510680732649183, 0, 19536107554269502537100753855767278682325530699341017022364138045, 0], [0, -287425859329311901849605764137004034358999830432584786238462231372790729869252819, 0, -4018380947546245406394773375648497548236844796500976553583834655871520689256, 0, -24223444260305933280497196034488021957231111540141105390208015814393247, 0, -72965822527880848497856506523347643880454439033941757912903605684, 0, -115030803068450674555734183975568320540142634749648113661785, 0, -95531358712199824141278587388716000392217971752217488, 0, -39471284824360168640422337391250961109543104757, 0, -6385310734399849895570714933370640058644], [0, 864911223396787288310643878519719727474455771854091125755399201376797171272281853789941433533304022210662370185547439, 0, -234679459828179507048533116260602054844159221161653544176818536622884429371247290650373896613650130534345150317169, 0, -2206033570582023656720211234649988469312122977487209899776026643455838260440548454517897531375779924371084013, 0, -7421068151283687779065019798078166477976701813210508127397401750138063829146031534265990433941511326221, 0, -11937752939335800671548831713113441229711976969506675131598510464401618775457467267954775677739315, 0, -9870694679480116758131589920423974561805443948697940619495559389217236368870793312725446547, 0, -4039614381244631681330706250961068748001284549006994764923891582227115824001530300303, 0, -647575946838665620618535256335132579497153044537253480376363713951173228903151], [0, 10073954573832228842660983588205698017002106574734418826270125511105119535307315, 0, 270106001108698467001486029567859557028048388237235246293506084958765198343, 0, 1838816105255969896003521908382919473145269358592136170473482568681191, 0, 5196701129091222866403879451385096817093314525426856724084433403, 0, 7373334361092469718970961292394680507246473756473556779225, 0, 5545736011559743877495057362303741531905683499751989, 0, 2111094218316820402237527598534895935602752013, 0, 319972062280216006925084161403848304585], [0, -11124391601747066902191024452761774394427061335025653890602007929618189783678300794645845027140216960759599545871253743, 0, 891867744889835092505414890737881970575332619372193343889399897341133861897626969963790452951531540345775103709737, 0, 8550464785537163797760096439391442383999158393050881333417709946327751664341172557152429805558723370462806461, 0, 28236209670242239967855458632689275001213592188447221773164619545036234751278934306395094852202903884069, 0, 44317229911122611289782815160685593441188430497907307033859626030536616843913871945682543626931411, 0, 35793275830805555149502816874684521672947973304677469275782381573623708767894924432544403515, 0, 14348504807170287622788310674505275628677087997411879625999616354426411067143841684575, 0, 2259382691928053149374245812317881218962559593659549726404501279739603000170103], [0, 473423755674312618740786694864391183488226927080282838386834484962577841745855596340262197435922053168574127967140672601, 0, 3221611823317687978367227509110114492610415939946058003538115360393467626763032643074561066355204000427994813932487, 0, 6662209334747305343601118636121244069893059175769992916305063726980756253725318799443890218290249832037824373, 0, -661608339766043348672448860285359167072900258731680605789614874305580036834573514984110971798637588405, 0, -19182738835371112113128017129286129075915547506167860065722561050943957073832199379041266373432533, 0, -24800021634401952487739463632649115488654249241147233246023359614385283617657208516311912971, 0, -12546588497716631011891943745705043857203532343945796490449400967416828261848796510969, 0, -2276387078196018403438088646859297940501470960481369879421444107612765968990727], [0, 98102536049744145539084483224134830862464358957513285769786721960822475366687587131274914067416908998577574292477409660, 0, 206477289391958717937597696425973259960054401683142842663710152691213679899584081750559610771130515790115194342201, 0, -3578968399855654554651158550467914172336778952592852326765087639081693045677638041728557646953628367899941970, 0, -15994930153344948085534866024421372367009375785564959064875457121476046946408856522978320632813180352597, 0, -27027751039225170741623516353689980834899579569823236406619414383403639122442309504261431061818416, 0, -22232641873252212346051364659476316562210688543929284422270349834938661487118065155364600001, 0, -8916864258662941051247610426365607595372552786889016583431012729121377905223446936634, 0, -1396536027381710083681428174790375230099581231355919275788628525906789290037731], [0, 240420480359383010630867276639855359753714627957223379869285313088792925824801788614032305032820353795622858193071466773, 0, 4558027908880927647229104409578138163072086548823692232327763023054520602905436226237163985265857582937805878912533, 0, 27853398588603642563402945718668514645844007172374109697756696475503942064915292608839422185702566788572192289, 0, 77586253331915745797148686208654003309977187742136112747910854524784865131800730927021043183503955243761, 0, 112238302215359700248291198549497336230062983825746092396635176623879802088586803969936703828623359, 0, 86819917320497299670519372818648314149434544912264917928802346474055866406941886360736342495, 0, 33964952739464082025682766042846331509616716062207105868977301284289157664977329052875, 0, 5271602149771862601690703061413141626029400138544734297033057114754774981418267]];
    Rf_basisdens := [1, 1, 86924413853525007538388991702817326645495603164586400375426221336729600, 2173110346338125188459724792570433166137390079114660009385655533418240, 775110168134967838148825210770754963222326146564944870554790784330994252242130686755673600, 3775232077978942955797074659478901393204087300917865268744921698594468274948506962623233818374400, 139823410295516405770262024425144496044595825959920935879441544392387713886981739356416067347200, 30201856623831543646376597275831211145632698407342922149959373588755746199588055700985870546995200, 45302784935747315469564895913746816718449047611014383224939060383133619299382083551478805820492800, 18471426592401224782079768774494844620409713783864949274943028936825859574588800, 29667336927567978084748817866382536192865980168650216047973125128824297534239262361446599160823781897482692316953600, 14146923773497709672612678305739572572157756359793939062073357876516595042304, 59334673855135956169497635732765072385731960337300432095946250257648595068478524722893198321647563794965384633907200, 29667336927567978084748817866382536192865980168650216047973125128824297534239262361446599160823781897482692316953600, 7416834231891994521187204466595634048216495042162554011993281282206074383559815590361649790205945474370673079238400, 6592741539459550685499737303640563598414662259700048010660694473072066118719836080321466480183062643885042737100800];
    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_98_b();"
function MakeCharacter_98_b()
    N := 98;
    order := 2;
    char_gens := [3];
    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;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_98_b_Hecke();"
function MakeCharacter_98_b_Hecke(Kf)
    N := 98;
    order := 2;
    char_gens := [3];
    char_values := [[-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 := 13;
    raw_aps := [[0, 0, 1, 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, 2, 0, 0, 0, 0, 0, 0, 0, -2, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-259011, 0, 1915, 0, 0, -2, 1, -1, -2, 0, 0, 0, 0, 0, 0, 0], [0, 1557, 0, 0, 0, 0, 0, 0, 0, 500, 90, 101, -50, -5, 0, -5], [0, -3517, 0, 0, 0, 0, 0, 0, 0, -12399, -248, -189, -86, 29, 24, -3], [0, 24936, 0, 0, 0, 0, 0, 0, 0, -21288, -310, -239, 187, -53, -65, 6], [-3203820, 0, -439717, 187, -91, -19, 23, 137, 106, 0, 0, 0, 0, 0, 0, 0], [33272559, 0, -1809050, 619, 260, 10, 1210, 570, -540, 0, 0, 0, 0, 0, 0, 0], [0, -72255, 0, 0, 0, 0, 0, 0, 0, 554119, -1399, -15450, -14493, -614, -989, -173], [-720565505, 0, -299713, -119, 1594, 279, -4367, -163, 1702, 0, 0, 0, 0, 0, 0, 0], [0, -40145, 0, 0, 0, 0, 0, 0, 0, -1052326, -73656, 8631, -16154, -743, 5060, 1541], [-4183089500, 0, 2329502, -1902, -4186, 5314, 3862, -3142, -4156, 0, 0, 0, 0, 0, 0, 0], [0, 670265, 0, 0, 0, 0, 0, 0, 0, -2309975, -515021, -206484, -29313, 2700, -6417, 7677], [-4891770225, 0, 85922973, 9607, -21010, 8865, 7419, 751, -12958, 0, 0, 0, 0, 0, 0, 0], [0, -4878875, 0, 0, 0, 0, 0, 0, 0, 24776146, 1181782, 214488, 103458, -22184, -27830, 29878], [0, -223383, 0, 0, 0, 0, 0, 0, 0, -41110226, -752329, 189451, -284002, 15957, 23020, -34119], [-13470889990, 0, 32961426, -48700, -20267, 904, -158934, -22266, 62476, 0, 0, 0, 0, 0, 0, 0], [-71891189334, 0, -587785672, -7370, 83816, -14962, -73660, 42452, 116200, 0, 0, 0, 0, 0, 0, 0], [0, -70748244, 0, 0, 0, 0, 0, 0, 0, -88847435, 2208978, -1127012, 2566024, -109980, 58416, -100876], [-28454008096, 0, -1643167319, 277421, 239837, 63627, -49363, 54307, -124114, 0, 0, 0, 0, 0, 0, 0], [0, -121966688, 0, 0, 0, 0, 0, 0, 0, -63312514, 6503462, 1277688, 2663874, -11736, 370314, 126342], [0, 285902214, 0, 0, 0, 0, 0, 0, 0, 302805863, 4980850, -10492278, -686428, 351222, 450248, -197842], [0, -267544437, 0, 0, 0, 0, 0, 0, 0, 518458302, -18368288, 11153255, -5002278, -269927, -497296, 14913], [0, -221918028, 0, 0, 0, 0, 0, 0, 0, 73462120, -11431303, -11335734, -20071880, -1026522, -1279724, 75658], [0, -566189364, 0, 0, 0, 0, 0, 0, 0, -35614967, -4014139, -34004141, -10969328, -647903, 427372, -320229], [235153884645, 0, -19305468071, -521606, 1161932, -245036, -757721, 41721, 999330, 0, 0, 0, 0, 0, 0, 0], [142830986830, 0, 1645194233, -502338, -474274, 399673, 2008975, -281653, -1882270, 0, 0, 0, 0, 0, 0, 0], [1145527485435, 0, -9451773534, 188711, -1363376, 250062, 2083590, 2998550, 1482724, 0, 0, 0, 0, 0, 0, 0], [47849169620, 0, -16555636898, 1275054, -144698, 527342, -2758714, -5937806, 2683972, 0, 0, 0, 0, 0, 0, 0], [0, 1464490473, 0, 0, 0, 0, 0, 0, 0, -1784717650, -40089942, -78061374, 8719576, -5763082, 5405736, -1957542], [3685271975550, 0, -48515805452, -4847065, 1214836, 452452, -9488012, -6593468, 1676408, 0, 0, 0, 0, 0, 0, 0], [0, 4642040778, 0, 0, 0, 0, 0, 0, 0, 753891502, -263076046, 26349178, 69420244, -4171970, -5428196, 1549206], [-2329959028356, 0, -153606915819, -5108452, -8517278, -2247003, 2797467, -5737633, 1256266, 0, 0, 0, 0, 0, 0, 0], [-1655976899915, 0, -58213772408, -6729943, -2882266, -10249311, -273466, 2195074, 9422252, 0, 0, 0, 0, 0, 0, 0], [0, 1938050649, 0, 0, 0, 0, 0, 0, 0, 8405404500, 494102247, 10939923, -19580454, 16048605, 16960224, 506901], [5969945827700, 0, -30502804006, 22388506, 12757303, 4017090, -1603418, 24771578, -2556284, 0, 0, 0, 0, 0, 0, 0], [0, 1626283565, 0, 0, 0, 0, 0, 0, 0, -4391700858, -310953792, 503480733, -298646115, -3292937, -7953599, -4724984], [0, 5981567151, 0, 0, 0, 0, 0, 0, 0, -11782512890, 74924703, -193814283, 113925314, -11887205, 13749036, -19176681], [3949350127191, 0, 199584257675, 23524378, -27270190, -3613204, 11975117, -10115197, -28582634, 0, 0, 0, 0, 0, 0, 0], [0, 3876976962, 0, 0, 0, 0, 0, 0, 0, 2712973010, 1796197122, 56512826, 50417840, -22198362, -14988444, 5502898], [-10351026609435, 0, 222851201462, -34732513, -27955586, 11743007, -51696580, -57938772, -25425360, 0, 0, 0, 0, 0, 0, 0], [11677035504970, 0, 31813650134, 24710125, -47923184, 30427650, 32840050, 34595570, 33257500, 0, 0, 0, 0, 0, 0, 0], [-2072860330815, 0, 71197991590, 66678373, 12157160, -10698962, 48401098, 54057522, -51207660, 0, 0, 0, 0, 0, 0, 0], [0, 29963262153, 0, 0, 0, 0, 0, 0, 0, 5303255405, 665706607, 874656902, -377424983, -39000630, 56617601, -8425971], [43558028770864, 0, 883233252458, -52936762, -21761694, 14739710, -79361486, -54770722, 39154092, 0, 0, 0, 0, 0, 0, 0], [0, -67748216658, 0, 0, 0, 0, 0, 0, 0, 124264393100, -97385756, 499774458, -635849218, -85886610, -84541522, -17512468], [0, 47029907016, 0, 0, 0, 0, 0, 0, 0, 64770190734, -89036776, 3072934851, 1566434339, 92204801, -16392257, 59764816], [0, -71900485050, 0, 0, 0, 0, 0, 0, 0, -30297389898, 3116569421, 4320253272, -116696672, -35636808, -97945832, 96923848], [-780242780250, 0, 2225938717096, 94851375, -82327548, 64250308, -13271168, 139535048, -76390448, 0, 0, 0, 0, 0, 0, 0], [64616844199977, 0, -95037244069, 88215480, -97895253, 86269478, -51669811, 211366195, 100758902, 0, 0, 0, 0, 0, 0, 0], [0, -37277964438, 0, 0, 0, 0, 0, 0, 0, 90225853631, 5016980716, 1076927122, 3198819756, -57737010, -145368784, -31438466], [0, 56913072833, 0, 0, 0, 0, 0, 0, 0, 33776585420, -4036012094, -3137877003, -380316445, 7074199, 224548095, 147128322], [0, 116852588319, 0, 0, 0, 0, 0, 0, 0, -136855298833, -860333580, -1216104465, 923507626, 94853873, 456160560, 56020857], [37263561040800, 0, -1187839180009, -75906185, -419262007, 57163529, 308484011, -111357571, -177860894, 0, 0, 0, 0, 0, 0, 0], [0, -167751042281, 0, 0, 0, 0, 0, 0, 0, 346228701204, -10269574381, 1863622233, -4902067582, -43549241, 266362908, -266333781], [0, 150439609404, 0, 0, 0, 0, 0, 0, 0, -189149660705, 11530441455, 6724280591, -2787342506, -323256971, -453956478, -82403135], [105823984747205, 0, 1782822394033, 564258777, 646687678, -70849843, 405109607, 484392763, -190567910, 0, 0, 0, 0, 0, 0, 0], [-152347071631743, 0, -1457890051534, -158534235, -62125908, 237605066, 327245750, -217430546, 198631700, 0, 0, 0, 0, 0, 0, 0], [0, 156969509472, 0, 0, 0, 0, 0, 0, 0, 543685618736, -3530629110, -10986472533, -9583825087, 70940089, -96647355, 334793226], [0, -106542344750, 0, 0, 0, 0, 0, 0, 0, 103529617234, 4076551430, -7324730634, -5002654868, -109356694, -540264840, 671038914], [0, -72219139686, 0, 0, 0, 0, 0, 0, 0, 51841478634, 1997682402, 11649573558, -8316692392, 620589826, -351283776, 62835870], [0, 304550972288, 0, 0, 0, 0, 0, 0, 0, 302521427591, 4828264183, -11552383683, 4396915004, -372680849, -928075848, -77262999], [0, -95705532366, 0, 0, 0, 0, 0, 0, 0, -132420614025, 3618356302, 436541258, -7610290144, 485417510, 1081651964, -219662334], [-98686446813225, 0, -15517429617879, 1139877451, -717018886, 287226177, 413777295, 371730235, 461096714, 0, 0, 0, 0, 0, 0, 0], [-159496025903462, 0, -3438523170954, 712841640, -387357063, 182209080, -248536602, -753305814, -384608076, 0, 0, 0, 0, 0, 0, 0], [116254737585295, 0, 7758419194578, -327730065, 2276165832, 82332378, -116305338, -567256962, 381282372, 0, 0, 0, 0, 0, 0, 0], [812807741865690, 0, -14331752210552, -767442266, -480703423, -333564194, 286883272, 243973368, 279703488, 0, 0, 0, 0, 0, 0, 0], [0, -453988385169, 0, 0, 0, 0, 0, 0, 0, 1500893565736, -37066883618, 32333416819, -9160123850, -714139987, 1881341300, -45778151], [0, -1916983891417, 0, 0, 0, 0, 0, 0, 0, 443582474885, 22035868808, 771224691, -8484913446, 835168205, 597358856, 1304716349], [380370684359421, 0, 4551292247660, 1314418185, 2967973410, -112798771, 540985538, 844928542, 931508084, 0, 0, 0, 0, 0, 0, 0], [0, 358341763260, 0, 0, 0, 0, 0, 0, 0, -2148166348815, 49104507409, -21982050679, -13538091718, -1431136765, 962082638, -1394630793], [-1009697542169425, 0, -17006201099049, 49245525, 1313165166, -1093610481, 2438958801, -497724411, -3372120714, 0, 0, 0, 0, 0, 0, 0], [436687997174821, 0, 14417895858623, 868333936, 2401319791, -402217458, 5740312513, 476448479, -67202786, 0, 0, 0, 0, 0, 0, 0], [0, -36081590123, 0, 0, 0, 0, 0, 0, 0, 1867756652637, 39807645827, 70616441724, -61464574813, 3349361788, 1629417459, -1198575447], [296575514057988, 0, 14272317382939, -629688378, 4795562238, -1104730613, 3535036981, -2857328575, -1086185642, 0, 0, 0, 0, 0, 0, 0], [0, 718382751246, 0, 0, 0, 0, 0, 0, 0, -1262712469812, -33315833349, 24404494428, -2155694408, 799256852, -360216888, -1177028124], [1820910688597062, 0, 39845599118342, -1196818299, -1747189596, 1058068250, 3269689346, 378552082, 4893404588, 0, 0, 0, 0, 0, 0, 0], [0, -844451327079, 0, 0, 0, 0, 0, 0, 0, -3019826016893, 52509169662, 95430904645, -50661289162, 1850299931, 5044361016, -2009893093], [0, 957407762078, 0, 0, 0, 0, 0, 0, 0, -2437807499990, -28052577910, 14821171674, -81244578536, 4934144734, 2240357576, 2027653106], [-3015890582270185, 0, 33066514132142, -4512425145, -6469867396, -366956042, 697122442, -684419974, 2388797636, 0, 0, 0, 0, 0, 0, 0], [-1054208235491199, 0, 9265657921918, 4699557799, 4682824706, -1448792297, 1835413180, 5146823892, -419672880, 0, 0, 0, 0, 0, 0, 0], [0, 1053963194673, 0, 0, 0, 0, 0, 0, 0, 300478059106, -92192487944, -126427049259, 25051356886, -2642262581, -8137078648, 3330292139], [0, -1646558357265, 0, 0, 0, 0, 0, 0, 0, -2392356717181, -105983036175, -13392502206, 60312070507, -175570738, -377797701, 93817767], [313964785688895, 0, 59767598873475, 2781762234, -2334447222, 3567568860, 6246375813, 7446541947, -3216290586, 0, 0, 0, 0, 0, 0, 0], [985217165052039, 0, -16133086889422, -4013583065, -2721012424, -1652793430, 3473409014, -3451419442, -6318846188, 0, 0, 0, 0, 0, 0, 0], [-3403973699294525, 0, 94400370271878, -1701843870, 1266497448, 6353979510, 424884090, -1148267790, -3784822740, 0, 0, 0, 0, 0, 0, 0], [0, 5683252665883, 0, 0, 0, 0, 0, 0, 0, -4350841988888, -37413872978, 38966038599, -124939070982, 6669519241, 8000275768, 434926105], [185748747119750, 0, 32035030172448, 16454702526, -1445840328, -3609490470, -1994009028, 3275183988, -350901864, 0, 0, 0, 0, 0, 0, 0], [0, -1474848375543, 0, 0, 0, 0, 0, 0, 0, 11833409534882, 34186126122, 231452948886, -31408974188, -3754966942, -2427579036, -1958860062], [0, -1867514445128, 0, 0, 0, 0, 0, 0, 0, -3968041199379, 39493826329, -36240908679, -89466092486, -6860962845, -3720936362, 434684407], [-3125658465979820, 0, -34908760072049, 6829190859, -7354843295, -8967370447, 17040551075, 5831318725, -17999867054, 0, 0, 0, 0, 0, 0, 0], [2732971917534273, 0, -81941742110061, 6466282328, -18647945837, 13836782646, 4410291789, 15528615347, 15082096582, 0, 0, 0, 0, 0, 0, 0], [1681327486013272, 0, -115577552540554, -3896070294, 12205193207, 744655822, -6333921518, -11281544338, 11340826316, 0, 0, 0, 0, 0, 0, 0], [0, -3880086918494, 0, 0, 0, 0, 0, 0, 0, -9756023258016, 160031761720, -74241495114, 107392290262, -20783278014, -13401847130, -2439269456], [0, 1009048539748, 0, 0, 0, 0, 0, 0, 0, 18733888340292, -259199776517, -286134807090, 3312359308, -1455756270, -5212240760, 92832730], [0, 8831150903974, 0, 0, 0, 0, 0, 0, 0, -5569619837943, -121138695906, -349734992118, -114983765820, -3211030474, 18702193832, -5466336994], [0, -10287870484392, 0, 0, 0, 0, 0, 0, 0, -10282032455198, 390769581816, -253979874643, 40879216889, -6665050257, 10146541557, -15205385660], [-17038990021792138, 0, -123908994084969, -414844212, 6385527282, 5406375675, -17133773607, 10939792221, 37579995534, 0, 0, 0, 0, 0, 0, 0], [-3464801585529895, 0, -241410651875797, -9243481568, 28682668747, -742639122, -9063985979, -1725124741, -26613422186, 0, 0, 0, 0, 0, 0, 0], [640295403219900, 0, -2423867771483, -3249701352, -9020857506, -13121634971, 3372412387, -28142706817, -3520356806, 0, 0, 0, 0, 0, 0, 0], [0, -10583172950193, 0, 0, 0, 0, 0, 0, 0, 42014713051016, -194844625416, -76561219926, 283693636510, -1880114866, 13801464558, -20373093972], [16585516858588029, 0, -326150099251450, -28063288900, 25494428320, -13893175138, -8510459926, -28397460414, -38436623748, 0, 0, 0, 0, 0, 0, 0], [17025093242404391, 0, 65368444281525, -7574415084, 52033890750, -834498246, -8997529977, 1525333017, 5287157874, 0, 0, 0, 0, 0, 0, 0], [0, 10218755061930, 0, 0, 0, 0, 0, 0, 0, -15613093863653, -124674203984, -207118779230, 298823381124, -19123450242, -27719349208, -25120789850], [0, -20013693659898, 0, 0, 0, 0, 0, 0, 0, 19754995822, 534698682726, 280231039914, -44706474856, 22226206558, -28563896688, 8205281490], [0, 5895486010405, 0, 0, 0, 0, 0, 0, 0, -14405839834345, -917785877972, 178027218897, 209476241594, -12711268225, -21381752564, 24880014019], [8563956570925704, 0, -617853802455689, -3654521877, -12590871243, 20166081433, -30979781261, 61288029725, 12645168562, 0, 0, 0, 0, 0, 0, 0], [0, 19495931402415, 0, 0, 0, 0, 0, 0, 0, 145953550706, 1270264401508, 254650836123, 282299836750, 3408320917, 16535883476, -33368981695], [0, -14836698583917, 0, 0, 0, 0, 0, 0, 0, -6387543320111, -126139723805, 209266198826, -715986198863, -7330672074, -29999966935, 8496569769], [12592435372185830, 0, 131227395451795, -6087604268, 35478596658, -8100879149, 43302499253, -39362347943, -12647394234, 0, 0, 0, 0, 0, 0, 0], [-3653911617266655, 0, 109608310648878, 27394840421, 44975471152, -44547502314, -2970935094, -38241733966, 47585868940, 0, 0, 0, 0, 0, 0, 0], [0, -36182083604949, 0, 0, 0, 0, 0, 0, 0, 17706979783562, 536027162910, -569157797110, 271899980104, 5474914174, -12237495936, 25568614498], [26981996431736780, 0, 485309039077610, -25676910902, -19015854230, -60740175474, 15516358042, -4908687922, -51123289604, 0, 0, 0, 0, 0, 0, 0], [22538250414951525, 0, 785875985843248, 43598716654, 38599318556, -4480884308, 9158468848, -3448615416, 10469977344, 0, 0, 0, 0, 0, 0, 0], [0, 17390079836544, 0, 0, 0, 0, 0, 0, 0, 21896564479534, -109032155534, 247389823932, 617049685030, -17201012204, -5051429578, -20095962298], [0, -33412062242532, 0, 0, 0, 0, 0, 0, 0, 84806462476619, 1774254819099, 371255778273, -226363065416, -49759549669, -10921654692, -34443149679], [4650698249313165, 0, 807229682219725, -28333858403, 34961609822, 11391972601, -106077979877, -50799508353, 45878986146, 0, 0, 0, 0, 0, 0, 0], [43908635383150716, 0, -507429199849690, -21658583106, 4160741790, 31449368462, 51844485254, -9677091494, -26922250588, 0, 0, 0, 0, 0, 0, 0], [0, 24909956232327, 0, 0, 0, 0, 0, 0, 0, -16085067168462, -100328016447, 3552919381373, -1047030631802, -24066523565, -14859350496, 12840261931], [-7094595209946965, 0, 876208285637974, 30068663631, -9550442948, 38031102410, -24766158238, -57733456142, 90117805996, 0, 0, 0, 0, 0, 0, 0], [0, 13583782435314, 0, 0, 0, 0, 0, 0, 0, 52203332450526, 755367852693, 700391440188, -523751799828, 41127224964, 9228881316, 27955907760], [9907737994298025, 0, -320716865826921, 132703695652, 62497441796, 39844924002, 30642770397, 51239589043, -26075502970, 0, 0, 0, 0, 0, 0, 0], [0, 27926733171903, 0, 0, 0, 0, 0, 0, 0, 26020678681022, -2201221206034, 1074744086160, 440826902494, 62547829488, -40001688002, -863254814], [67445875084245822, 0, 205615355625684, -64165251992, -50500603132, 33645482520, -131962755828, 75200167924, 85433580296, 0, 0, 0, 0, 0, 0, 0], [-18488829451775075, 0, 76822250138587, -2507822653, -5371230766, 41071558107, -109571388475, 149082480193, 30367147790, 0, 0, 0, 0, 0, 0, 0], [0, -20622433831112, 0, 0, 0, 0, 0, 0, 0, 10791666774759, 7774937007735, 905606358771, 1955925140610, 4065951425, 90877186958, -32766372103], [0, -60555975630900, 0, 0, 0, 0, 0, 0, 0, -10461310649532, -555294196472, 402704943144, 696702748448, -64150138968, -167138234824, 71365112], [0, -123292573922385, 0, 0, 0, 0, 0, 0, 0, -110954945375030, 1148192909235, 2195956856301, 1264815614970, 11783428035, -82546933500, 70013441415], [-29143941701471353, 0, 1035784085436939, -19480320162, 89543202198, 4671812844, -272540803395, -168916421709, 143042271510, 0, 0, 0, 0, 0, 0, 0], [-73383390515637000, 0, -1186452656242142, 11420734718, -212953963670, -85558689578, 29921070034, 181914655366, -107084298484, 0, 0, 0, 0, 0, 0, 0], [30601134644570677, 0, 102042920338858, -71473641861, 254712755686, -67998276733, 80336597168, -149739335336, -215229759416, 0, 0, 0, 0, 0, 0, 0], [19724363336289565, 0, 118998247231378, -197572579051, 80390065460, 45867747126, -176943633538, -138026100722, 18179587388, 0, 0, 0, 0, 0, 0, 0], [0, -127109818880723, 0, 0, 0, 0, 0, 0, 0, -150109668701627, -1327671532250, 1395513742761, -1262681601534, 139453957831, -177736263356, -26703094781], [0, 87014331940035, 0, 0, 0, 0, 0, 0, 0, 85549018374734, -4086050921876, 3801151524331, 2694805305346, 142983487637, 107696781200, 48206286301], [0, -47691790516786, 0, 0, 0, 0, 0, 0, 0, -163342060838588, -926656559559, -2411609661036, -89076312016, 126386099948, 13105762072, 76902670420], [0, -36607447241157, 0, 0, 0, 0, 0, 0, 0, -15771483405152, -6689392432060, 3280704576602, -2163088251426, -142987427058, 43386826390, -13238070292], [0, -97807659853827, 0, 0, 0, 0, 0, 0, 0, 40470173323940, 1764942156782, 2309120208489, -3626033269494, -36241415465, -296655737036, 10668167491], [-103366944676162719, 0, -907706429429094, -9796708372, 92526039292, -122678089362, 131142518214, -53119164010, 63989663092, 0, 0, 0, 0, 0, 0, 0], [0, 36097331123184, 0, 0, 0, 0, 0, 0, 0, -135338961661966, -7429454757322, 3998665213308, 394092461046, 3294315748, 17046246622, 33291871942], [-130545096119596674, 0, -947611722045387, -48110663926, 456749847886, -243586420587, 191845506195, 9317860847, 69122978410, 0, 0, 0, 0, 0, 0, 0], [45181808501123420, 0, 3574233655012859, -28158215429, -243999058943, -22258901559, 43322466751, 136208530289, -244797965990, 0, 0, 0, 0, 0, 0, 0], [187370137941188850, 0, -2837802472614408, -11438157710, -282189074632, 229799389938, -106998668748, 40496428, -94708639768, 0, 0, 0, 0, 0, 0, 0], [0, 10859535824982, 0, 0, 0, 0, 0, 0, 0, -119319000089650, -13471903972801, -1610466242020, -934720833164, -64694093308, -70930563428, -284546665096], [0, 81995290639178, 0, 0, 0, 0, 0, 0, 0, -83074031950408, 3278097894796, 4796002126698, -4278772965082, 109950257182, -303486466194, 237452669460], [0, -212762372877183, 0, 0, 0, 0, 0, 0, 0, -139928481538384, 6722490557150, 5785131250841, 297075279658, 225866104439, 117288753820, 14092986131], [0, 45421065493346, 0, 0, 0, 0, 0, 0, 0, -306405197209475, -631061157098, -10205253850902, 772442174676, 303671596950, 149659684104, 7770856206], [0, -245141236588782, 0, 0, 0, 0, 0, 0, 0, 513384343842954, 9121701835784, -7431965270701, 2150564823487, -64429363087, -32379044045, -74900102716], [51218772177757590, 0, -890810294348881, 137249989249, 197792584871, 187771911023, -352955271625, 149177577785, 213503190106, 0, 0, 0, 0, 0, 0, 0], [-173749348658652940, 0, 1734669943608419, -18352338746, -157600486466, 108288309963, 558660982045, 17379825785, -381258802154, 0, 0, 0, 0, 0, 0, 0], [0, -49568865537792, 0, 0, 0, 0, 0, 0, 0, 198806243618088, 3633712564652, -6536204323980, 1011449337176, -714105462196, -118082325776, -81782043332], [18727829646002530, 0, -3306565436986104, -150289410882, -563347914312, 42511015422, -239746586196, -565425879324, -231986369064, 0, 0, 0, 0, 0, 0, 0], [0, 179230046376881, 0, 0, 0, 0, 0, 0, 0, 167540665918647, -10181188446699, 104205839520, -7619724970731, -284783009192, 127602703237, -96217440485], [-116832872860788140, 0, 4719003984466442, 695223435058, -184860232361, 194363535594, -162487295258, 338989948538, 157065384964, 0, 0, 0, 0, 0, 0, 0], [20125739317147272, 0, 1771409461630354, -235167307566, -329922004902, 231618910426, -260603601086, 53625116702, 321391044652, 0, 0, 0, 0, 0, 0, 0], [322974649574648809, 0, 2901727604485772, -154896548547, -140922286186, -89489893631, -286449442886, -355127527306, 114494507492, 0, 0, 0, 0, 0, 0, 0], [0, 201260296226798, 0, 0, 0, 0, 0, 0, 0, -682944668484867, 19114920340308, 191234904786, 11697396552456, 348956053438, -417803136764, 114949069618], [0, 387470694004704, 0, 0, 0, 0, 0, 0, 0, -243361891754732, 10745637702852, 7062501658552, -10255704209620, 231021254552, -88683418956, 350705636444], [0, -541655756507027, 0, 0, 0, 0, 0, 0, 0, -412130288664800, -7362422268577, 4824659425947, -5864440249826, -500956692619, 271564658052, 538878720921], [-127522247640467940, 0, 6262012106022698, 620768705702, -456541424501, 362848851842, 347321352662, 122218192938, -384846613980, 0, 0, 0, 0, 0, 0, 0], [-321475751985616065, 0, 3442705990654458, 906674981699, 74089184800, 491102510454, 260955869214, 1124200834526, 119889023860, 0, 0, 0, 0, 0, 0, 0], [-42736996360984090, 0, 373722750389016, 308035054274, 93522666208, -433175103962, 1047401994900, -289985797020, -591583310744, 0, 0, 0, 0, 0, 0, 0], [0, 46225577045479, 0, 0, 0, 0, 0, 0, 0, -329569648978416, -26863909357908, 13037783319996, 7755591566868, 346485415556, 1414308804044, -37961198536], [-137271346596260550, 0, -1030231744519510, 27887359417, -134067595072, 849132039182, 537382780622, -325607602882, -591722532860, 0, 0, 0, 0, 0, 0, 0], [0, -389478038787587, 0, 0, 0, 0, 0, 0, 0, 195472610692513, -8113032163897, -6654100426170, -2505222947507, 481061506682, -789179251179, -139146917223], [76824477723116080, 0, 15876194532546389, 82125575281, 52623008053, -625365234777, 735737380873, -263369524537, -755412983786, 0, 0, 0, 0, 0, 0, 0], [0, -316892567035215, 0, 0, 0, 0, 0, 0, 0, 173607044364770, -1118695372563, 31520847561255, -15071017879294, 711106336585, -13596783696, -107486867439]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_98_b_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_98_13_b_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_98_13_b_c(:prec:=16)
    chi := MakeCharacter_98_b();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 13));
    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_98_13_b_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_98_13_b_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_98_b();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,13,sign)));
    Vf := Kernel([<3,R![166146008225686888975158615912586831592255841, 0, 111400901558110496276819595183126508110288, 0, 1439579890626389563511626657632573372, 0, 7194684838492777650788022411888, 0, 17814546644991454004799078, 0, 23874431083308410544, 0, 17532494948988, 0, 6613776, 0, 1]>],Snew);
    return Vf;
end function;