
// Make newform 1050.3.f.e in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1050_f();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1050_f_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_1050_3_f_e();".
// 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_1050_3_f_e();".
// 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 := [33124, 42224, 108130, -430504, 619745, -725188, 690168, -486436, 259514, -108488, 39126, -10640, 2744, -476, 88, -8, 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], [-649676357, -17481907352, 35060551363, -43898979412, 45399734980, -32746371306, 19009619662, -7790526200, 3054133421, -801656916, 225649370, -37319428, 7629434, -650552, 92936, 0], [205883061930, -62514228256, -162963123242, 764608199695, -1236294585205, 1226929460919, -765787653189, 346554004115, -139565919575, 38484795345, -10965281907, 1869869245, -384267955, 33518345, -4788335, 0], [2568347439658, 20767817705524, -27051359900108, 19632522741596, -29101821255449, 27839347208307, -17579924497940, 8080662254257, -3276860586835, 914750319012, -261565786159, 44996684681, -9262265428, 813608299, -116229757, 0], [12465433464302, 199508459888936, -359029814503882, 409537531927639, -448503864698116, 343031420986488, -203322728917885, 85935488321978, -34039488965360, 9111477265293, -2578996359596, 432644909884, -88689952367, 7653446486, -1093349498, 0], [20065240923728, -24686735907128, -58640398536476, 89991465893173, -112964032428330, 126105936855176, -99567014762287, 56950285171984, -24725356812534, 9387854016075, -2581323646286, 697811667584, -120606470101, 23452089504, -2098820550, 279842740], [-22682224994288314, -923159515366322356, 1536062304795605372, -1535846687594913197, 1400448210877820969, -888806142074331045, 437800427292617549, -122069337632357551, 44319669382131871, -531851674789797, 858731238749983, 909308118211537, -83261406982037, 57853449494147, -3209377373879, 1064447881686], [63905884783233220, 602287486497156556, -1280080729563355862, 1753431284375887721, -2148896267184962303, 1786712131988850591, -1140018364997652341, 539879980331172325, -217209573670629559, 69135726258527109, -18832916003825449, 4200920417848625, -757541135750011, 115858532030359, -11495817736195, 1064447881686], [-179130952, 2030131612, -6344286416, 9261694875, -9767388084, 8742397202, -5796321469, 3117962578, -1256401704, 464891353, -122643488, 32749646, -5508607, 1065318, -93360, 12448], [744756406728367124, -705321532058718680, 1836991252719575194, -2138724181565629263, 1803061234163058501, -1473931130917122289, 1016038863804619877, -612048024969048539, 245952950235553953, -104460706623912221, 26694378874412479, -8216025180516379, 1309538863202951, -295302862411617, 23962636724121, -3854937063308], [531749434692057946, 625130317554887084, -2045914723451540566, 3117694261499572908, -3384302188261511751, 3044238135652700623, -1998914880969722516, 1058567337159689039, -426117375260218293, 154311383653392476, -40914836644345741, 10648134936885469, -1809683908646036, 339053671356957, -30212752287741, 3854937063308], [700117415521608994, 576827345172515312, -2171916157642537894, 3709736650323528063, -4342698800407316979, 3994713632454400783, -2590358094781911509, 1325124389193165749, -533270283374438967, 183762060808011509, -49298728429864189, 12074771414022469, -2102794770058199, 364594339921263, -33861419225499, 3854937063308], [-62893609797828992, 693477650854020896, -2154252345020041282, 3178048469640185847, -3490535031960335649, 3317271373015585711, -2322142348180659911, 1274658163466793299, -526967009577493719, 196742572634383223, -52670077378974979, 14125631930262397, -2399118830433377, 464858064633033, -41041225693275, 5472163425770], [-74867636882512292, 813331367312824376, -2518409219931557242, 3736895472836790177, -4192041673340264949, 4100389240886228671, -2940453509854462181, 1628319434384813939, -680511475383329859, 255041146074208973, -68700097222411039, 18459042385959037, -3148085009760587, 610495540452873, -54074901308775, 7209986841170], [767874169626928, -959984408973388, -2295132049284554, 3851913596232853, -5073064410728007, 5537445103727985, -4302607169649537, 2442760651969745, -1051227743230329, 397669560517609, -108707533995533, 29328141084055, -5046667645019, 980333632691, -87395668185, 11652755758], [-9230202682938692, 11928324887229772, 28891531292633078, -56716001622329941, 80129924292009159, -84744155655241521, 64319930863026889, -36122988388313897, 15346661487816381, -5777614529073753, 1567393616297861, -421896015444175, 72233927780755, -14017718745515, 1244917191105, -165988958814]];
    Rf_basisdens := [1, 5030871765, 119428521030, 2746855983690, 8240567951070, 21993425639458, 68289586610517090, 68289586610517090, 520340730, 68289586610517090, 68289586610517090, 68289586610517090, 68289586610517090, 68289586610517090, 109967128197290, 989704153775610];
    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_1050_f();"
