
// Make newform 950.2.l.i in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_950_l();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_950_l_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_950_2_l_i();".
// 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_950_2_l_i();".
// 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 := [64, 1824, 50640, 45584, 132588, -39408, 178501, -24822, 77397, -12862, 22809, -2478, 3518, -222, 393, -12, 24, 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, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-4013751372935074787872, -39173558665841641384688, -28672748737432658095620, 131930426042750651071414, -209008512165863259372458, 103073254201189644995297, -70676811003821628624804, 51608137114388154342713, -23294803089162330524192, 11426855215867581932007, -2949055427589780269094, 1484901432675530355632, -350448690616485240916, 112381522660734210447, -18904556982892784128, 4915084423072614202, -1032210622184162986, 61055476894519055], [-33245472400761016104, -922419069697801510100, 681534385747795628040, -1946539230130393642719, 1436505471983684001382, -1016909551599789245164, 685066214798428861084, -402842204138034112340, 217013214072968345884, -85117577577455380283, 33637103678766889280, -10792835135312213281, 3671677898458245414, -943040222741486265, 217650206396461316, -47792711775522575, 8492194184113948, -1635525082119517], [2772471793864217551328, -33369020667095817117064, 132376946470993401358768, -175059908224639016547602, 130159014359546996203917, -139217061034678719720477, 82059566489390723167467, -47162212142358743450181, 29911238133086072202907, -12176681046920356722183, 5723373133855547047852, -1520751922853346424722, 660135544909627110215, -168551952326384017361, 43796023402305942728, -9231168018118130678, 1575121051092986129, -484588919345981797], [-5849427054831566382272, -238709092089344630833744, -526814998545193841166088, -453225373012109516715344, -310172864630406771852114, -749894406880936988520413, -77028336764435244193452, -333131497615781151769293, -4768857048822705961004, -106643915322626171007461, 1665355671942828966634, -17688882567599612210342, -318497834185614045780, -2082011278615893963761, -32830764928543916644, -133487416594392925596, -4938169803754683634, -5661108507277223089], [-355065319936750139466336, -64945999769484800222216, -1801940266177000524862724, 3751066226442860586590316, -3780284333044025208230387, 2740238653231538074321206, -1799505239708367848883843, 1127795925739463857267382, -575412151238504149823551, 263573055319895541667746, -90921419739998124188058, 35349795625809934833718, -9738228420375474446487, 3393850177833466542684, -575980991439557555464, 184947509852821672932, -20833553879539973263, 7061265118326284208], [2790843091943609249792, 222012288383157382339584, 63550914205853885646816, 1055761357623463776830468, -668098226145442356951020, 1442161398472860279229561, -340630891724770170933642, 614538124237944153099593, -152936054047063759261762, 176757439950055842379637, -28101931376822263136126, 26212098261657925295878, -2951932328229000646866, 2868563022147134292157, -176518448897114086940, 170096713436186769408, -4420670090951377916, 7120232064478913845], [222437131952260969078320, 2192871891604607476809568, 2268420636039841698408604, 4404448023477175072733222, -385109191473691322869377, 6010497979226762902849242, -408405271951688039988437, 2592187442422267160930626, -308227523279048931291601, 768682290299425173931160, -63673682729449470100638, 119343698594729763480112, -5248425729352723067701, 13369767691246558270802, -265071606629196194776, 819652132698855055214, 5783219461066261199, 34032432672477862398], [-142473260262764518720512, 2144703682294526933251104, 932016634613371911333884, 6449852974186368344629484, -3160623032337137674788985, 8124510309772054463076170, -1696949174678948353073609, 3527981097596431339045378, -737629687584098063798773, 1022732245191537628425278, -134270054227849545936262, 156361088538504271596370, -12549299997326528877373, 17314039310363339636444, -693379793175613503744, 1050986829569804846588, -7120232064478913845, 43606923311618894528], [224768933584452034659824, 4122682720848137472259024, 4299505886808855934961940, 11227072290183058404325818, -3135864892074426475019478, 15301161731913615338965045, -2056247290318332764945376, 6645833755912229287473349, -1090007019552458228592532, 1964719164552568222411807, -211651780691653653781518, 303478346748128162828692, -18896919165280241227616, 33961827171590309916791, -1021214586662845320392, 2076203603295977191238, 969177838691963594, 86639743558256798479], [-72000421026644988938992, 4101544158590283058806632, 3713029046791673639057888, 11808012047025963907721010, -4351679115893473988404397, 16237480705649462112086771, -2601795221913111475843599, 7069107795494907657925027, -1282195958748307527394687, 2086346319635274041673541, -244171386346859323073936, 321217195586087050529734, -22372211375062889852267, 35886307243646543399495, -1230254989375311622272, 2188596975758082709718, -5661108507277223089, 91397297731743224723], [-513933057752306138600608, 8144725479928444094141072, 10715920057874028174216912, 21458301331246703013753752, -7255886801588970805548322, 32332620281699746077039593, -4758623882188580338713104, 14267065099980243521149289, -2535845560255705164827176, 4297343729671549054262025, -495156481581381846753170, 666784181932829688456702, -45094180832392128248256, 75166040667040660085229, -2484012542884763395636, 4605238891985950874212, -5732135503686535546, 193672599939521177853], [-816875741882952030207008, -8058021630556541263813456, -8310250267956919690057008, -26950980763744225590493364, 12348013541628593469174234, -35867074634072018735552729, 7186801520235321916088000, -15629755679129483461804601, 3312354529905557627095512, -4574099732833245797511669, 616027846141178933962418, -698878921204621736144290, 58905874877127585165912, -77687986565802063558833, 3325727502525616837540, -4713042519230969592112, 41797874796424201674, -196879019602708047121], [-200615149791099590912, -215896115382799596962640, -173860387898493120618840, -562485880609882172410700, 171902473458947079289616, -747274288344417697836185, 106375127124565515615406, -323373584137796292192233, 54131348872943166683470, -95056094328049887153757, 10384127757218222444462, -14649069911422322795046, 930106180903050087006, -1634925033338556606637, 50250550295345704756, -99804354755755959896, 13084200656956136, -4155684050095127013], [410114541020255785394768, 7489829416403767424029208, 5546166004746450996157332, 16455672097237555401464960, -2687710055767633239051438, 20525886315052473031489621, -1991405539095669544498228, 8712743369675705111656909, -1185937822770602685414904, 2538140580344124077554525, -235904148869076628375654, 390642832923762531587086, -20324507300104335553752, 43490512848531584937865, -1067025603899319954224, 2654952287017311307004, 10008211751375647830, 110093466354707483329], [135164459785755475025824, -7377010696928142057337552, -3796235744326268436909968, -19032353644027934743901478, 7356693191530839316897827, -25131730767251814404780330, 4147066791257029612362559, -10871087134867573888073106, 1943576513197228318661575, -3188586085671514423360464, 365463633294627112537294, -490961877766393435114708, 32806607694558362168483, -54752703948710247578774, 1774311505425595941180, -3341164204081251539494, 3569615837665383383, -139103439183612193370], [-369321165030132937154528, -10254485610108298199954736, -11990310892724571422529252, -27628239760151592570775604, 6754863310787280622560224, -39519550598257032163614057, 4573282646355888572083006, -17299262371659382705624745, 2603118085785120372196338, -5150625931349929178523373, 512085311367039951941786, -799294910113502776880286, 44459001009776990959914, -89633278539035744001325, 2345435923324846735080, -5491645746440817469064, -17069457929318511484, -228822961465924017141]];
    Rf_basisdens := [1, 1, 96592248189952149676248, 946982825391687741924, 96592248189952149676248, 193184496379904299352496, 193184496379904299352496, 193184496379904299352496, 193184496379904299352496, 193184496379904299352496, 193184496379904299352496, 193184496379904299352496, 386368992759808598704992, 386368992759808598704992, 7575862603133501935392, 193184496379904299352496, 193184496379904299352496, 193184496379904299352496];
    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_950_l();"
