
// Make newform 209.2.e.a in Magma, downloaded from the LMFDB on 22 December 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_209_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_209_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_209_2_e_a();".
// 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_209_2_e_a();".
// 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 := [81, -297, 1539, 426, 4276, -427, 5289, -985, 4605, -1413, 2312, -520, 671, -132, 132, -15, 14, -1, 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, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-2224623642468442977024, -288244945968983955330417, -93718041862117461040791, -356552067538101245885623, 4177455110319818058139, -400109977871415021730635, -73350285228185102426042, -81578794340984662732866, -100582647222980916443262, -9791376836995907689577, -37220328656580677900777, 3224944590594444024922, -9629405855418767863809, 610414574657299721166, -1113127532414004579270, 57812798323091281903, -94739171273474206175, 1012720386363599036], [1579731844635043426764, -1553634095587192056960, 7437918435843526749783, -15427251839425111911257, 12708497008881398216219, -14702546900437300869921, 14013733395563664168479, -14687414512710319282566, 9666800622044874031620, -6670612517171256711232, 3117939895998411333107, -1888749540495685152013, 696200622227704165728, -334018057082111013441, 76569132350781580704, -33495985837147298500, 5458724537424206135, -2128033936314699569], [-6100374274914799384443, 315901921849859218257, -1478807019598055231025, 2781486964237862922059, -2109259575914485518071, 3933275506025007166752, -1149125137089618283160, 3972539989431228364338, -1629272745327042589107, 2219962890010734513541, -583532685470557102568, 670454083038255852409, -153612923076173913738, 138433380878054607540, -17705859162856890111, 14882874435353695723, -1234503576247168178, 1110230200369835522], [16649229379850399655900, 78149318772099043402767, 73000389367222430464527, 80375261349745839642467, 64955336167610074656997, 82977699564882746448771, 66547196783284661914372, 18341522438405460238146, 40537137026235352292874, 6559897132513592793427, 12672498513256197572467, 1112087995038306662506, 2776889650180869168423, 375318299945568250614, 306439993760139348540, 49280306637406513471, 25233339789554109763, 5068373911969217684], [-490574411939484088902, -46887400807752084023862, 226881274916720108966310, -197724859646014971603152, 417418142702248809793241, -374781973370824505109177, 565754389195550354175158, -370419961074177267635403, 313974091801135265682612, -139085048378033397368329, 95846940382123340553878, -35009023164887533714579, 18974648343231804609399, -4630486997240937876810, 2005280792384086048731, -383242562731579497748, 139486096990018545398, -11934128132917906457], [4844890607039941658931, 77378099559627947333319, 80181102451896433709127, 80171684354509576455205, 97748006706951911735795, 41241737793574240012674, 143609866236965693017052, -55937905810371635979630, 100047118847585137600125, -32008402869805471891333, 32842410151236090689312, -10371574594061708006503, 7299208307846027647416, -1725925490025956143194, 809598790542962504265, -164992997066507653363, 60326349462019315394, -9008870397315943682], [63808345967751794451060, -314714655761330937068892, 155792302431472194248133, -663368771703028538086157, 395707601544543045157223, -874921046622351153657219, 423626731083328603668257, -579382802894050315729626, 219225700168649345584866, -229279292026664522386114, 64451922381189926578631, -57660444283870184947459, 12133783689626192523222, -9636173884713188483859, 1234988133497495747430, -949432911649499686342, 68683211494044809915, -58005188972387748725], [-5757345569361987294894, -67730959836666895076199, -71206413511406020911603, -212057226294076016197375, -19124474121342882490199, -267410715601262514315111, 13568714497628959758322, -240431640524397784581000, 62660795651053502533620, -125918033082235151285063, 24758216534447114244601, -37170659901839633404988, 6721079291413879268301, -7493426065607867566512, 777140845063582230480, -802744042124416565843, 52124485029390843025, -58508586838334941732], [1585426082536734927219, -94160168097166918290780, 453921680033165549846025, -408376366516504229135192, 813961563542444007630746, -799798676846045781451014, 1076903496677217295875833, -792551334707145401943783, 612004505416492011847446, -319922442535558052793244, 188527222537537733051651, -83819153896533292383874, 37865066887331757825339, -12599936245760377722033, 4022977683597256962663, -1152727506775656562102, 274360838412596100947, -55737307064698246154], [-24128925972200890525251, 109794442250517075423882, -78855845607335530175853, 261296963431200305587433, -198855291233771670768443, 371920686152382093942516, -248717649412476889935965, 306157102355249817616056, -159119677983574907506071, 133256204851981614539416, -50572236921127499239718, 35930500265503146391786, -10766797531781194060851, 6264399467628424671789, -1165539142089018396435, 624901425950809312318, -77667707491299205832, 39659972089298595059], [-32013993452995533447882, 100482043685214965958477, -33459296039767573247946, 256680635286468998557994, -111243084716931088787300, 307084411803020138604984, -115395382278934096392983, 242742887090915537688276, -93697244579686159348884, 114183865537111489172197, -31320231464286462127508, 32055757055636454585961, -7305279192892675539435, 6108105447533198828379, -811986024706142835198, 637248602995505334133, -53715850295638962308, 44612766994005039605], [-5584974820520496629805, -66783254071117317421428, -69485003379004890331872, -203712765401362427431198, -25452252849086339044412, -255610889083187492814855, 10121339086360104908842, -228514020556104099487986, 57772977415072374766299, -119258144412202947744440, 23007618478035442936897, -35159297652724865847761, 6260240522185357527087, -7078125922973703743892, 724023267575011560147, -758095418818355478674, 48420974300649338491, -55177896237225435166], [-6283268336700719129610, -34789194035420748225417, -43266902840444008061910, -398382764419485734342327, 52037773660384728298514, -602313364292029234477272, 281191609044682540532828, -715540179930974812503219, 330481289105750461121787, -369306886152178336220716, 119661853925291964368183, -109832844444634600972669, 29440787256780631086936, -21048378268096033285638, 3330749048575039248327, -2203657474861696855219, 235346464740573556631, -151597674815253257387], [1761315113868612978510, 48646361125673754237513, 126635982857813794336482, 163681118129756955484469, 154788400603113053782486, 176768830930485446615517, 128666217911549999011591, 185390814646177039565841, -3144683557080471387120, 114476963614579837857523, -8914040030287415809376, 36074390336401310419099, -4207579064449408525611, 7855638943712920926492, -536118077619596692854, 869182278837324785305, -36837512138528793011, 66735515158792444160], [43395104194284271044690, -439737792795909635687730, -44985658896703278976581, -1629354079200697153350403, 378553292652792385740919, -2260623438433432133473635, 980026399489690621985341, -2299491533413955456966724, 1002749049195036097935768, -1142287750155821659273802, 354955029925705471220359, -332453947832562585313103, 85404851730926743646274, -63119861001179235512277, 9595819120361814659856, -6580922924828412380888, 664844238645778185061, -451335543352520157469], [23428063165369596254586, -59081009221657649667789, 1008542024036242284754395, 656000449102725300845629, 1249582998386145433968623, 697084630472215147839831, 954530321415797155211480, 1194407876941309038329898, -130540965073751017884138, 818909257814120245857749, -110014167579409972157155, 268480428504054308975054, -43874966405710862755359, 59188996969652460607872, -5503047742410695250780, 6557141719077132055829, -406425275426803369093, 505333260053646242080]];
    Rf_basisdens := [1, 1, 18473493573585888818418, 6157831191195296272806, 2052610397065098757602, 6157831191195296272806, 9236746786792944409209, 6157831191195296272806, 18473493573585888818418, 18473493573585888818418, 9236746786792944409209, 6157831191195296272806, 6157831191195296272806, 6157831191195296272806, 9236746786792944409209, 3078915595597648136403, 18473493573585888818418, 18473493573585888818418];
    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_209_e();"