function MakeCharacter_1050_f()
    N := 1050;
    order := 2;
    char_gens := [701, 127, 451];
    v := [2, 2, 1];
    // chi(gens[i]) = zeta^v[i]
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    F := CyclotomicField(order);
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),[F|F.1^e:e in v]);
    return MinimalBaseRingCharacter(chi);
end function;

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


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


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 3;
    raw_aps := [[0, 0, 0, 0, 0, -1, 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, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0], [0, 3, 0, -1, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, -1, 0, -1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, -2, 1, 0, 0], [0, -1, 0, 0, 0, 5, 1, 1, 0, 0, 0, 0, 0, 0, -2, 1], [-4, 0, -4, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0, 0, 0, -4, 2, 0, -2, 1, 4, 0, 0], [0, 3, 0, 0, 0, 2, -3, -3, 0, 0, 0, 0, 0, 0, -3, 1], [1, 0, 0, 0, 0, 0, 0, 0, 5, 1, 0, -1, 1, 2, 0, 0], [0, 6, 0, 0, 0, -18, -6, -6, 0, 0, 0, 0, 0, 0, 2, 0], [0, -13, 0, -4, -2, 0, -5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, -10, -1, -1, 0, 0, 0, 0, 0, 0, -4, -5], [4, 0, 0, 0, 0, 0, 0, 0, -8, 4, 0, -4, 8, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 6, 6, 0, 0], [0, 3, 0, 0, 0, -22, -3, -3, 0, 0, 0, 0, 0, 0, -2, 4], [-24, 0, 10, 0, 0, 0, 0, 0, 0, -4, -1, -3, 0, 0, 0, 0], [0, 3, 0, -7, 7, 0, 7, -7, 0, 0, 0, 0, 0, 0, 0, 0], [38, 0, -8, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0], [0, 5, 0, 4, -10, 0, -3, 3, 0, 0, 0, 0, 0, 0, 0, 0], [-6, 0, 0, 0, 0, 0, 0, 0, -17, -6, 0, 6, -5, -12, 0, 0], [0, -33, 0, -3, -5, 0, -5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [-7, 0, 0, 0, 0, 0, 0, 0, -47, -7, 0, 7, -7, -14, 0, 0], [0, -30, 0, 12, -4, 0, -6, 6, 0, 0, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, -23, 1, 1, 0, 0, 0, 0, 0, 0, -10, -7], [7, 0, 6, 0, 0, 0, 0, 0, 0, -7, -10, 3, 0, 0, 0, 0], [0, -3, 0, 0, 0, -26, 3, 3, 0, 0, 0, 0, 0, 0, 4, 11], [0, -2, 0, 0, 0, -16, 2, 2, 0, 0, 0, 0, 0, 0, -12, -8], [-2, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 2, -10, -16, 0, 0], [0, 9, 0, 0, 0, -70, -9, -9, 0, 0, 0, 0, 0, 0, -2, 7], [-12, 0, 0, 0, 0, 0, 0, 0, 24, -12, 0, 12, 13, -6, 0, 0], [22, 0, 4, 0, 0, 0, 0, 0, 0, -4, -16, 12, 0, 0, 0, 0], [30, 0, -28, 0, 0, 0, 0, 0, 0, -6, -18, 12, 0, 0, 0, 0], [0, 25, 0, -11, -7, 0, -5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 16, 0, 0, 0, 4, -16, -16, 0, 0, 0, 0, 0, 0, 6, -10], [0, -52, 0, 0, -4, 0, -4, 4, 0, 0, 0, 0, 0, 0, 0, 0], [0, 5, 0, -17, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-16, 0, -6, 0, 0, 0, 0, 0, 0, -12, -9, -3, 0, 0, 0, 0], [-2, 0, 0, 0, 0, 0, 0, 0, 14, -2, 0, 2, 4, 14, 0, 0], [-128, 0, -18, 0, 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0], [0, -1, 0, 0, 0, -94, 1, 1, 0, 0, 0, 0, 0, 0, -9, -5], [0, 3, 0, 0, 0, 94, -3, -3, 0, 0, 0, 0, 0, 0, -2, -7], [-17, 0, 0, 0, 0, 0, 0, 0, -20, -17, 0, 17, -30, -19, 0, 0], [-102, 0, -20, 0, 0, 0, 0, 0, 0, -14, -22, 8, 0, 0, 0, 0], [0, 3, 0, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 145, 0, 8, 22, 0, 25, -25, 0, 0, 0, 0, 0, 0, 0, 0], [8, 0, 0, 0, 0, 0, 0, 0, -94, 8, 0, -8, 4, 10, 0, 0], [0, 9, 0, 0, 0, 86, -9, -9, 0, 0, 0, 0, 0, 0, 6, -17], [88, 0, -22, 0, 0, 0, 0, 0, 0, -12, -13, 1, 0, 0, 0, 0], [6, 0, 0, 0, 0, 0, 0, 0, 26, 6, 0, -6, -2, 36, 0, 0], [-18, 0, 0, 0, 0, 0, 0, 0, -28, -18, 0, 18, -18, -24, 0, 0], [0, -47, 0, 29, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -19, 0, 0, 0, -95, 19, 19, 0, 0, 0, 0, 0, 0, 10, 5], [13, 0, 0, 0, 0, 0, 0, 0, 25, 13, 0, -13, 13, 14, 0, 0], [-8, 0, 0, 0, 0, 0, 0, 0, -12, -8, 0, 8, 19, 14, 0, 0], [0, -17, 0, 0, 0, 58, 17, 17, 0, 0, 0, 0, 0, 0, 15, -7], [62, 0, 24, 0, 0, 0, 0, 0, 0, 4, -12, 16, 0, 0, 0, 0], [0, 135, 0, 12, -22, 0, 5, -5, 0, 0, 0, 0, 0, 0, 0, 0], [0, -127, 0, 7, 14, 0, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0], [0, -91, 0, 16, 2, 0, 11, -11, 0, 0, 0, 0, 0, 0, 0, 0], [-24, 0, 0, 0, 0, 0, 0, 0, -36, -24, 0, 24, 2, -48, 0, 0], [0, -45, 0, 17, 13, 0, 13, -13, 0, 0, 0, 0, 0, 0, 0, 0], [0, -5, 0, 0, 0, 58, 5, 5, 0, 0, 0, 0, 0, 0, 12, 17], [74, 0, -52, 0, 0, 0, 0, 0, 0, 2, 6, -4, 0, 0, 0, 0], [0, 18, 0, 0, 0, -124, -18, -18, 0, 0, 0, 0, 0, 0, 32, -14], [0, -15, 0, 0, 0, 9, 15, 15, 0, 0, 0, 0, 0, 0, 18, -15], [10, 0, 0, 0, 0, 0, 0, 0, 84, 10, 0, -10, -26, 14, 0, 0], [0, 161, 0, 13, 68, 0, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0], [-282, 0, 8, 0, 0, 0, 0, 0, 0, 16, 1, 15, 0, 0, 0, 0], [0, 159, 0, 44, -42, 0, -27, 27, 0, 0, 0, 0, 0, 0, 0, 0], [0, -22, 0, 0, 0, -52, 22, 22, 0, 0, 0, 0, 0, 0, -12, 16], [-70, 0, 52, 0, 0, 0, 0, 0, 0, -30, -26, -4, 0, 0, 0, 0], [0, 4, 0, -4, 36, 0, 24, -24, 0, 0, 0, 0, 0, 0, 0, 0], [256, 0, 16, 0, 0, 0, 0, 0, 0, 18, 0, 18, 0, 0, 0, 0], [0, 91, 0, 39, 19, 0, 17, -17, 0, 0, 0, 0, 0, 0, 0, 0], [-212, 0, 72, 0, 0, 0, 0, 0, 0, -6, 12, -18, 0, 0, 0, 0], [10, 0, 0, 0, 0, 0, 0, 0, -98, 10, 0, -10, 54, 32, 0, 0], [8, 0, 0, 0, 0, 0, 0, 0, 160, 8, 0, -8, 42, 10, 0, 0], [-85, 0, -14, 0, 0, 0, 0, 0, 0, 47, 46, 1, 0, 0, 0, 0], [298, 0, -8, 0, 0, 0, 0, 0, 0, -28, -23, -5, 0, 0, 0, 0], [0, -185, 0, 21, -19, 0, 5, -5, 0, 0, 0, 0, 0, 0, 0, 0], [-3, 0, 0, 0, 0, 0, 0, 0, -196, -3, 0, 3, -34, 3, 0, 0], [0, 23, 0, 0, 0, 127, -23, -23, 0, 0, 0, 0, 0, 0, -14, 11], [60, 0, 60, 0, 0, 0, 0, 0, 0, 14, 64, -50, 0, 0, 0, 0], [0, 2, 0, 0, 0, -196, -2, -2, 0, 0, 0, 0, 0, 0, -12, -38], [-4, 0, 0, 0, 0, 0, 0, 0, 59, -4, 0, 4, -53, -32, 0, 0], [0, -2, 0, 0, 0, 108, 2, 2, 0, 0, 0, 0, 0, 0, -28, -36], [0, -149, 0, -40, 58, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [48, 0, 0, 0, 0, 0, 0, 0, -36, 48, 0, -48, 34, 0, 0, 0], [0, -16, 0, 0, 0, 270, 16, 16, 0, 0, 0, 0, 0, 0, -32, 6], [-30, 0, -60, 0, 0, 0, 0, 0, 0, 8, 9, -1, 0, 0, 0, 0], [150, 0, -32, 0, 0, 0, 0, 0, 0, 18, 30, -12, 0, 0, 0, 0], [0, 48, 0, -44, 44, 0, 20, -20, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, -285, -1, 0, 1, 3, 22, 0, 0], [-11, 0, 0, 0, 0, 0, 0, 0, -51, -11, 0, 11, -51, 14, 0, 0], [0, -236, 0, -32, -24, 0, -8, 8, 0, 0, 0, 0, 0, 0, 0, 0], [131, 0, -6, 0, 0, 0, 0, 0, 0, 23, 14, 9, 0, 0, 0, 0], [0, -57, 0, 0, 0, -198, 57, 57, 0, 0, 0, 0, 0, 0, 6, 60], [0, 19, 0, 0, 0, 34, -19, -19, 0, 0, 0, 0, 0, 0, -32, 17], [0, 58, 0, 44, 12, 0, -18, 18, 0, 0, 0, 0, 0, 0, 0, 0], [-228, 0, 28, 0, 0, 0, 0, 0, 0, -30, 16, -46, 0, 0, 0, 0], [-270, 0, 12, 0, 0, 0, 0, 0, 0, -34, -56, 22, 0, 0, 0, 0], [0, 91, 0, 9, 13, 0, -27, 27, 0, 0, 0, 0, 0, 0, 0, 0], [0, 82, 0, 16, 36, 0, -14, 14, 0, 0, 0, 0, 0, 0, 0, 0], [0, -175, 0, 21, 76, 0, 46, -46, 0, 0, 0, 0, 0, 0, 0, 0], [-36, 0, -10, 0, 0, 0, 0, 0, 0, 24, 69, -45, 0, 0, 0, 0], [14, 0, 0, 0, 0, 0, 0, 0, 224, 14, 0, -14, 44, 16, 0, 0], [0, -195, 0, -28, -54, 0, 19, -19, 0, 0, 0, 0, 0, 0, 0, 0], [0, 10, 0, 0, 0, 228, -10, -10, 0, 0, 0, 0, 0, 0, 28, -12], [0, 59, 0, 0, 0, 54, -59, -59, 0, 0, 0, 0, 0, 0, -42, -27], [-28, 0, 0, 0, 0, 0, 0, 0, 8, -28, 0, 28, 63, 10, 0, 0], [-186, 0, -52, 0, 0, 0, 0, 0, 0, -34, -52, 18, 0, 0, 0, 0], [594, 0, 12, 0, 0, 0, 0, 0, 0, 16, 80, -64, 0, 0, 0, 0], [0, 189, 0, 64, 18, 0, -17, 17, 0, 0, 0, 0, 0, 0, 0, 0], [0, -18, 0, 40, -72, 0, 2, -2, 0, 0, 0, 0, 0, 0, 0, 0], [0, 21, 0, 0, 0, 22, -21, -21, 0, 0, 0, 0, 0, 0, 18, -13], [-92, 0, 46, 0, 0, 0, 0, 0, 0, -8, -71, 63, 0, 0, 0, 0], [28, 0, 0, 0, 0, 0, 0, 0, 56, 28, 0, -28, 14, 2, 0, 0], [0, -35, 0, 0, 0, 110, 35, 35, 0, 0, 0, 0, 0, 0, -43, 37], [0, 61, 0, -37, 10, 0, -14, 14, 0, 0, 0, 0, 0, 0, 0, 0], [0, -45, 0, 0, 0, 171, 45, 45, 0, 0, 0, 0, 0, 0, 14, 39], [26, 0, 0, 0, 0, 0, 0, 0, -176, 26, 0, -26, 27, -20, 0, 0], [6, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0], [56, 0, 52, 0, 0, 0, 0, 0, 0, 42, 52, -10, 0, 0, 0, 0], [-12, 0, 0, 0, 0, 0, 0, 0, -364, -12, 0, 12, -98, 0, 0, 0], [0, 218, 0, -72, -80, 0, -38, 38, 0, 0, 0, 0, 0, 0, 0, 0], [0, -31, 0, -11, -57, 0, -87, 87, 0, 0, 0, 0, 0, 0, 0, 0], [-306, 0, -28, 0, 0, 0, 0, 0, 0, -6, 32, -38, 0, 0, 0, 0], [0, 59, 0, 0, 0, -37, -59, -59, 0, 0, 0, 0, 0, 0, 6, -53], [294, 0, 60, 0, 0, 0, 0, 0, 0, -22, -2, -20, 0, 0, 0, 0], [0, 40, 0, 0, 0, -424, -40, -40, 0, 0, 0, 0, 0, 0, -40, -26], [40, 0, 0, 0, 0, 0, 0, 0, -201, 40, 0, -40, -25, 44, 0, 0], [18, 0, 0, 0, 0, 0, 0, 0, 52, 18, 0, -18, -56, 24, 0, 0], [0, 133, 0, -93, -56, 0, -48, 48, 0, 0, 0, 0, 0, 0, 0, 0], [0, -126, 0, 32, 36, 0, -18, 18, 0, 0, 0, 0, 0, 0, 0, 0], [0, -41, 0, 57, -88, 0, -48, 48, 0, 0, 0, 0, 0, 0, 0, 0], [672, 0, 68, 0, 0, 0, 0, 0, 0, -6, 24, -30, 0, 0, 0, 0], [-64, 0, 0, 0, 0, 0, 0, 0, -72, -64, 0, 64, -17, -146, 0, 0], [-284, 0, 72, 0, 0, 0, 0, 0, 0, 58, 100, -42, 0, 0, 0, 0], [0, 2, 0, 0, 0, 4, -2, -2, 0, 0, 0, 0, 0, 0, -68, -28], [0, -49, 0, 0, 0, 207, 49, 49, 0, 0, 0, 0, 0, 0, -38, 3], [-24, 0, 0, 0, 0, 0, 0, 0, -62, -24, 0, 24, -104, -114, 0, 0], [38, 0, 0, 0, 0, 0, 0, 0, 152, 38, 0, -38, 26, -2, 0, 0], [0, 109, 0, 61, -99, 0, -29, 29, 0, 0, 0, 0, 0, 0, 0, 0], [0, 79, 0, -65, 60, 0, -26, 26, 0, 0, 0, 0, 0, 0, 0, 0], [13, 0, 0, 0, 0, 0, 0, 0, -360, 13, 0, -13, 14, -61, 0, 0], [0, -67, 0, 0, 0, -167, 67, 67, 0, 0, 0, 0, 0, 0, 14, 41], [0, -62, 0, 0, 0, 116, 62, 62, 0, 0, 0, 0, 0, 0, -20, 40], [42, 0, 0, 0, 0, 0, 0, 0, 43, 42, 0, -42, 67, 144, 0, 0], [0, 81, 0, 0, 0, -212, -81, -81, 0, 0, 0, 0, 0, 0, 70, 2], [0, -131, 0, 96, 26, 0, 17, -17, 0, 0, 0, 0, 0, 0, 0, 0], [0, 9, 0, 0, 0, 604, -9, -9, 0, 0, 0, 0, 0, 0, -2, 2], [-90, 0, 28, 0, 0, 0, 0, 0, 0, -28, 77, -105, 0, 0, 0, 0], [670, 0, 48, 0, 0, 0, 0, 0, 0, -18, 30, -48, 0, 0, 0, 0], [46, 0, 0, 0, 0, 0, 0, 0, -297, 46, 0, -46, 67, -28, 0, 0], [0, 437, 0, -17, 71, 0, 95, -95, 0, 0, 0, 0, 0, 0, 0, 0], [58, 0, 0, 0, 0, 0, 0, 0, 183, 58, 0, -58, 51, 176, 0, 0], [0, -43, 0, 0, 0, 341, 43, 43, 0, 0, 0, 0, 0, 0, -6, -47], [0, 69, 0, 0, 0, -22, -69, -69, 0, 0, 0, 0, 0, 0, 26, 7], [0, -25, 0, 0, 0, -742, 25, 25, 0, 0, 0, 0, 0, 0, -48, 22], [-36, 0, 0, 0, 0, 0, 0, 0, 132, -36, 0, 36, -154, -66, 0, 0], [0, -61, 0, 0, 0, -78, 61, 61, 0, 0, 0, 0, 0, 0, 46, 81], [0, 267, 0, 120, -74, 0, 55, -55, 0, 0, 0, 0, 0, 0, 0, 0], [-498, 0, 60, 0, 0, 0, 0, 0, 0, 74, 22, 52, 0, 0, 0, 0], [0, -163, 0, 33, -83, 0, 79, -79, 0, 0, 0, 0, 0, 0, 0, 0], [100, 0, 8, 0, 0, 0, 0, 0, 0, 28, 20, 8, 0, 0, 0, 0], [0, -67, 0, 23, -54, 0, 14, -14, 0, 0, 0, 0, 0, 0, 0, 0], [-160, 0, -18, 0, 0, 0, 0, 0, 0, -48, -105, 57, 0, 0, 0, 0], [56, 0, 0, 0, 0, 0, 0, 0, -160, 56, 0, -56, 106, 34, 0, 0], [-630, 0, -104, 0, 0, 0, 0, 0, 0, -44, -59, 15, 0, 0, 0, 0], [0, -41, 0, 0, 0, 730, 41, 41, 0, 0, 0, 0, 0, 0, 45, -1], [53, 0, 0, 0, 0, 0, 0, 0, 92, 53, 0, -53, 154, 43, 0, 0], [15, 0, 0, 0, 0, 0, 0, 0, 103, 15, 0, -15, -49, 138, 0, 0], [-1058, 0, -16, 0, 0, 0, 0, 0, 0, 6, 44, -38, 0, 0, 0, 0], [870, 0, 4, 0, 0, 0, 0, 0, 0, -8, 16, -24, 0, 0, 0, 0], [0, 36, 0, 108, 152, 0, 60, -60, 0, 0, 0, 0, 0, 0, 0, 0], [-122, 0, 0, 0, 0, 0, 0, 0, -164, -122, 0, 122, -154, -82, 0, 0], [0, -89, 0, 0, 0, -90, 89, 89, 0, 0, 0, 0, 0, 0, 68, -42], [18, 0, 0, 0, 0, 0, 0, 0, 196, 18, 0, -18, -120, -36, 0, 0], [0, 17, 0, 0, 0, -794, -17, -17, 0, 0, 0, 0, 0, 0, 49, -49], [0, 153, 0, -35, 18, 0, 140, -140, 0, 0, 0, 0, 0, 0, 0, 0], [0, -49, 0, 0, 0, 71, 49, 49, 0, 0, 0, 0, 0, 0, -34, -17], [-53, 0, 0, 0, 0, 0, 0, 0, -529, -53, 0, 53, -1, -58, 0, 0], [0, 8, 0, 0, 0, 536, -8, -8, 0, 0, 0, 0, 0, 0, 36, 58], [0, -66, 0, -76, -32, 0, -86, 86, 0, 0, 0, 0, 0, 0, 0, 0], [-464, 0, -64, 0, 0, 0, 0, 0, 0, -40, -36, -4, 0, 0, 0, 0], [104, 0, 0, 0, 0, 0, 0, 0, -68, 104, 0, -104, 42, 76, 0, 0], [0, -179, 0, -9, 197, 0, 77, -77, 0, 0, 0, 0, 0, 0, 0, 0], [0, -75, 0, 0, 0, 543, 75, 75, 0, 0, 0, 0, 0, 0, 26, 27], [1198, 0, 40, 0, 0, 0, 0, 0, 0, -70, -58, -12, 0, 0, 0, 0], [-146, 0, 0, 0, 0, 0, 0, 0, -21, -146, 0, 146, 35, -76, 0, 0], [0, -35, 0, 0, 0, -201, 35, 35, 0, 0, 0, 0, 0, 0, 94, 39], [0, 411, 0, 43, 128, 0, 146, -146, 0, 0, 0, 0, 0, 0, 0, 0], [-504, 0, -152, 0, 0, 0, 0, 0, 0, 44, 132, -88, 0, 0, 0, 0], [0, -83, 0, 0, 0, 102, 83, 83, 0, 0, 0, 0, 0, 0, 5, -45], [0, 53, 0, 77, -38, 0, 40, -40, 0, 0, 0, 0, 0, 0, 0, 0], [0, -118, 0, 60, -152, 0, -198, 198, 0, 0, 0, 0, 0, 0, 0, 0], [270, 0, -196, 0, 0, 0, 0, 0, 0, -44, -116, 72, 0, 0, 0, 0], [11, 0, 0, 0, 0, 0, 0, 0, 132, 11, 0, -11, 106, -95, 0, 0], [0, 387, 0, 79, 149, 0, 155, -155, 0, 0, 0, 0, 0, 0, 0, 0], [152, 0, 0, 0, 0, 0, 0, 0, 50, 152, 0, -152, 14, 112, 0, 0], [-70, 0, 0, 0, 0, 0, 0, 0, 84, -70, 0, 70, -36, -140, 0, 0], [0, -67, 0, 199, -36, 0, -144, 144, 0, 0, 0, 0, 0, 0, 0, 0], [19, 0, 0, 0, 0, 0, 0, 0, -52, 19, 0, -19, 82, 5, 0, 0], [0, -87, 0, 0, 0, -131, 87, 87, 0, 0, 0, 0, 0, 0, 66, -31], [424, 0, 60, 0, 0, 0, 0, 0, 0, -50, -100, 50, 0, 0, 0, 0], [-101, 0, 0, 0, 0, 0, 0, 0, -320, -101, 0, 101, -66, -139, 0, 0], [0, 100, 0, 0, 0, 216, -100, -100, 0, 0, 0, 0, 0, 0, 76, -36], [-41, 0, 0, 0, 0, 0, 0, 0, -17, -41, 0, 41, -29, 2, 0, 0], [0, 73, 0, 0, 0, -612, -73, -73, 0, 0, 0, 0, 0, 0, 32, -12], [0, -377, 0, 88, -102, 0, 7, -7, 0, 0, 0, 0, 0, 0, 0, 0], [-100, 0, 0, 0, 0, 0, 0, 0, -188, -100, 0, 100, -200, -56, 0, 0], [-4, 0, 0, 0, 0, 0, 0, 0, 384, -4, 0, 4, -8, 16, 0, 0], [0, 40, 0, 0, 0, 690, -40, -40, 0, 0, 0, 0, 0, 0, -12, -90], [48, 0, 0, 0, 0, 0, 0, 0, -49, 48, 0, -48, 155, 0, 0, 0], [0, -77, 0, 0, 0, -319, 77, 77, 0, 0, 0, 0, 0, 0, -74, 13], [0, -103, 0, 0, 0, 298, 103, 103, 0, 0, 0, 0, 0, 0, -64, 95], [-978, 0, 32, 0, 0, 0, 0, 0, 0, 16, -80, 96, 0, 0, 0, 0], [58, 0, 0, 0, 0, 0, 0, 0, -228, 58, 0, -58, 109, 128, 0, 0], [-1414, 0, -196, 0, 0, 0, 0, 0, 0, -20, 68, -88, 0, 0, 0, 0], [0, 107, 0, 0, 0, 248, -107, -107, 0, 0, 0, 0, 0, 0, -52, 4], [0, 870, 0, -44, -108, 0, -94, 94, 0, 0, 0, 0, 0, 0, 0, 0], [-356, 0, 0, 0, 0, 0, 0, 0, 0, -48, 60, -108, 0, 0, 0, 0], [0, -549, 0, 43, 134, 0, 96, -96, 0, 0, 0, 0, 0, 0, 0, 0], [-782, 0, 76, 0, 0, 0, 0, 0, 0, 24, 69, -45, 0, 0, 0, 0], [0, 34, 0, -40, -48, 0, -158, 158, 0, 0, 0, 0, 0, 0, 0, 0], [-268, 0, 82, 0, 0, 0, 0, 0, 0, -60, -107, 47, 0, 0, 0, 0], [0, -8, 0, 0, 0, -664, 8, 8, 0, 0, 0, 0, 0, 0, -44, -26], [-61, 0, 0, 0, 0, 0, 0, 0, -240, -61, 0, 61, -50, -155, 0, 0], [766, 0, -120, 0, 0, 0, 0, 0, 0, 94, 62, 32, 0, 0, 0, 0], [-738, 0, -212, 0, 0, 0, 0, 0, 0, 28, 76, -48, 0, 0, 0, 0], [0, 271, 0, -64, 22, 0, 149, -149, 0, 0, 0, 0, 0, 0, 0, 0], [0, -429, 0, 32, -50, 0, 7, -7, 0, 0, 0, 0, 0, 0, 0, 0], [-22, 0, 0, 0, 0, 0, 0, 0, 222, -22, 0, 22, -106, -104, 0, 0], [0, 201, 0, 0, 0, -334, -201, -201, 0, 0, 0, 0, 0, 0, -10, -41], [880, 0, -50, 0, 0, 0, 0, 0, 0, 20, 41, -21, 0, 0, 0, 0], [-54, 0, 0, 0, 0, 0, 0, 0, -196, -54, 0, 54, 76, -30, 0, 0], [0, 23, 0, 0, 0, -1151, -23, -23, 0, 0, 0, 0, 0, 0, 2, 5], [-44, 0, 0, 0, 0, 0, 0, 0, 440, -44, 0, 44, 45, -106, 0, 0], [0, 385, 0, -140, -102, 0, -149, 149, 0, 0, 0, 0, 0, 0, 0, 0], [-520, 0, -48, 0, 0, 0, 0, 0, 0, 140, 28, 112, 0, 0, 0, 0], [0, -227, 0, 37, 224, 0, 110, -110, 0, 0, 0, 0, 0, 0, 0, 0], [78, 0, 0, 0, 0, 0, 0, 0, 192, 78, 0, -78, 158, 6, 0, 0], [0, 104, 0, -132, 88, 0, 160, -160, 0, 0, 0, 0, 0, 0, 0, 0], [106, 0, 0, 0, 0, 0, 0, 0, 388, 106, 0, -106, 320, 128, 0, 0], [-882, 0, -92, 0, 0, 0, 0, 0, 0, -94, -124, 30, 0, 0, 0, 0], [0, -87, 0, 0, 0, 955, 87, 87, 0, 0, 0, 0, 0, 0, -2, -97], [0, 40, 0, 0, 0, -1640, -40, -40, 0, 0, 0, 0, 0, 0, 12, 26], [90, 0, 0, 0, 0, 0, 0, 0, 237, 90, 0, -90, 173, -48, 0, 0], [0, 15, 0, 0, 0, -659, -15, -15, 0, 0, 0, 0, 0, 0, -154, -79], [-80, 0, 0, 0, 0, 0, 0, 0, -38, -80, 0, 80, -38, -172, 0, 0], [0, -41, 0, -19, 144, 0, 108, -108, 0, 0, 0, 0, 0, 0, 0, 0], [-286, 0, 124, 0, 0, 0, 0, 0, 0, -144, -235, 91, 0, 0, 0, 0], [72, 0, 72, 0, 0, 0, 0, 0, 0, -112, -164, 52, 0, 0, 0, 0], [0, -59, 0, 4, -202, 0, 91, -91, 0, 0, 0, 0, 0, 0, 0, 0], [0, -307, 0, 67, 72, 0, 96, -96, 0, 0, 0, 0, 0, 0, 0, 0], [0, -223, 0, -225, 127, 0, -21, 21, 0, 0, 0, 0, 0, 0, 0, 0], [0, -54, 0, 0, 0, 436, 54, 54, 0, 0, 0, 0, 0, 0, 140, 188], [0, 99, 0, 0, 0, 459, -99, -99, 0, 0, 0, 0, 0, 0, -62, -21], [-92, 0, 0, 0, 0, 0, 0, 0, 310, -92, 0, 92, -44, 86, 0, 0], [0, 301, 0, -107, 9, 0, -177, 177, 0, 0, 0, 0, 0, 0, 0, 0], [0, 511, 0, -21, -28, 0, -118, 118, 0, 0, 0, 0, 0, 0, 0, 0], [-86, 0, 0, 0, 0, 0, 0, 0, 152, -86, 0, 86, -251, -52, 0, 0], [844, 0, -16, 0, 0, 0, 0, 0, 0, -106, -32, -74, 0, 0, 0, 0], [25, 0, 0, 0, 0, 0, 0, 0, -347, 25, 0, -25, -191, -94, 0, 0], [0, -43, 0, 0, 0, -534, 43, 43, 0, 0, 0, 0, 0, 0, -134, -48], [0, -87, 0, 0, 0, -362, 87, 87, 0, 0, 0, 0, 0, 0, 54, 155], [148, 0, 0, 0, 0, 0, 0, 0, 48, 148, 0, -148, 106, 122, 0, 0], [0, 166, 0, 0, 0, 774, -166, -166, 0, 0, 0, 0, 0, 0, 34, -72], [0, 435, 0, 121, -165, 0, -141, 141, 0, 0, 0, 0, 0, 0, 0, 0], [1446, 0, 208, 0, 0, 0, 0, 0, 0, -10, -46, 36, 0, 0, 0, 0], [0, -229, 0, -3, -29, 0, -41, 41, 0, 0, 0, 0, 0, 0, 0, 0], [0, -688, 0, 256, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -159, 0, 0, 0, -255, 159, 159, 0, 0, 0, 0, 0, 0, 90, 93], [1429, 0, -170, 0, 0, 0, 0, 0, 0, 37, 90, -53, 0, 0, 0, 0], [541, 0, -266, 0, 0, 0, 0, 0, 0, -3, -54, 51, 0, 0, 0, 0], [-10, 0, 0, 0, 0, 0, 0, 0, -388, -10, 0, 10, 106, 4, 0, 0], [0, 229, 0, 80, -294, 0, -115, 115, 0, 0, 0, 0, 0, 0, 0, 0], [-358, 0, 72, 0, 0, 0, 0, 0, 0, 54, 60, -6, 0, 0, 0, 0], [0, -261, 0, -128, -282, 0, -229, 229, 0, 0, 0, 0, 0, 0, 0, 0], [196, 0, 0, 0, 0, 0, 0, 0, 188, 196, 0, -196, 126, 182, 0, 0], [0, -792, 0, -84, -236, 0, -140, 140, 0, 0, 0, 0, 0, 0, 0, 0], [-1088, 0, 226, 0, 0, 0, 0, 0, 0, 80, 145, -65, 0, 0, 0, 0], [0, 210, 0, 0, 0, -12, -210, -210, 0, 0, 0, 0, 0, 0, -116, -114], [0, 137, 0, 0, 0, -198, -137, -137, 0, 0, 0, 0, 0, 0, -28, -93], [184, 0, 0, 0, 0, 0, 0, 0, 716, 184, 0, -184, 259, 314, 0, 0], [-44, 0, 0, 0, 0, 0, 0, 0, -705, -44, 0, 44, 27, -16, 0, 0], [270, 0, 284, 0, 0, 0, 0, 0, 0, -92, -132, 40, 0, 0, 0, 0], [0, 93, 0, -4, -146, 0, -115, 115, 0, 0, 0, 0, 0, 0, 0, 0], [0, 11, 0, 0, 0, 910, -11, -11, 0, 0, 0, 0, 0, 0, -66, 41], [40, 0, 0, 0, 0, 0, 0, 0, 296, 40, 0, -40, 266, 194, 0, 0], [0, -154, 0, 0, 0, -564, 154, 154, 0, 0, 0, 0, 0, 0, 88, -12], [142, 0, 0, 0, 0, 0, 0, 0, 517, 142, 0, -142, 161, 416, 0, 0], [47, 0, 0, 0, 0, 0, 0, 0, 452, 47, 0, -47, 46, 325, 0, 0], [0, -225, 0, -83, -196, 0, 88, -88, 0, 0, 0, 0, 0, 0, 0, 0], [20, 0, 0, 0, 0, 0, 0, 0, 388, 20, 0, -20, -44, -146, 0, 0], [0, -234, 0, 292, -40, 0, -174, 174, 0, 0, 0, 0, 0, 0, 0, 0], [0, 61, 0, -129, -385, 0, -185, 185, 0, 0, 0, 0, 0, 0, 0, 0], [0, -137, 0, 0, 0, 14, 137, 137, 0, 0, 0, 0, 0, 0, 64, 157], [174, 0, 92, 0, 0, 0, 0, 0, 0, 70, 120, -50, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1050_f_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1050_3_f_e();".
// 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_1050_3_f_e(:prec:=16)
    chi := MakeCharacter_1050_f();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 3));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(1999) - 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_1050_3_f_e();".
// 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_1050_3_f_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1050_f();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<11,R![-4844, 1776, 28, -24, 1]>,<23,R![11186869824, 0, -843688800, 0, 2745076, 0, -2932, 0, 1]>],Snew);
    return Vf;
end function;