function MakeCharacter_950_l()
    N := 950;
    order := 9;
    char_gens := [77, 401];
    v := [9, 7];
    // 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_950_l_Hecke();"
function MakeCharacter_950_l_Hecke(Kf)
    N := 950;
    order := 9;
    char_gens := [77, 401];
    char_values := [[1, 0, 0, 0, 0, 0, 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]];
    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 := 2;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, -1, 1, 0], [0, -1, 0, 0, 0, 1, 0, 1, 1, 0, -1, 1, 0, 1, 1, 0, 1, 0], [1, -1, -1, 0, 2, 0, -1, 0, -1, -1, 0, -1, -1, 0, -1, 0, 1, 0], [0, 0, 1, 1, 0, 0, 1, 0, 0, 1, -1, 1, 0, 0, 0, 0, 0, 0], [-1, -1, 1, 0, 1, -1, 0, 0, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0], [-1, -1, 0, -1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0], [0, 0, 0, -1, 0, 0, 0, 0, -1, -2, -1, 1, 1, -1, 0, 1, 0, -1], [1, -1, 0, -1, 0, 1, 0, 1, 0, 0, 1, -1, -1, -1, 0, 0, 0, 0], [-2, -1, 1, -3, -2, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -2, -2], [-2, 1, -2, -1, -1, 1, 0, -1, -2, 0, -2, 0, 0, 0, 2, 0, 0, 0], [4, -1, 1, -1, 1, -1, -1, 0, 0, -1, 3, 0, 0, -1, -1, 1, 0, 0], [0, 0, 0, -1, -1, 0, 0, -1, 0, -2, 0, 0, 0, 0, 2, 0, -1, 0], [-3, 1, 1, 0, 1, -1, -1, -1, 3, -3, 0, 3, 0, -1, 3, 0, 0, 1], [4, -1, -3, 2, 3, 1, -2, 0, 0, -2, -4, -3, -2, 0, -2, -1, 1, 1], [0, -1, 0, 1, -1, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0], [0, 1, -2, -2, 0, 0, -1, -1, 0, 0, -1, 4, 0, -2, 4, 1, -1, -1], [1, 0, 0, 0, 0, 0, 0, 1, 2, -4, -4, 3, -1, 0, -3, -1, 0, 0], [2, -2, 0, 2, 2, 2, 0, 2, -2, -2, -2, 0, -2, 0, 0, -2, 2, 2], [0, 0, 2, 0, 1, -3, 0, -1, 0, 2, 0, -2, 0, -2, 0, 2, -2, 0], [4, 1, 0, 0, 0, -2, -1, -2, 2, 4, 5, 2, 2, -1, -5, 1, -1, -1], [2, 2, 2, 2, -2, -1, 2, 1, -4, 3, 0, -2, 1, 1, -4, 0, -1, -1], [-5, 1, 0, 0, 1, -2, 0, 1, -1, -5, -3, -1, -1, 0, 3, -1, 0, 1], [0, -1, 0, -1, -3, 0, 2, 1, 2, 1, -1, 1, 1, -1, -2, 0, -1, -2], [4, 0, 1, -1, 0, 0, 0, -1, 0, 0, 0, 0, 2, -2, -4, 2, 0, -2], [3, 1, -1, 1, -2, 2, 1, -1, 3, 0, -3, 5, 0, 0, 2, 0, 1, -1], [2, -1, 2, -1, -2, -3, -1, -3, -4, 4, 3, -3, 0, 0, 0, 0, 0, 0], [3, 0, 0, 1, 1, -3, -2, -1, -2, 3, -3, -2, 0, 1, 3, -2, 1, 2], [0, -1, -1, 1, 1, -2, -1, -1, -5, 6, 0, 0, -1, -1, -5, 0, 0, 1], [1, -2, 2, -3, -1, -2, 0, -3, 0, -1, -1, 3, 0, 0, 0, 1, -2, 1], [-4, 0, 0, -2, 0, -1, -1, 1, 4, -4, -3, 4, 1, 0, 3, 0, 0, 0], [-3, -1, 2, -1, 1, -1, 0, 0, -1, 0, 0, -4, 0, 0, 4, 0, 1, 1], [-5, 0, -1, 0, 1, -1, 0, -1, -1, 1, 0, 0, -1, -1, 0, 0, 0, 0], [-7, 1, 1, 2, 1, 1, 0, 1, -7, 0, 1, -5, 0, -1, 2, 0, 0, -1], [0, -1, 2, -2, -4, -2, 2, 2, 2, 2, 0, 2, 2, 0, -2, 2, -2, -2], [1, -2, -3, 4, 6, 0, -3, 1, 0, 1, -1, -1, -3, 0, -2, -2, 3, 1], [-3, -2, -2, -2, 3, 0, -2, -2, 4, -2, 0, 3, -2, -2, 4, 0, 0, 2], [0, 1, -1, -1, -2, 1, 1, -1, 0, 2, 2, 2, 1, 0, -7, 1, -1, -1], [-2, 1, -2, 2, -2, 1, 1, 0, 3, 1, -1, 0, 0, 1, 1, -1, 0, 0], [4, 2, 4, 2, -4, 0, 2, 0, -4, 4, -4, 4, 2, 2, 0, 0, 0, 0], [-1, -1, 0, -1, -1, 2, 1, 3, -3, -7, -7, -4, -1, -1, 4, -1, -1, -1], [5, 0, 1, 1, 1, 0, 0, 0, 3, 6, 3, -3, 1, 0, -5, 0, 1, 1], [-2, 0, -1, 1, -1, 1, 1, 1, -5, 0, -2, 0, -1, 1, 0, -1, 0, -1], [0, 3, 3, 0, 3, -1, 1, -1, -4, 2, 0, 0, 1, -1, -4, 0, -2, 1], [-7, -1, 5, 6, 3, 1, 2, 5, -7, 0, -5, -1, 0, 3, 6, 1, 2, 1], [0, 0, -1, -2, -1, 4, 2, 2, -8, 8, 6, -6, 2, 2, 0, -2, -2, 0], [2, 2, 3, 2, -3, 1, 3, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0], [-3, 3, 1, 5, 1, 4, 1, 2, -3, 0, -3, 5, 0, 2, 8, -2, 1, 1], [0, -1, -2, 1, 1, 3, 1, 0, 6, -1, -7, -1, -1, 1, -6, 0, 1, -1], [-2, -2, 0, -5, -4, 4, -1, -2, -6, -2, -1, -6, 1, -2, 1, 0, -2, 0], [2, -1, 4, 1, 2, 0, 4, 5, 0, 0, -2, -3, 4, 0, -2, 4, -2, 0], [-7, -1, 0, 0, 0, 1, 1, 2, -1, 5, -2, 0, -1, 0, 5, -1, 0, -1], [-7, 7, -3, 0, -3, -3, 1, -1, 8, 9, 9, 1, 3, -1, -1, 3, -3, -3], [-3, 1, -5, 7, 2, 3, -1, 0, -2, -11, -11, -5, -2, 1, 5, -2, 2, 2], [8, -2, -1, -6, 0, -5, -3, -3, 8, 0, 2, 7, 0, -3, -1, 2, -3, 0], [0, 2, 3, -2, 0, -1, 0, 1, -1, 5, 6, 5, 2, -1, -8, 1, -2, 0], [-1, 0, 4, 0, 0, -4, 0, 0, 0, 3, 1, -3, 0, 0, -2, -1, 3, -1], [-4, -3, -3, -1, -3, 1, -2, 0, 2, -2, 0, 4, -2, 0, 2, 0, 2, 0], [0, 0, 3, 2, 4, -1, 0, 5, -5, -5, 0, -5, -2, 2, -4, 0, 2, 0], [-4, -1, 0, 4, 4, -1, -2, -3, -2, -2, -2, -6, -2, 2, 6, -2, 4, 4], [-3, 0, 7, 5, 6, -5, 0, -1, 0, -1, 0, 1, -2, 3, 3, -3, 1, 3], [-1, -1, -2, 0, 0, -1, -1, 0, -11, -3, -4, 0, 1, 0, -3, 1, 0, 1], [-1, 4, 0, -2, 0, 1, 2, 0, -2, -1, 1, -2, 0, -4, -1, 2, -4, -2], [0, 0, -4, 1, -1, 3, 1, -2, 1, 2, 1, 2, -1, -1, 0, -2, 1, -1], [-1, 3, -5, 1, -1, 6, 3, 2, -1, 0, 3, 3, 0, 2, 4, -2, 3, -1], [6, 0, -1, -3, 0, -2, -2, -2, 6, 0, -12, 6, 0, -2, 0, 2, -2, 0], [-7, 0, -1, -1, -2, 5, 0, -1, -8, 1, -8, -9, 0, 3, 7, -3, 3, -1], [0, -1, -1, 2, 3, -1, -3, -2, -2, -4, -2, -4, -2, 1, -1, -1, 2, 3], [4, -2, -2, 0, 6, -3, -2, -3, -7, -3, 0, -4, 0, -3, -7, 0, -1, 3], [-2, -2, 0, -3, -4, -1, 1, -2, -2, -2, -1, -2, 1, -2, 1, 2, -2, -2], [8, 0, 0, -1, -1, -1, 0, -1, 4, 1, 4, 3, 1, -3, -8, 3, -2, -7], [8, -1, 2, -1, -2, 4, 2, 4, -9, 9, -6, 6, 3, 3, 0, 0, 0, 0], [9, 1, -1, 7, 6, -2, -2, 1, -10, 7, 7, -1, -3, 2, 1, -3, 6, 6], [10, -1, 3, -1, 1, 2, 2, 3, -14, -3, 7, 0, 1, 2, -3, -2, 0, 1], [1, -2, -2, -4, -5, 5, 2, 1, -5, -1, 0, -1, 4, 1, -5, 0, -1, -1], [8, -6, -6, 2, 3, -3, -6, -1, -2, 5, 0, -8, -5, -1, -2, 0, 5, 1], [-11, -3, 6, -1, 1, 0, 0, 3, -2, -4, -15, 0, 3, 2, -4, 0, 0, 3], [15, 3, -5, 3, 5, -2, -2, -2, 3, -3, 3, -3, -3, -3, 0, 0, 0, 0], [1, -1, -1, -2, -3, 3, 1, -2, -1, 11, 11, 0, -3, -1, 0, -3, -3, -3], [1, 2, 0, -3, -1, 6, 1, 0, 4, 1, 1, 4, 2, -3, -1, 3, -3, -3], [2, -2, -6, -4, -2, 6, 0, -4, 0, -6, -2, 8, 0, 0, 4, -2, 2, -2], [-14, 1, 1, 1, -6, 1, 4, 2, 9, 2, 0, 14, 5, 2, 9, 0, -2, -2], [6, 4, 0, 0, 2, -1, 0, 0, -2, 6, 8, -2, -2, -2, -8, -2, -2, 2], [0, 0, 4, -4, 2, -6, 0, -2, 5, -4, 5, 9, -2, -2, 0, 2, -4, -2], [3, -1, -4, -4, 1, 0, -1, -3, 0, 0, -4, 4, -5, -5, 0, -3, -3, 0], [2, 2, 1, 6, 0, 5, 3, 3, 2, 0, 0, -3, 0, 3, -5, 0, 3, 0], [-6, 0, 2, 9, 2, 2, 0, 0, 5, 8, 5, -3, 0, 4, 6, -4, 4, 2], [0, 6, -1, -4, -6, 7, 8, 3, -6, -6, 0, -6, 4, -4, -4, 0, -4, -8], [1, 1, -5, 8, 7, 0, -5, 3, 0, 2, -1, 0, -5, 0, -3, -5, 6, 0], [-6, 0, 0, 3, -1, 5, 0, -1, 0, 5, 0, -5, 1, 3, 6, -3, 4, -1], [6, 8, -2, -2, -4, -3, 3, 2, 1, 1, 1, 7, 4, -3, -7, 4, -4, -4], [-12, -2, 4, 1, -1, -3, -1, -2, -12, 0, 0, -1, 0, 1, 11, -3, -1, 2], [1, -3, 0, 1, -1, 4, 4, 7, 0, -9, -8, 0, 1, 4, -9, -4, 0, 1], [-2, 6, -1, -3, -9, 2, 1, -2, 0, 5, 2, -4, 1, 0, -3, 1, -5, 0], [0, 0, -5, 1, 3, 5, -2, -6, 1, -4, -5, -4, -1, 1, -8, 0, 1, 2], [0, 6, -2, 2, -2, 2, 2, -4, 8, -4, -4, 0, -2, 0, -4, -2, 0, -2], [-5, 3, -6, -3, 3, -2, -2, -5, 6, 11, 6, 0, -2, -7, 11, 2, 0, -2], [2, 1, 3, -1, -2, 1, 4, 3, 0, 4, -2, 0, 4, 0, -6, 2, -8, -2], [-8, -6, 0, 1, 0, 2, 0, 5, 10, -8, -13, 10, -2, 6, 13, -2, 6, 2], [0, 0, 4, -3, 3, -5, 0, -1, 12, 6, 12, 6, 0, -2, 0, 2, -2, -2], [2, 7, -5, 5, 3, 2, 3, 0, 2, -2, -10, 10, 0, 0, 0, -2, -2, 0], [-7, 0, 1, 0, -1, -1, 0, -1, 2, -2, -4, 4, -4, -4, 0, 0, 0, 0], [-2, 0, 0, -7, 0, -6, 0, 0, 1, 1, 1, 0, 0, -6, 2, 6, -6, -5], [0, -1, -1, 0, 1, -2, -4, -2, 14, 2, 0, 0, -4, -2, 14, 0, 2, 2], [11, 2, -1, 1, -1, -1, -2, -1, 0, -9, -11, -16, -2, 0, -2, -2, 3, 0], [-2, 7, 1, 5, -5, 4, 4, -3, -4, -3, -5, 0, 3, 0, -3, -4, 0, 3], [7, 0, -1, 3, -3, -2, 0, -2, 5, -3, 5, 8, -2, -3, -7, 3, -5, -3], [7, -4, 5, -2, -3, 2, 5, 4, 5, -5, -10, 10, 3, 3, 0, 2, 2, 0], [-2, -4, 3, 1, 3, -2, 2, 5, -2, 0, 12, -3, 0, 4, -1, -3, 2, 2], [-1, -2, 5, 4, -4, 0, 0, 2, -2, 1, 0, 0, 4, 5, 1, 0, 0, 4], [0, -3, 5, 1, 3, -3, 0, 6, -5, -2, 3, -2, -1, 0, -7, -1, 1, 0], [-4, 1, -8, -3, -4, 13, 5, 2, 0, 13, 4, 1, 5, 0, -9, 2, -2, -3], [-9, 1, 0, -1, 3, -1, -2, 1, -9, 0, 3, 7, 0, 4, 16, -3, -2, 6], [-4, -4, 2, -2, 0, 2, 0, 1, 4, -16, -16, 0, 0, 0, 0, 0, 0, 0], [-10, -4, -5, -5, 4, -1, -3, -2, 4, -4, -1, 1, -2, -2, 0, -1, -1, 0], [11, 0, 5, 3, 6, -3, 0, 1, 0, 5, 0, -5, 2, 1, -11, -1, 3, 4], [2, -5, 0, -5, -4, 2, -1, 1, 8, 2, 8, 8, 0, 1, -8, -1, 1, 1], [2, 0, 4, 4, 4, -8, -4, 0, 0, -4, -2, -8, -4, 0, 2, 0, 0, 4], [0, 1, 1, 1, 1, 0, 1, 3, -1, -4, -3, -4, -1, -4, -5, -5, 1, -1], [-15, 0, 3, 4, -2, 1, 0, -5, 11, 3, 11, 8, -4, 3, 15, -3, -1, 6], [-4, 3, 1, 3, -1, 9, 6, 9, -10, 10, -4, 4, 2, 2, 0, 0, 0, 0], [3, 0, -4, 2, 1, 2, 0, 5, 11, 16, 11, -5, 3, 0, -3, 0, 3, -6], [-5, 3, 3, -1, 1, 1, -3, 0, -8, 1, 0, 5, 4, 0, -8, 0, 3, 0], [11, -7, 0, -6, -9, 6, 4, -1, 13, 11, 3, 13, -1, -2, -3, 3, -2, -3], [2, 6, -7, 6, -1, 2, 1, 2, 3, -9, -9, 5, 0, -1, -5, 0, -1, -1], [-10, -2, 1, -2, 0, -3, -1, -1, -10, 0, 12, -15, 0, 5, -5, 0, -1, 6], [0, 6, -5, 3, 2, 0, -4, -6, -5, -8, -3, -8, -3, 0, -19, -3, 3, 4], [0, -6, -6, -2, -2, 2, 1, 0, -2, -5, 0, 0, 1, 0, -2, 0, -1, 0], [-7, -1, -1, -1, 1, -1, -7, -2, 6, -19, 0, 7, -1, -2, 6, 0, 5, 2], [0, -2, 5, -1, 1, 3, 3, 5, -7, -2, -2, 0, 3, 5, -2, -3, 0, 3], [-1, 5, -1, 6, 5, -5, -1, -7, -8, -13, -13, -9, -3, 1, 9, -3, 5, 5], [-10, 2, 4, 2, -4, -4, 2, -4, -9, 9, 10, -10, 6, 6, 0, 0, 0, 0], [0, -2, 6, 2, -2, 0, 0, 2, 9, 12, 12, 0, 0, 4, 12, 0, 0, 0], [-2, 2, 0, -6, -1, -1, 1, 3, 2, -2, 5, 2, 6, -3, -5, 7, -3, -7], [0, 1, -1, 0, 4, 3, -2, -3, -6, 0, 6, 0, 0, -2, 0, -2, 0, 2], [15, 0, -2, 1, 3, -1, -2, 0, -9, 9, -5, 5, -1, -1, 0, 1, 1, 0], [0, 1, 1, -3, -10, -5, 3, 1, 8, 7, -1, 7, 3, 3, -5, 6, -3, -3], [-5, 5, 0, 13, 14, -2, -2, 8, 3, -5, -11, 3, -3, 9, 11, -5, 9, 5], [-13, 5, 2, -1, -6, -6, -4, -5, 0, 11, 13, -10, -4, 0, 2, 0, -5, 4], [4, 7, 0, 9, 5, -1, 2, -4, 5, 4, 5, 5, 1, -2, -5, 3, -2, -3], [2, -5, -3, -1, 1, -4, -4, 1, -2, 2, 4, 0, -2, -2, 2, 4, 0, -2], [5, 0, 1, -3, 2, 1, 0, 1, 14, -9, 14, 23, 2, 1, -5, -1, 3, 1], [-13, 7, -9, 11, 2, -1, -3, -10, -2, -11, -11, -15, -4, 3, 15, -4, 2, 2], [6, 7, 7, 4, -1, -2, 2, 2, -4, 7, 0, -6, 0, 2, -4, 0, 0, -2], [-12, 0, 0, 12, 3, -9, 0, 3, 3, 9, 0, 12, 0, 3, 3, 0, 3, -3], [-1, 0, 2, -3, -3, -3, -1, -4, 0, 2, 1, -6, -1, 0, -1, -1, -1, 0], [0, -5, 2, -1, 0, -7, -6, -5, -8, 14, 22, 14, 1, 4, -17, 5, -1, 6], [-15, -3, 2, -1, 1, 1, 0, 2, 7, -14, -14, -8, 1, 0, 8, 1, 1, 1], [-2, 0, 2, -10, 0, -6, 0, -2, -5, -1, -5, -4, 2, -8, 2, 8, -6, 0], [-6, 3, -8, 1, -1, -2, -2, -5, -6, 2, -4, 0, 2, -4, 2, 2, 0, 2], [-9, -5, 0, 7, 0, 3, -1, -3, -13, -9, 1, -13, -2, 5, -1, -3, 5, 3], [-12, 0, 3, 1, 3, -2, -2, 1, -12, 0, -4, -16, 0, -4, -4, 2, -2, -2], [-7, 2, 3, -2, -7, -3, 0, -7, -1, 1, 8, -8, -5, -5, 0, -4, -4, 0], [7, 0, 3, -15, -3, 0, 0, -6, -5, 6, -5, -11, 4, -7, -7, 7, -3, -2], [7, 3, 3, -1, 2, 4, 5, 3, -8, 8, 0, -7, -2, 3, -8, 0, -2, -3], [-2, 1, 0, -3, -3, 5, -3, -7, 1, -2, 11, 1, 1, -4, -11, -2, -4, 2], [-10, -6, 7, -1, 1, -1, -1, 5, 9, 14, 4, 0, 3, 3, 14, 1, 0, 3], [-4, 6, -2, 6, 4, -6, -2, -4, 2, 0, 0, -2, -4, 2, 2, -4, 4, 4], [7, 2, 0, -4, -4, -2, 0, -5, -12, -10, -10, -5, 3, 0, 5, 3, -4, -4], [3, -4, -4, -6, -5, 6, 3, 0, -1, 13, 0, -3, -1, 0, -1, 0, -3, 0], [12, 5, 5, 4, -4, -8, 2, -4, 2, 1, 0, -12, 6, -4, 2, 0, -6, 4], [0, -2, 9, -12, -11, 0, 8, 5, 1, 1, 0, 1, 12, 1, -3, 13, -12, -8], [8, -4, 3, -1, 3, -4, 0, 3, 8, 0, 4, 9, 0, -2, 1, -6, 0, -2], [-4, -2, -1, 2, 1, 2, -1, -6, -7, 7, 7, -11, 0, 1, 11, 0, 1, 1], [-10, 2, 13, -1, 1, -1, -1, -3, -7, 2, -8, 0, 4, 5, 2, 1, 0, 4]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_950_l_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_950_2_l_i();".
// 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_950_2_l_i(:prec:=18)
    chi := MakeCharacter_950_l();
    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_950_2_l_i();".
// 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_950_2_l_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_950_l();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![64, 288, 46512, -244544, 501912, -488322, 206005, 15876, -36531, 4636, 2925, -1422, 788, -216, 36, -6, 9, 0, 1]>],Snew);
    return Vf;
end function;