function MakeCharacter_209_e()
    N := 209;
    order := 3;
    char_gens := [134, 78];
    v := [3, 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_209_e_Hecke();"
function MakeCharacter_209_e_Hecke( : Kf := false)
    N := 209;
    order := 3;
    char_gens := [134, 78];
    char_values := [[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, -1, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := ISA(Type(Kf), Fld), 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]];
    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 := 2;
    raw_aps := [[0, -1, 0, 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, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, -1], [-1, 0, 0, 0, 0, 0, -1, 1, 1, 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], [0, -1, 0, 1, -1, 0, 1, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 1], [0, -1, 0, 0, 0, 1, 0, 1, 0, 1, -1, 0, 1, 0, -1, 0, 1, 1], [1, 0, -1, 0, 1, 0, 1, 0, 0, 1, 0, -1, 0, 0, -1, -1, 0, 0], [0, 1, 1, -1, 2, 0, -2, 0, 0, 0, 0, 0, 0, -2, 2, 1, 0, -1], [-2, 1, -1, -1, 2, -2, -1, 0, 0, -2, 0, 0, -2, -2, 1, 1, 0, -1], [0, 0, 0, -1, 1, 0, -2, 0, 0, 0, -1, 1, -1, 0, 0, 1, 1, 0], [2, 0, 0, -2, 1, -1, -1, -1, -1, 0, -1, 1, 0, 0, 0, 1, 1, 0], [1, 1, 0, 0, 0, -1, 1, 0, 0, 2, 0, 0, 0, -1, 1, -1, 0, 0], [0, -1, -1, 0, 0, 1, 0, 0, 0, -1, 1, -1, 1, 0, -1, 0, 0, -1], [0, 0, 1, 0, 0, 1, 0, 0, -2, 1, 0, 0, 0, 0, -1, 0, 1, -1], [-3, 1, 1, -1, -2, 0, 0, 0, 1, -3, 0, 0, 0, 2, 0, 1, 0, 1], [-1, -2, 0, 0, 0, 0, -1, -2, 0, 2, 0, 0, -1, -1, 0, 1, -1, 0], [-1, -2, 0, 2, 0, 2, 2, 0, 1, 0, 0, 0, 1, 0, -3, -2, 1, 1], [-3, -3, 1, 3, 2, 0, 1, 0, 0, -2, 0, 0, -1, -2, -2, 1, 1, 0], [-1, 0, 2, 0, 0, -1, -1, -1, 0, -1, 0, 2, -2, -2, 0, 1, 0, 0], [0, 2, 1, 0, 0, 0, 0, 2, 0, -1, -1, 1, 0, 0, 1, 0, 1, 1], [0, 4, -1, 0, 0, -1, 0, 2, 0, 0, 2, -1, -1, -1, 3, 0, -2, -2], [-4, 0, 0, 3, 2, 1, -1, 1, 1, 0, -2, -2, 1, 0, 0, 2, 2, 0], [1, -2, 0, 2, -2, 2, 1, 0, 1, 0, 0, 0, 3, 2, 0, -2, -1, 1], [0, -5, 0, 0, 0, 2, 0, 1, 0, 7, -3, 0, 2, 3, -4, 0, 2, 3], [-5, 1, -1, -1, 2, -2, -3, 0, 2, -5, 0, 0, -2, -2, 3, 1, 0, -4], [2, 0, 0, 0, 0, 1, 1, 4, 4, 0, -1, -4, 3, 0, 0, -1, -1, 0], [-4, 0, 0, 1, 0, -1, 2, 1, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0], [1, 1, -1, 0, 0, -2, 1, 2, 0, 6, 1, -1, -1, -2, -1, -1, -2, -1], [0, 0, 0, 0, 1, -2, 2, 2, 2, 0, -1, 3, -1, 0, 0, 0, 0, 0], [6, 4, -2, -4, 1, -3, 3, 0, -2, 4, 0, 0, -1, -1, -1, 1, -2, -3], [-2, -3, 1, 0, 0, 3, -2, -2, 0, -1, -1, 1, 1, 0, 2, 2, 2, 1], [-1, -1, 1, 1, -3, 1, 1, 0, -2, 0, 0, 0, 0, 3, -2, 0, 1, 2], [0, -1, 1, 1, 2, 0, 3, 0, 3, -1, 0, 0, 1, -2, -2, 1, -1, 0], [-1, 3, 0, 0, 0, 0, -1, -1, 0, -6, 1, 0, -1, 0, 0, 1, -1, -1], [8, 0, 0, 3, -3, 1, 0, -3, -3, 0, 5, -1, 0, 0, 0, -2, -2, 0], [-1, -2, 0, 0, 0, 2, -1, -3, 0, -4, 1, 0, 1, -3, 0, 1, 1, -1], [2, 0, 0, -2, 0, 1, -2, -1, -1, 0, -1, -1, 0, 0, 0, -2, -2, 0], [-1, -3, 3, 3, -1, 3, -3, 0, 2, 1, 0, 0, 1, 1, 1, 0, 2, 2], [0, 2, -3, 0, 0, -2, 0, 0, 0, 3, 5, -3, -2, -4, 2, 0, -5, -5], [7, 0, 0, -1, -3, 0, 2, -3, -3, 0, 2, 4, -4, 0, 0, 0, 0, 0], [-2, -3, -2, 3, -1, 2, 3, 0, -3, -2, 0, 0, 2, 1, -3, -4, 0, 4], [-5, 0, 0, 2, -1, 2, 0, 4, 4, 0, 4, -5, 3, 0, 0, 0, 0, 0], [-4, -2, 4, 0, 0, 2, -4, -3, 0, -5, -3, 4, -2, 2, 2, 4, 2, 3], [0, 0, 0, 1, 2, -2, -2, 2, 2, 0, -4, 2, 0, 0, 0, 1, 1, 0], [-5, 0, 3, 0, 2, 1, -7, 0, 0, -3, 0, 0, -1, -2, 5, 2, 2, -4], [0, -1, 1, 0, 0, -1, 0, -5, 0, 2, -5, 1, -1, 0, 3, 0, 0, 5], [0, 2, -3, 0, 0, -1, 0, 3, 0, 0, 1, -3, -1, -1, 5, 0, -4, -1], [-1, 0, 0, 4, -5, 2, -4, -1, -1, 0, 3, 1, -3, 0, 0, 2, 2, 0], [-1, 0, 0, -5, 3, 0, 2, -3, -3, 0, -3, 1, -1, 0, 0, 1, 1, 0], [2, 0, -4, 0, 0, 0, 2, 3, 0, 12, 2, -4, 2, -2, -1, -2, -2, -2], [9, 0, 0, -1, -1, 0, 5, -2, -2, 0, 1, 2, -2, 0, 0, 0, 0, 0], [2, 4, -2, -4, -1, 1, 1, 0, -2, 4, 0, 0, -1, 1, -3, -3, 2, 1], [3, -2, -3, 2, 1, -2, 1, 0, 3, 0, 0, 0, 1, -1, 2, -1, -3, -3], [-2, 1, -2, -1, 1, 0, 1, 0, 1, -4, 0, 0, 2, -1, 1, -2, -2, 0], [-2, 3, 3, 0, 0, -3, -2, -3, 0, -4, 3, 3, -5, -2, 6, 2, -2, -3], [2, 5, 0, 0, 0, -2, 2, -1, 0, 9, 7, 0, 0, -5, 2, -2, 0, -7], [-1, 10, 2, 0, 0, 1, -1, 0, 0, 6, 0, 2, 0, 4, 2, 1, 2, 0], [1, 0, 0, -4, 2, 0, 1, -3, -3, 0, -1, -1, 1, 0, 0, 3, 3, 0], [-3, -10, 0, 10, -2, 0, 2, 0, 5, -4, 0, 0, 1, 2, -1, 0, -1, 3], [-5, 2, 6, 0, 0, -1, -5, -6, 0, -11, 1, 6, -6, 4, 7, 5, 0, -1], [1, 0, 0, 3, -2, -1, 1, -5, -5, 0, 0, 3, -2, 0, 0, -1, -1, 0], [2, 4, -2, 0, 0, -1, 2, 5, 0, 2, 0, -2, 1, 1, -2, -2, -1, 0], [8, 0, 0, 5, -3, -1, 4, -2, -2, 0, 0, 1, 0, 0, 0, -2, -2, 0], [2, -10, 1, 10, -7, 4, 3, 0, 4, 2, 0, 0, 4, 7, -3, -3, 0, 7], [-9, -6, -1, 6, -3, -2, -1, 0, -1, -10, 0, 0, -1, 3, 2, 1, -1, 5], [5, 0, 0, -4, 4, -2, -3, 2, 2, 0, -7, 2, 0, 0, 0, 2, 2, 0], [0, -9, 0, 0, 0, 1, 0, 5, 0, -1, 1, 0, 1, -4, -3, 0, 1, -1], [2, 2, 0, 0, 0, -3, 2, 1, 0, -1, -1, 0, -1, -5, -3, -2, -1, 1], [-7, 0, 0, -1, 3, -1, 2, 1, 1, 0, 3, 2, -1, 0, 0, -1, -1, 0], [4, 0, 0, -2, -4, -1, 9, -1, -1, 0, 2, -4, 5, 0, 0, -7, -7, 0], [5, -5, -2, 0, 0, -3, 5, -5, 0, 4, -1, -2, 2, -5, -1, -5, 0, 1], [-3, -10, 2, 10, -4, 4, 8, 0, 1, -5, 0, 0, 6, 4, -6, -2, -2, 3], [12, 0, 0, -1, 3, 3, -1, -2, -2, 0, 0, -1, -2, 0, 0, 2, 2, 0], [12, 0, 0, 0, 4, 0, 0, 1, 1, 0, -4, 1, -1, 0, 0, 1, 1, 0], [-2, -1, 0, 0, 0, 5, -2, 5, 0, 5, -3, 0, 3, 8, -7, 2, 3, 3], [5, 2, -1, -2, -1, 2, 2, 0, 0, 5, 0, 0, 2, 1, -2, -3, 0, 4], [0, -1, 3, 0, 0, 2, 0, 0, 0, 1, -7, 3, 2, 1, 0, 0, 5, 7], [-1, -8, 2, 0, 0, 3, -1, 7, 0, 7, -6, 2, 2, 4, -4, 1, 4, 6], [-14, -4, 7, 4, 1, 4, -2, 0, 1, -14, 0, 0, 4, -1, 2, 3, 0, 0], [-5, 0, 0, -5, 1, 1, 1, 7, 7, 0, 3, -2, 1, 0, 0, 1, 1, 0], [-2, 1, 1, 0, 0, 4, -2, -2, 0, 10, -4, 1, 2, 5, 1, 2, 3, 4], [-1, -3, -2, 3, -2, -3, 0, 0, -6, 1, 0, 0, -5, 2, -2, 1, 2, 2], [-4, -2, 4, 2, 1, 3, -1, 0, 2, -2, 0, 0, 1, -1, -1, 1, 2, -3], [-4, -1, 3, 0, 0, 7, -4, -3, 0, 4, -3, 3, 3, 2, -6, 4, 6, 3], [-8, 2, 0, -2, -2, 2, 1, 0, 3, -8, 0, 0, 2, 2, -1, -2, 0, 2], [7, 0, 0, 5, -1, -2, 8, -1, -1, 0, -5, -1, 3, 0, 0, -1, -1, 0], [11, 0, 0, 0, 0, -1, 5, -3, -3, 0, -2, 1, 0, 0, 0, -6, -6, 0], [0, 7, 4, 0, 0, -1, 0, 5, 0, -4, 2, 4, -1, 0, 4, 0, 3, -2], [-10, 0, 0, -9, -1, -1, -2, 6, 6, 0, -4, -1, 2, 0, 0, 4, 4, 0], [3, 0, 0, 4, 3, -4, 1, -2, -2, 0, -2, 5, -1, 0, 0, 0, 0, 0], [9, -5, 1, 5, -7, 3, -3, 0, -1, 11, 0, 0, 1, 7, 1, -2, 2, 3], [9, 0, 0, 11, -8, -2, 13, -1, -1, 0, 7, 1, 1, 0, 0, -6, -6, 0], [2, 7, -4, 0, 0, -3, 2, 6, 0, 6, 7, -4, -1, -8, -4, -2, -5, -7], [-4, -5, 0, 0, 0, 3, -4, -3, 0, -6, 4, 0, -1, 0, 3, 4, -1, -4], [-6, 7, 3, -7, 7, -3, -12, 0, 7, -4, 0, 0, -5, -7, 10, 6, 2, -6], [-10, -4, -5, 4, 1, -2, 0, 0, 2, -12, 0, 0, 0, -1, 2, -3, -2, -3], [9, 0, 0, 3, 2, -1, 5, -2, -2, 0, -1, 1, 0, 0, 0, -1, -1, 0], [8, 9, -4, -9, 4, -7, 0, 0, -10, 6, 0, 0, -5, -4, 2, 3, -2, -7], [9, -1, -6, 1, -2, -5, 9, 0, 1, 4, 0, 0, 0, 2, -4, -1, -5, 7], [-1, 0, -3, 0, -8, 1, 8, 0, -3, -3, 0, 0, 3, 8, -6, -4, -2, 1], [4, 9, 2, -9, -6, 5, -5, 0, -1, 7, 0, 0, 2, 6, 2, -3, 3, 2], [2, 0, 0, 8, -6, 0, 3, -5, -5, 0, 5, 6, -6, 0, 0, 0, 0, 0], [-7, 0, 0, 7, 3, -1, -1, 1, 1, 0, -5, -2, 3, 0, 0, -3, -3, 0], [1, 0, 0, -2, 1, 2, -10, -3, -3, 0, 5, 3, -5, 0, 0, 4, 4, 0], [8, 0, 0, -2, 0, -4, 1, 0, 0, 0, 1, 3, 1, 0, 0, 1, 1, 0], [-2, 8, -2, 0, 0, 0, -2, 1, 0, -3, 3, -2, -2, -4, 3, 2, -4, -3], [15, 3, -3, -3, -11, 1, 6, 0, -5, 12, 0, 0, 4, 11, -3, -4, -3, 7], [2, 1, -3, -1, 5, -7, 3, 0, 1, -2, 0, 0, -3, -5, 1, 4, -4, -2], [6, 0, 0, -12, -2, 1, 4, -5, -5, 0, 1, -5, 4, 0, 0, -2, -2, 0], [10, 0, 0, -6, -2, -4, 4, -2, -2, 0, -2, 2, 2, 0, 0, -2, -2, 0], [2, 0, -5, 0, 0, 1, 2, 9, 0, 12, -5, -5, 3, 3, -1, -2, -2, 5], [-2, 5, 3, -5, 2, 0, -7, 0, -1, -4, 0, 0, 2, -2, 9, 3, -2, 2], [-17, 0, 0, 9, 8, 0, 1, 4, 4, 0, -1, -6, 6, 0, 0, -1, -1, 0], [-5, -3, -1, 3, 6, -2, -8, 0, -2, -7, 0, 0, 0, -6, 10, 1, -2, -2], [1, -2, 0, 0, 0, 2, 1, 1, 0, 4, -1, 0, 3, 5, -13, -1, 3, 1], [-5, -7, 8, 0, 0, 4, -5, -5, 0, 17, -4, 8, -1, 4, 2, 5, 7, 4], [1, 0, 0, -6, -3, -2, -2, 4, 4, 0, -2, -5, 7, 0, 0, -2, -2, 0], [-12, 0, 0, -8, 4, -3, -4, -3, -3, 0, -7, 3, 0, 0, 0, 4, 4, 0], [-3, 4, 4, -4, 2, 6, -2, 0, -2, -4, 0, 0, 7, -2, 3, -2, -1, -6], [-12, -2, 2, 2, 0, 6, 5, 0, -8, -12, 0, 0, 6, 0, -5, -4, 0, -3], [-3, 0, 0, -5, 6, 7, -17, -5, -5, 0, 0, -1, -6, 0, 0, 7, 7, 0], [-7, 0, 0, 3, -5, 2, 6, 2, 2, 0, 6, -1, -1, 0, 0, -5, -5, 0], [1, 0, 0, 2, 3, 1, -5, -3, -3, 0, -1, -2, 1, 0, 0, -4, -4, 0], [3, 0, 0, -1, -2, 4, -9, -4, -4, 0, 1, -4, 0, 0, 0, 1, 1, 0], [4, -2, 1, 0, 0, -3, 4, 9, 0, -4, -1, 1, 1, -1, -3, -4, 2, 1], [2, 8, 4, -8, -3, 1, -5, 0, -3, 5, 0, 0, -2, 3, 2, 3, 3, -6], [2, -2, -1, 0, 0, -1, 2, -1, 0, 0, -3, -1, 1, 13, -5, -2, 0, 3], [5, 0, -5, 0, 0, -7, 5, -2, 0, -4, 7, -5, -2, -8, 2, -5, -7, -7], [0, 0, 0, 12, 5, -3, -2, -1, -1, 0, -4, 6, -3, 0, 0, 2, 2, 0], [1, 5, -2, 0, 0, 5, 1, 4, 0, -3, -1, -2, 6, 7, -1, -1, 4, 1], [6, -8, -2, 0, 0, -3, 6, 9, 0, 5, -5, -2, 3, 1, -7, -6, 1, 5], [16, -12, 2, 12, -10, 6, 7, 0, -1, 12, 0, 0, 10, 10, -3, -4, -4, 6], [-2, -2, 1, 0, 0, 5, -2, 7, 0, 11, -4, 1, 3, 7, -2, 2, 4, 4], [1, 0, 0, 8, -1, 6, -3, -1, -1, 0, 4, 2, -8, 0, 0, 3, 3, 0], [-3, -8, 8, 8, -1, 7, -5, 0, 8, 1, 0, 0, 3, 1, 1, 1, 4, 4], [-13, 6, -6, -6, 5, -9, -4, 0, 6, -11, 0, 0, -11, -5, 2, 3, 2, -2], [1, 0, 0, 4, -8, -6, 10, 5, 5, 0, 4, 0, 6, 0, 0, -8, -8, 0], [-7, 0, 0, 12, 6, -1, 7, -1, -1, 0, 1, 0, 1, 0, 0, -3, -3, 0], [2, 0, 0, -9, 4, -1, 0, -6, -6, 0, 5, 4, -3, 0, 0, 0, 0, 0], [-3, 1, -3, -1, 9, -7, -2, 0, 6, -7, 0, 0, -3, -9, 6, 4, -4, -8], [-1, 11, 3, -11, 5, -1, -7, 0, 9, -3, 0, 0, 1, -5, 9, 4, -2, -5], [8, -8, -8, 8, 12, -10, -5, 0, 5, 10, 0, 0, -12, -12, 3, 2, 2, -4], [19, -5, -4, 5, -2, 5, 5, 0, -1, 21, 0, 0, 3, 2, -7, -9, 2, -3], [1, 0, 0, 9, 0, 2, 1, 7, 7, 0, 5, 1, -3, 0, 0, 4, 4, 0], [5, 2, -3, 0, 0, -1, 5, 4, 0, 20, -1, -3, 4, 8, -2, -5, 1, 1], [-4, -8, 8, 0, 0, -3, -4, -4, 0, -22, -5, 8, -7, 1, 6, 4, 1, 5], [4, -1, -9, 0, 0, -1, 4, -4, 0, 12, -4, -9, 3, 2, -6, -4, -6, 4], [7, 0, 3, 0, -4, 3, 9, 0, -6, 7, 0, 0, 3, 4, -9, 0, 0, 6], [3, 0, 0, -1, 1, 2, 0, 14, 14, 0, -2, -9, 7, 0, 0, -3, -3, 0], [2, -2, 2, 0, 0, -4, 2, -3, 0, -8, 2, 2, -2, -10, -4, -2, 0, -2], [8, 0, 0, 6, 5, 1, 2, -3, -3, 0, -2, -2, 1, 0, 0, 0, 0, 0], [-15, 1, 4, -1, 7, 2, -8, 0, 0, -9, 0, 0, -4, -7, 2, 2, 6, -2], [0, 13, 0, -13, -5, 0, 3, 0, -11, -1, 0, 0, 1, 5, -2, 0, -1, -2], [1, -18, 5, 0, 0, 3, 1, -6, 0, -8, -7, 5, 4, 4, 0, -1, 9, 7], [0, 0, 0, 0, -1, -3, 8, -2, -2, 0, 0, -5, 8, 0, 0, -3, -3, 0], [-6, 0, 0, 6, -8, 0, 3, -3, -3, 0, 3, 2, -2, 0, 0, -4, -4, 0], [2, -12, -7, 0, 0, 5, 2, 3, 0, -8, 1, -7, 7, 5, -8, -2, 0, -1], [4, -2, 2, 2, 2, 2, -3, 0, 7, 4, 0, 0, 2, -2, 3, 0, 0, -4], [5, 5, 8, -5, -1, 8, -7, 0, 4, 10, 0, 0, 3, 1, 2, 0, 5, -6], [0, 12, -5, 0, 0, -1, 0, -5, 0, 0, 3, -5, -1, -1, 6, 0, -6, -3], [-1, -10, -1, 0, 0, 2, -1, -11, 0, -17, 3, -1, 1, -1, 9, 1, 0, -3], [13, -1, -10, 0, 0, -5, 13, 1, 0, 12, -7, -10, 8, 9, -9, -13, -2, 7], [2, 10, -6, 0, 0, -6, 2, -1, 0, -5, 11, -6, -4, -8, 7, -2, -10, -11], [0, 0, 0, -4, 1, 1, -2, -9, -9, 0, 1, -1, 0, 0, 0, -3, -3, 0], [2, 3, -2, 0, 0, -1, 2, 3, 0, -8, -4, -2, 1, -6, -11, -2, -1, 4], [5, -6, 0, 0, 0, -2, 5, -8, 0, 4, 2, 0, 3, -5, -4, -5, 3, -2], [12, 8, -3, -8, 2, -5, -6, 0, 8, 12, 0, 0, -5, -2, 6, 2, 0, -7]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_209_e_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_209_2_e_a();".
// 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_209_2_e_a(:prec:=18)
    chi := MakeCharacter_209_e();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 2));
    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_209_2_e_a();".
// 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_209_2_e_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_209_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![81, 297, 1539, -426, 4276, 427, 5289, 985, 4605, 1413, 2312, 520, 671, 132, 132, 15, 14, 1, 1]>],Snew);
    return Vf;
end function;