
// Make newform 1050.2.bc.h in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1050_bc();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1050_bc_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_2_bc_h();".
// 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_2_bc_h();".
// 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 := [4, -40, 164, -344, 390, -336, 358, -180, 351, -176, 118, -24, 67, -48, 12, -4, 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], [4680253552809794, 4742345058394342, -19428846797347660, -5327429661771194, -26263502656698172, -6622116382602757, -17495309067416083, 3536477625795241, -8792384561334166, -900494454550979, -1607350163227359, 2680829374033629, -648847305484636, 217326371958939, -74224360591111, 1434138866353], [195044141171618, -814448920872776, 47788976778038450, -21876042039069938, 48096185658956821, -26694324268699259, 18681773772251579, -34533205664857133, 22625006932641203, -12957947975492223, 281604145705947, -7621279603788347, 5707540667520213, -1406992399278677, 492304781090243, -123434729989149], [6950822659807744, -37418608795158304, 77038886286558388, -62657114582598388, 85474895099571132, -44775296775045806, 55051784324946342, -58228159495736079, 37940274269902486, -15122432396762870, 7288708077624688, -13885376435295071, 7694802116157034, -2027562782554100, 666808683532056, -137809854283897], [-16575048540328, 162118602709476, -622728293466680, 1087029641011808, -488205468817916, 1336974192211299, 11545660383276, 1073827229563468, -395501573216208, 464520812336313, 18595969360728, 154868117754112, -162143292202288, 38145193554947, -13126607646508, 3909951128714], [3631882693804, -56848696686768, 338424533456400, -1127861763864064, 55329885176253, -1495012504742632, -327950045248708, -1058958936197574, 264781323438119, -507559901300404, -55417826512144, -115488770848206, 160755388928989, -36598537974476, 12665097411614, -4143762135082], [35411484066617244, -192208665603330138, 446449271988400340, -517428552172387524, 437389184714757453, -494473747233645422, 215899963434715562, -482812364930441289, 237626790891811969, -167480504119187474, 26412913789425376, -90330349700000641, 67570735976932179, -16762149286150656, 5626426049162414, -1439070217869327], [-77929949288, 520681411390, -1441782411844, 1933409293532, -1324040796852, 2053184268060, -458012963070, 1863520118983, -820031528032, 709289788986, -40514369326, 314950092835, -270219726184, 65510725326, -22259671750, 6100180981], [65633529574178, -411232893748306, 1306467148621370, -1824887125776248, 1207350248071826, -1990877398734524, 332786417052279, -1797695843305223, 777595182487398, -701312474278478, 17152993349497, -295959094070367, 264606089742658, -63731636791632, 21780610045393, -6072104849199], [-28123111426177514, 198734847296148758, -504441981276855820, 666044503208027234, -490835043167996523, 683022296693330837, -188961643415479902, 636133145212162719, -292701695999447459, 235208674633202009, -19058949252444566, 111269852929486391, -91579556495364929, 22354204007810251, -7578221328661024, 2035054902038187], [-330526984, 2513736318, -7254602740, 9461086554, -6825888288, 10021703527, -2344575592, 9212296429, -4158557204, 3515753069, -188871116, 1575363211, -1344589864, 326080511, -111020724, 30320067], [-7740432548067096, 53424782974620022, -157676074754561598, 181717723715357082, -154497881200594756, 182753898461327581, -65452477393295353, 179418986889806458, -87228624024570764, 64640506440221435, -6275666808832427, 32832120300673190, -25955396623934578, 6376823282252541, -2163110819836755, 567889621787826], [-60388611162910706, 413425841726845612, -1197019598040248580, 1638034897211160076, -1105265950762762657, 1765864153109925593, -344839767257990343, 1588081348228614396, -694365286936506611, 615506034577358971, -25993531049108449, 264944456866733364, -232054361068567251, 56052725193796619, -19095159515314451, 5281395788857158], [258618081490, -1753345508964, 4768566345236, -6274129258728, 4492931472132, -6516717498206, 1643327598977, -6018321521990, 2719627979686, -2258419134670, 152629602893, -1035106924390, 869648666130, -211530176114, 71829768307, -19482487322], [791533522, -6297003604, 18964234070, -25400492652, 17742563129, -27237589476, 5661417851, -24845185642, 11027434227, -9561674912, 407798693, -4191737118, 3640243297, -880560228, 300206917, -82631746], [-83437215315298168, 607998971285547366, -1699651856766889730, 2200212896950517088, -1620912261036340171, 2300137181821316574, -584968875881439509, 2135058242437940538, -975207215422026373, 803087087863156658, -50736196725114107, 369420728986424472, -310349129733580443, 75476948193017452, -25667361154231553, 6956104161848134]];
    Rf_basisdens := [1, 5173992472766390, 5173992472766390, 1034798494553278, 28585593772190, 28585593772190, 5173992472766390, 18265555126, 16530327389030, 5173992472766390, 63923990, 1034798494553278, 5173992472766390, 18265555126, 63923990, 5173992472766390];
    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_bc();"
function MakeCharacter_1050_bc()
    N := 1050;
    order := 12;
    char_gens := [701, 127, 451];
    v := [12, 3, 2];
    // 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_bc_Hecke();"
function MakeCharacter_1050_bc_Hecke(Kf)
    N := 1050;
    order := 12;
    char_gens := [701, 127, 451];
    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], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 0, 0, 0, 0, 0, 0, 1], [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, 1, 1, -1, -1, 0, -1, 1, 0, -1, 0, 0, 1], [1, -2, 0, -1, 0, -1, -2, 2, 0, 0, -1, -1, -2, 0, 0, -2], [0, -1, 2, -1, 0, 0, 0, 0, 0, -1, -2, 0, 1, -1, -1, -1], [-3, 1, 2, -1, 0, 1, 2, -1, 1, -2, -2, 1, 2, -4, -3, 2], [-2, -1, 3, -3, -1, -1, 3, 0, 3, 0, -2, 2, 1, -4, 0, 1], [-1, 1, -2, 1, 0, 3, 0, -2, -2, 0, 1, 0, 0, -3, 1, 1], [0, 0, -1, 0, 1, 0, 2, 0, 1, 1, -1, 1, 5, 1, 1, 4], [-2, -2, -3, 1, 0, 5, -5, -2, 1, 0, 2, -1, -2, -4, -2, 3], [7, -4, -1, 0, -3, 3, 2, 0, 3, 4, 4, 3, 1, -1, 5, -1], [2, 1, 3, 3, -1, 3, -6, -1, -4, -2, 4, -1, -4, 2, -1, -3], [3, -2, 0, 1, -1, 1, -2, 0, 1, -1, 3, 0, -1, -2, 0, -1], [3, 0, 1, 2, 1, 1, 2, -2, -1, 2, 0, 1, 1, 1, 1, -1], [0, -1, 2, 1, -1, -2, -2, 2, -2, 1, 1, -1, -4, 1, 0, -8], [3, -1, -3, 3, 3, 5, -1, -2, 1, 3, 2, 3, -1, 2, 2, -1], [2, -1, 1, 1, 1, -2, 0, 2, 1, -2, 1, 1, -1, 0, 0, 2], [-5, 1, 0, 1, 0, -1, -2, 1, 1, 0, 0, 1, 0, 6, -5, 0], [-2, -4, -2, 0, 4, 0, -2, -4, 0, 0, 0, 0, 2, 0, 0, -2], [-2, 4, 2, 4, -2, -5, -6, 0, 0, -2, 2, -2, -2, 5, -7, 0], [-3, 2, 5, -1, -2, -3, 1, 3, -1, -3, -3, -3, 2, 0, -4, -2], [5, -1, -2, 4, 1, -1, -7, 2, 1, 4, 3, -2, -1, 7, 3, -4], [0, -2, 0, -2, -2, 0, 2, 2, 2, 2, 0, 0, -2, -4, 0, -2], [-9, 3, 1, 4, 2, -1, -2, -3, -2, -4, 1, -3, 2, 5, -8, 0], [5, -2, -2, -2, -3, 7, 6, 1, 1, 3, -1, 2, 5, -9, 3, -2], [1, -1, 2, 2, -1, 5, 0, -3, 4, -1, 1, 1, 3, -2, 2, 5], [-5, -1, -1, 4, 4, 1, -6, -3, -1, -3, 1, -4, 0, 3, -4, 1], [-4, -4, -2, 0, 0, 2, -4, -4, 0, 0, 0, 0, -2, -2, -4, 4], [-8, 4, 2, 0, 0, -2, 6, 2, 0, 0, -4, 2, 6, 6, 0, 0], [3, 1, -5, 2, 2, 0, 2, -6, 2, 2, 3, 6, 8, 0, 8, 9], [4, 1, -7, -4, -1, -1, 5, -2, -4, 2, 1, 1, -5, 0, 1, 6], [-7, 1, 2, 1, 0, 5, -4, -1, -1, 0, 0, -1, -2, 2, -3, 0], [6, 2, 2, 0, -6, 4, 6, 2, 2, 4, 2, 2, 2, -2, 2, 0], [2, 0, -2, 2, 0, -2, -3, -2, 2, 2, 4, 4, 0, 0, 4, -1], [-1, 3, -1, 0, 0, 7, 5, -3, -2, 0, 2, 0, 4, 7, -2, 5], [-2, 0, 3, 0, 1, 6, 0, -1, 1, 0, 0, 0, -1, -7, -7, -6], [0, 2, -12, 0, -2, -6, 4, 4, 2, -2, 2, -2, -2, 4, 0, 6], [9, -8, -12, -8, -2, 1, 6, 1, 2, 8, 0, 1, -2, -2, 10, -5], [-3, 4, 2, -1, 1, -1, 0, 1, -2, -3, -4, -1, -1, -5, -6, 4], [-9, 0, -5, 3, 3, 7, -11, -3, -2, -3, 1, -3, -3, -4, -7, 5], [-9, 1, 8, -3, 0, -3, 2, -1, 6, -1, -6, 3, 3, -1, -7, 0], [2, -1, -9, -1, -1, -4, 4, 4, 1, 4, -1, 1, 7, 6, 2, 4], [-9, 3, 7, -3, -3, 0, 7, -1, 1, -3, -3, 4, 7, -12, -8, 0], [6, 4, 4, -1, -7, -10, 0, 3, -7, -1, 3, -3, -5, 6, 6, -6], [-1, -4, -1, -6, -3, -7, -4, 7, -1, -3, -5, -6, -8, -1, -9, -4], [2, 5, 1, 1, -9, -11, 4, 5, 2, 4, 2, 1, -2, 6, 1, 3], [-9, -1, 1, -4, 0, 5, 4, 1, 0, -4, -5, -1, -2, -9, -10, 2], [10, -3, 4, 3, -4, 14, 0, 1, -1, 1, 1, 3, 0, -8, -5, -4], [2, 5, 11, 7, 5, 8, -2, -4, -7, -4, -1, 1, -5, -2, 0, -10], [8, -5, -2, -4, 1, -6, 2, -1, 0, 1, -5, 1, 1, -4, 7, 1], [13, -9, -4, -5, -4, -5, -10, 9, -2, 5, 2, -7, -9, 7, 11, -2], [1, 3, -6, -7, -2, -2, 2, 5, 3, 2, -4, 7, 6, -5, 7, 12], [-8, 5, 3, -1, -2, -1, 1, -5, -1, -7, 1, -2, -2, 1, -6, 0], [-2, 7, -2, -2, -1, -4, -2, -3, -4, -9, 7, -1, -1, 4, -3, 5], [-8, 8, 2, -8, -4, -2, 14, -2, 2, -2, -2, 6, 6, -10, -4, 12], [-1, 1, 10, -1, -3, -3, -5, 2, -1, -3, 0, -1, 2, -2, -8, -5], [3, 1, 10, 2, -1, 5, 11, -5, 2, 5, 2, 2, 15, 0, -2, -2], [-8, 0, -4, 0, 0, 6, -4, 4, 4, 0, 0, 4, 0, 2, 2, 0], [-4, -1, 3, 1, 3, -15, 0, -1, -6, -2, -6, -7, -2, 8, -7, -5], [-6, -4, 0, -4, -2, -2, -4, 2, 2, 2, -2, 0, -4, 6, -6, 0], [-6, 3, 3, -4, 3, -12, 6, -5, 3, -4, -1, 5, 8, -5, 13, 6], [-3, 2, 8, 1, -1, -1, 14, 0, 1, -1, -1, 0, 15, 0, -2, 7], [3, 6, 3, 8, 1, 1, -4, 5, -3, -1, 5, -8, -6, 7, -1, -12], [5, 2, 2, -7, -7, -6, 17, 6, 1, 5, -2, 7, 13, -1, 7, 16], [-13, 10, 11, 0, -1, -7, 4, 4, -3, -10, -10, 1, 7, 1, -5, 6], [0, -4, 1, -3, -4, -1, 19, 1, 3, 1, -5, 5, 8, -4, -1, -8], [10, -7, -3, 3, 3, -12, -12, 9, 3, 3, -4, -9, -9, 15, 6, -9], [-15, 1, 4, 1, -2, 9, -4, -3, -3, -4, 4, -5, -4, 4, -9, 0], [-6, 2, 8, -2, 2, -2, 6, 2, -4, -4, -4, -2, -2, 0, -2, 0], [-4, 8, -4, 8, -4, -2, 0, -4, -4, 0, 0, -8, 0, 2, -10, 0], [6, -4, -4, 2, 4, 10, 2, -4, 2, 4, 6, 6, 0, 0, 8, 4], [-1, 1, -8, -1, -2, 5, 5, -2, 2, 5, 5, 4, 4, -8, -4, 14], [10, -4, 6, 0, 2, -6, 14, 0, 2, 4, -4, 2, 2, -2, 10, -4], [1, 1, 3, -2, 0, -2, -6, -1, -1, -1, 1, -3, 1, 0, 5, 4], [15, -7, -6, 1, 0, 9, -6, 0, 0, 6, 7, 0, -10, -7, 1, -7], [-5, 2, 0, -4, 7, 9, 0, -5, 1, -7, -3, 4, 7, -13, 1, 8], [0, 4, 4, 0, -8, -8, -16, 4, -4, -4, 4, -8, -8, 0, 0, -4], [8, -6, -5, 3, -6, -1, -19, 3, -3, 3, 11, -11, -20, 8, -1, -4], [-5, 5, -3, 4, 4, 7, 13, -9, 4, 4, 0, 4, 14, 3, -10, 13], [-5, 1, 2, 4, 4, 0, -7, 1, 1, -5, 1, -3, 0, 2, -3, -3], [1, -1, -2, -7, 4, -1, 2, -1, 0, -3, 0, 7, -9, -3, 7, 16], [15, 0, -3, 10, 7, 21, 0, -7, -5, 7, 15, 10, 4, 11, 11, 0], [2, 0, 10, 7, -3, 9, -8, 0, -3, 7, 7, 0, 1, -1, -2, -17], [-12, 10, -4, 6, 10, -2, -15, -4, -6, -4, 7, -7, -6, 16, -8, 3], [-5, 5, -3, -2, -8, -9, -12, 7, -1, -7, 5, -8, -8, 5, -6, 1], [-15, 13, 13, 2, 4, 2, 4, -13, 3, -9, -3, 5, 17, -2, -3, 12], [-4, 6, 0, -9, -3, -7, 9, 0, 3, 3, -6, 3, -3, 1, 6, 10], [3, 1, 13, 3, 2, 3, -7, -1, 2, 1, -2, 5, -2, -5, 7, -7], [19, -9, -8, -7, 2, 6, 0, 2, -2, 7, 2, 2, -7, -6, 15, -3], [10, -9, -2, -4, 1, -12, 0, 7, 8, 5, -9, 1, 1, 6, 3, -1], [1, -6, -9, -4, -3, -9, -4, 9, 1, -3, -5, -4, -16, -5, -3, -4], [1, -5, -1, -5, 13, 14, 7, -5, -5, 3, -3, 8, 5, -2, 10, 0], [-9, 3, 2, 3, -1, 7, -3, 3, 3, -2, 3, 0, -1, -2, 0, 1], [2, 4, -2, -2, -4, 2, -2, 2, -2, -2, 2, 2, -4, 0, 0, 0], [4, -6, 4, 2, -6, -2, 0, 8, -6, 2, -4, -8, -18, 0, -4, -14], [-8, -1, -4, -7, -1, -4, 11, -5, 7, -5, -4, 4, 17, -6, -2, 13], [0, -3, -2, 2, 3, 8, 1, -6, -3, -3, -1, -2, 6, -6, -4, -5], [2, -7, -12, 4, 9, 4, -10, -5, -4, 3, 7, -9, -3, 16, 7, -21], [-2, 9, 1, 11, 9, 8, -12, 0, -11, 0, 7, -7, -15, 6, -4, -14], [-11, 10, 6, -7, -1, -1, 8, -8, -1, -7, 3, 8, 15, -10, 2, 9], [0, 1, -11, 1, -1, 0, -10, 0, 0, -3, 3, -1, -5, -1, 0, 0], [0, -8, -6, -8, 5, -4, 10, -1, -1, 0, 0, 4, 3, 9, -5, 0], [-8, 5, -7, 1, -5, -17, -5, 8, 1, -8, -6, -6, -15, 0, -10, 11], [-2, -6, -4, -8, -2, -12, 4, 8, 0, -2, -8, -8, -2, -4, -10, 4], [-14, -2, -3, 2, 3, 3, -9, 4, -4, -7, -7, -7, -13, -14, -21, 6], [-19, 14, 17, 10, -2, 1, 0, -3, 2, -10, -4, -3, 10, 0, -12, 10], [-8, 7, 8, 2, 1, 2, 4, -1, 0, -9, -7, -1, 13, -2, -3, -1], [-3, -4, 7, -4, -11, 3, 8, 7, 5, 11, 1, 4, -10, -7, 1, 0], [-4, -12, 11, -12, -11, -12, 4, 12, 14, 1, -14, 2, 9, -15, -6, 7], [-3, 1, 5, 5, 1, 8, -5, -1, 0, 4, 1, 1, 1, -12, 10, -4], [-19, 6, 4, -6, 0, -15, 12, -6, 6, -7, -7, 6, 31, -4, 2, 18], [1, 4, -20, 3, 7, 3, 0, -4, 7, 3, 7, 4, 5, 8, 4, 21], [1, 4, -10, 3, -1, 7, 11, -3, -2, -1, 5, 3, 0, 4, 9, 11], [-8, -6, -11, 9, 10, -11, -24, -6, -1, -4, -1, -10, -10, 10, -10, 0], [6, 5, 2, 8, 1, 8, -5, -6, -3, 1, 11, 8, -2, 0, 12, -5], [-6, 10, -4, -2, 2, 2, -2, -4, 2, -2, 8, 4, 12, 2, 0, 10], [-6, 2, 1, -2, 9, -2, -4, -3, 3, -4, -4, -6, 1, 5, -1, -6], [-6, -5, 10, 4, -3, 16, -13, -1, -4, 9, -5, -3, -3, -4, -11, -11], [5, -1, 23, 7, -2, 7, -11, 1, 2, -1, -2, 9, -4, 1, 3, -13], [-8, 6, -6, 6, 4, 0, -14, 2, -12, -4, -6, -6, -4, 6, -10, 2], [5, 5, -1, 0, 10, -3, -18, 3, -10, 0, -5, 3, -18, 3, 0, -4], [4, 1, -14, 10, 7, 8, -6, -3, 4, 9, 1, 7, 7, 2, 7, 6], [7, -6, -14, 6, 2, 11, -12, 4, -4, 1, 1, -6, -12, -2, -8, 14], [6, -4, 6, -10, 4, -10, -8, 6, -10, -6, 0, 0, 0, 0, 8, -18], [12, 4, 7, 4, -11, -6, 10, 4, 7, 7, 7, 3, -7, 5, 3, 10], [-10, -8, -6, 6, 8, 6, -30, 2, 6, -2, -10, -10, -8, 0, -8, -16], [-6, -2, 6, 0, -2, 8, -10, 0, 0, 0, -2, 2, -2, -16, -8, 8], [11, -1, 3, -4, 2, -2, 4, 10, -2, 4, -3, 10, 0, 2, 12, -3], [-1, 5, -8, -3, 10, -1, 0, 2, -12, -2, -5, -10, 4, 9, 1, -17], [-13, 12, 0, 15, 11, -11, -21, 1, -6, -11, 9, -15, -10, 26, -11, -9], [-6, 5, -4, 1, 8, -8, 10, -4, -8, -1, -4, -4, 11, 5, -13, -1], [-18, -1, 9, -13, -1, -4, 31, 0, 13, 0, -14, 14, 19, -18, -6, 1], [4, 2, 16, -8, -2, -10, -2, 0, -2, -8, -6, 0, 10, 4, 2, -8], [-2, 12, 3, 1, -12, 1, -1, 7, 1, -7, 1, 1, -4, 0, -9, 4], [6, -6, 6, 0, 0, 2, 12, -6, 2, 6, 2, 2, 6, -1, 2, -4], [16, -9, 0, -9, -10, -18, -2, 15, 15, 5, -5, 5, -3, -8, 13, 0], [4, 6, 2, -6, -6, 2, 16, -4, 4, -2, -2, 10, 10, -4, 6, 20], [-23, 0, -9, 4, 0, -9, 12, -15, 0, -4, 4, -15, 16, 8, -28, 2], [-7, 10, -6, 7, 1, -3, -3, 9, -10, -1, -3, -7, 4, 10, -7, -11], [-4, 9, 11, 1, -1, 1, 0, -9, 0, -10, 0, 1, 16, -6, 9, 15], [-28, 11, 20, 3, 11, 0, -11, -17, -3, -17, -2, 2, 1, 6, -20, 9], [-3, 1, -6, -1, 0, -10, -8, 9, -9, -6, -6, -9, 2, 7, -2, 6], [4, -15, -6, 1, -4, -2, -11, 12, -4, 1, -14, -12, -14, -3, -9, -7], [13, 2, 1, 10, 3, 7, 4, -5, -5, 3, 15, 10, 8, -3, 19, 4], [9, 1, -4, -5, 2, 1, -2, 1, -6, -3, -6, -1, -3, -3, -1, 2], [12, -17, -10, 11, 8, 0, -22, 8, 8, 11, -6, -8, -5, 11, 3, -9], [-1, 7, 20, -7, -4, -7, 10, 1, -1, -10, -10, 3, 14, 2, 5, -14], [-18, -2, 10, -4, -2, -8, -4, -4, 4, -4, -2, 2, -2, 8, -16, 6], [-1, 5, -22, 3, 2, -3, 2, 2, 4, -2, 5, 2, 2, -1, 9, 13], [13, -8, 5, -2, -15, -1, 12, 4, 11, 10, 8, 15, 5, -17, -1, 3], [8, -7, -31, -7, 5, -7, 12, 7, 0, 12, 0, -7, -12, 12, 9, -5], [-7, -4, 10, -5, -13, -17, 14, 2, 13, 5, -1, 2, 9, 0, -10, 13], [4, 2, -6, 8, 0, 2, -4, 0, 0, 6, 2, 0, 0, 22, -16, 0], [-1, 9, -6, 9, -12, -17, -2, -3, -3, -8, 8, -15, -4, 6, -21, 0], [-16, 6, 14, -10, -4, -6, 22, 6, 0, -2, 0, 10, 16, -2, 10, -6], [18, 2, -4, -8, -2, 2, -6, -2, -8, 2, 12, 12, -2, 0, 12, -12], [8, -3, -3, -3, -3, -9, 7, 2, 3, 2, -2, 2, 5, 12, 8, 1], [-2, -5, -11, -8, -2, -5, 2, 3, 2, 8, -3, 3, -6, 8, 6, -6], [32, -3, 4, -3, -4, -16, 15, 1, 6, 4, 3, 3, 7, 13, 19, -9], [-18, 9, 14, -4, -9, -8, 10, -5, 14, -5, -9, 9, 3, -20, -15, 13], [10, -14, -10, -16, -12, -10, 12, 2, 12, 16, -2, 2, -4, -6, 8, 4], [-5, -5, -9, 4, -6, 13, -8, 7, -6, 4, -1, -7, -10, -9, -16, -2], [16, 4, -8, -3, -4, 15, 4, -4, -3, 4, 6, 6, -4, 0, -5, 5], [4, -10, -12, -10, 2, 14, 10, 2, 2, 0, 0, 4, 2, -16, 20, 0], [-1, 0, 14, 0, -6, 3, 4, 12, 12, 7, -7, 6, 5, -8, 14, 0], [0, -5, -22, -10, 5, -8, 9, 0, -5, 5, -5, -10, -8, 2, 11, 9], [-16, 0, -12, 0, 4, -22, -6, 2, -2, -2, -2, -6, 8, 10, 4, 16], [-6, 8, -6, 11, -3, 11, -6, -8, -17, -11, 17, -6, 3, 6, -24, 9], [-16, 1, -2, -10, -7, -22, 17, -3, 10, 9, -1, 7, 7, 8, 3, 9], [38, -9, 3, 1, -16, 4, 15, 7, 6, 16, 7, -1, -4, -3, 17, -17], [-6, 4, 6, 2, -2, 2, -22, -4, -12, -6, 12, -10, -20, 2, -18, -10], [-16, 6, -18, 0, 6, -2, -8, -4, 0, -4, 8, -8, 6, 4, -10, 14], [0, -2, 1, 2, 7, -6, -13, 4, -4, -3, -3, -11, -33, 13, 2, -18], [0, -3, -14, -4, -3, -8, 5, 6, -1, -3, -3, -4, -12, -4, 15, 5], [0, -4, -6, -4, 10, -4, -8, -4, 0, -6, 0, 4, 22, 0, 4, -18], [0, 3, 3, -1, 3, -1, -2, 3, -18, -6, -18, -17, -2, 0, -17, -15], [-12, -3, 10, -7, -2, -24, 5, 5, 8, -2, -15, -7, 13, -17, -3, 5], [-17, 7, 18, -13, 6, -4, 8, -8, 6, -13, -6, 8, 21, -12, -1, 3], [-2, -1, -1, 17, -1, 8, -30, -2, -17, -2, 23, -23, -43, 18, -20, -30], [0, 4, -13, -1, 16, -1, -5, 4, -20, -3, -4, -16, 4, 8, -8, -15], [-15, 2, 6, 0, 6, 0, 8, -2, 9, 4, -9, 9, 20, -2, -17, 11], [-28, 15, 20, 7, -4, -12, 16, 6, 4, -7, -8, 6, 23, 15, -13, 7], [-10, 7, 2, -8, 1, 8, -4, -13, -12, -15, 7, 1, 1, -10, -5, 7], [11, -12, -6, 12, 4, 21, -4, -12, 12, 7, 7, 8, 7, -6, 2, 14], [-22, 13, 20, -1, -10, -18, 11, -3, 8, -10, -9, -1, 21, -17, -7, 11], [12, -10, 11, -10, 5, -12, -20, -1, -1, 2, -2, 4, -13, 5, -1, 0], [-16, 16, 10, 16, 2, 12, -6, -8, -8, -2, 2, -6, 2, 6, -12, 0], [8, -2, -18, 10, 2, 5, -24, -8, 10, 8, 6, 6, -10, 0, -4, -4], [20, 4, 8, -8, 2, -6, 6, 2, 4, -2, -4, 8, 0, -2, 18, 10], [-20, -5, -2, 19, 16, 3, -27, -9, -7, -14, 5, -16, 0, -5, -37, -5], [-6, 8, 5, 11, 9, -2, 0, 1, -9, -11, 3, 1, 11, 8, -12, -7], [22, -14, -23, -5, -14, -13, -7, 11, 5, 11, 11, -11, -10, 16, 13, 2], [-14, -10, -22, 2, 10, 8, -9, -6, 2, 6, -10, -10, -16, 0, 2, 9], [21, -7, -12, -7, -11, -11, 14, 10, 10, 8, -8, -1, 3, -21, 20, 0], [-9, -3, -6, -3, 8, 19, 30, -7, -7, -6, 6, 1, 14, -2, 3, 0], [7, 5, 15, 10, 0, 19, -21, -5, -2, 0, 12, 10, -6, 9, 9, -21], [-10, 0, -24, -14, -6, -6, -2, 2, -4, -14, 0, -6, -6, 6, -20, 16], [-8, 6, 6, -2, -6, -26, 20, 12, 6, 2, -8, 12, 18, 8, -12, -4], [-6, 2, 0, 6, 8, 0, -22, 2, -10, -8, -2, -8, -24, -2, -16, -6], [-8, 1, 5, -5, 12, -14, -9, -11, 4, -12, -1, 5, -2, 9, 1, 19], [-10, 16, 10, 16, 10, 16, -4, -16, -8, -6, 8, 8, 14, 22, -12, 6], [-14, 8, 12, 8, 0, 16, 12, -2, -2, 0, 8, 0, 0, -8, 0, -6], [4, -16, -3, -9, 2, -14, -1, 14, 3, 2, -12, -9, -2, -5, -16, -1], [-5, 7, 5, 15, -10, -27, -7, 7, 6, 3, 6, -9, -4, 21, -9, -5], [34, -5, 17, 5, -11, 10, 12, -6, 6, 11, 11, 17, 9, 13, 30, -22], [18, 11, 17, 1, 11, 0, 0, -4, -1, -4, -15, 15, 17, 2, 28, 16], [15, -19, -7, -10, 20, -9, -4, 3, 23, 9, -19, 20, 20, -7, 26, 9], [-23, 13, 9, -8, -4, -8, 2, -13, 1, -17, -1, -7, -1, 0, -11, 6], [18, -3, 8, -10, -1, -20, 1, -2, 11, 1, 1, 10, -8, 10, 18, 19], [-25, 8, 10, 16, 14, 7, -32, -8, -6, -24, -8, -14, -18, -6, -29, -30], [-12, 6, 13, -2, 7, -2, -6, -6, 5, 1, -5, 3, 1, 5, -5, -2], [3, -7, -11, 3, -5, 6, -32, -7, 5, -3, 10, -7, -29, -8, -4, -7], [9, -6, 14, -13, -9, -23, -5, 7, -2, -7, -6, -9, -9, -5, 6, -8], [2, -4, -22, 2, 12, 10, 4, -8, 4, 12, -2, 2, -6, 8, 14, 4], [6, -5, -8, -2, 5, 39, -9, -1, -2, 1, 2, 2, -7, 0, 5, -4], [19, -11, 6, -11, 2, -7, 35, 14, 14, 11, -11, 16, 20, -10, 26, 0], [0, 1, -18, -6, 5, -6, -1, -4, 1, -5, -5, 6, 22, 0, 4, 13], [-13, 12, 5, -2, 5, -5, 2, 2, -7, -10, -12, -5, 5, -11, -19, 9], [-7, -3, -6, 12, 19, 9, -18, -20, -19, -12, 15, -20, -6, 9, -23, 2], [-2, -10, -4, 16, -10, 2, -6, 2, -16, 2, 14, -14, -26, 28, -28, -36], [9, -1, -10, -3, -12, 7, 6, -1, -4, 13, -4, -1, -7, -5, -1, 6], [18, -7, 1, -1, 7, 15, -1, 0, -1, 0, 14, 14, 1, 0, 18, -3], [7, -24, 20, -10, -18, -18, 5, 25, 7, 14, -24, -18, -18, 2, -12, -26], [21, -22, -13, -2, -6, 9, -40, 1, 6, 2, 20, 1, -42, -4, 12, -12], [-11, -7, 12, -3, -4, -3, 22, 7, 20, 3, -20, 17, 21, -33, -13, 4], [24, -18, -10, 6, -2, 12, -20, 0, 2, 12, 18, 2, -30, 12, 20, 10], [15, 2, -13, 0, 11, 21, -4, -9, -7, -11, -7, 0, 20, -21, 5, 4], [2, -2, 27, 3, 10, 7, -1, -4, 6, 5, -2, 10, 10, 6, 0, -11], [18, -3, 9, 3, -3, 22, 3, 4, -3, 4, -11, 11, 9, -38, 12, 3], [43, 0, 6, 0, -12, 23, 6, 6, -6, 11, 11, 6, -19, 8, 14, -22], [-9, 8, -10, -3, -5, -17, 15, -3, -2, -5, -1, -3, 0, -14, -21, 15], [-11, 3, -7, 3, 21, 15, -34, 3, -2, -24, -2, -5, 8, -6, -5, -13], [8, -11, 0, -14, 1, -10, -37, 10, -11, 1, -3, -14, -36, 4, 2, -37], [-4, -2, 20, -12, -8, -16, -6, 8, -8, -12, -14, -8, 2, -6, -4, -16], [0, -6, 6, 6, 6, -20, -18, 6, -6, -12, -12, -12, -10, 26, 14, -12], [19, -13, 4, -4, -13, -5, -7, 25, 4, 25, -4, 4, -21, 2, 10, -10], [0, 18, 15, 3, 12, 4, -8, -19, -7, -15, 18, 12, 12, 10, 1, 6], [9, -11, -12, 0, -4, 0, 7, 11, 1, 7, -1, 1, 8, -2, -3, 7], [0, -2, 16, -2, -2, -2, 2, 2, 10, 0, -10, 8, -6, -12, 8, -14], [7, -5, 10, 5, 4, 15, -18, 9, -9, -8, -8, -13, -16, -4, -17, -30], [0, 4, 17, 9, -4, 21, 21, -9, 9, 9, 1, 1, 26, 0, -11, 4], [8, 6, 11, 6, -7, -16, -1, 0, 0, -5, 5, -7, -1, 1, -8, 0], [26, 7, 9, -9, -7, 8, 28, -12, -9, 12, 13, 13, 21, 0, 2, -2], [4, -4, -8, 14, -4, 8, -16, 4, -4, 14, 10, -4, -6, 0, 2, -10], [-2, 10, 8, -4, 10, 0, 14, 2, 4, 2, -16, 16, 22, -8, 12, 12], [15, -9, -5, 3, 11, 3, -26, 0, -11, -3, 12, 0, -23, 5, 0, -8], [2, 11, 7, 0, 15, -16, -5, -4, -1, -15, -1, 0, 3, 16, 6, 5], [-18, 16, 26, 2, 14, 6, 10, 2, -16, -14, -14, -2, -2, -4, -10, -14], [10, 9, 14, 5, 12, 6, -22, 6, -12, -5, -4, 6, -17, -1, 7, 3], [6, 2, -6, 2, 2, 4, 0, -2, 2, 2, 4, 2, 2, 8, 0, 6], [12, -8, -13, -1, 8, -17, -7, -1, -1, 1, 11, 11, -12, 0, 19, 4], [-2, 2, -5, 2, 7, 24, -14, -13, -13, -8, 8, -6, -9, -15, 9, 0], [24, -4, -7, -19, 8, 7, 8, -4, -9, -4, -9, 10, -10, -13, 10, 20], [-4, 12, -24, 12, 7, 12, -28, -13, -13, -10, 10, -6, -11, -1, -5, 0], [14, -13, -4, 3, 13, -1, -14, -1, 3, 1, 5, 5, -3, 0, 6, -8], [19, -18, -13, -6, 3, -19, -24, 15, -7, 3, 1, -6, -34, -13, 5, -24], [3, -5, -4, 5, -6, -13, -16, 17, -17, 0, 0, -11, -42, 10, -1, -14], [24, -7, 2, -10, 7, -10, -15, 5, -7, 10, -3, 5, -25, -5, 5, 7], [-3, 4, 2, -3, -1, -6, -5, 2, 1, -7, 4, -1, -1, 7, -5, 2], [9, 0, 12, 0, -6, -4, 0, 6, -6, -9, -9, 0, -1, 7, 7, -6], [5, 9, 4, -6, -5, 13, 23, -12, -5, -6, 3, 12, 7, -3, -7, 14], [-4, -6, 4, -6, -2, 8, 4, 8, 4, -2, -10, -6, 6, 14, 10, 4], [4, -4, -18, -6, 2, 0, -6, -2, 2, -6, -10, 2, 16, 0, -4, 26], [-14, 12, -6, -12, 0, -24, 10, 2, -2, -12, -12, -2, 20, 10, 8, 32], [18, -11, 7, -9, -11, -13, 3, -2, 9, -2, 6, -6, -17, 8, 16, -11], [12, -12, -24, -18, 9, -18, 11, 12, 13, 21, -13, -5, -2, 1, 31, 3], [-10, 5, 11, 9, 1, 9, -6, -5, -4, -4, 4, 5, 14, -4, -23, 9], [12, -6, -16, 4, -2, 6, -8, 0, 2, -4, 10, 0, -4, -8, 2, -20], [21, -9, 0, 9, 0, 29, 8, -17, 17, 24, 24, 17, -15, -8, 9, -14], [0, 4, -4, -20, -4, -4, 20, 0, -20, 0, 0, 0, -4, 0, 16, 4], [3, -3, 14, -3, -26, -29, 2, 15, 15, 0, 0, -11, -6, 0, -11, 0], [1, -11, 7, -11, -5, 3, -23, -3, -3, -7, 7, -8, -21, -9, 1, 0], [-3, 11, -6, -14, -11, -21, 33, -3, -14, 3, -10, -10, -3, 0, -14, 22], [3, 11, 9, 5, 11, 24, -10, -1, -11, -5, -6, -1, -5, -4, 18, 5], [-30, 7, 4, 15, 18, 2, -26, -10, -8, -22, -7, -18, -4, -11, -42, 9], [29, -8, 0, -1, -9, 25, 17, -5, 14, 9, 8, 9, 23, -17, 18, 14], [32, 10, -14, 0, -8, -18, -24, 18, -6, 8, -6, 0, -18, 18, 18, 24], [-40, 35, 2, 6, 35, 11, 5, -33, -6, -33, -8, 8, 47, -10, -11, 36], [-10, 2, 7, 9, -2, -1, -10, 11, 9, -11, -11, -11, -4, 0, -23, 3], [-1, -8, 8, -8, 14, 25, -10, -6, -6, -3, 3, 8, -5, -10, 18, 0], [-3, -9, 9, 0, -6, -11, 5, 15, 12, -6, -12, 0, 8, -11, -6, 5], [25, 0, -12, -14, 10, -7, 20, 5, -10, 14, -14, 5, 6, -10, 12, -3], [-2, 2, 4, 10, 0, 10, -8, -2, -8, -2, 8, 2, -6, -6, -18, -8], [-12, 11, -18, 8, 5, 16, -6, -7, -2, -3, 11, 5, 5, -10, 7, 13], [6, 8, -16, 10, 8, -22, 6, 12, -10, 12, 4, -4, -4, 64, 4, -20], [18, 0, 9, 0, 3, 12, 7, -10, 10, 5, 5, 7, 27, 9, 16, -14], [-1, 4, 13, -1, -5, 13, 8, 10, -5, -1, 3, -10, -27, 8, -24, -22], [-10, 0, 15, 7, 6, -13, 13, -6, 17, 6, -10, 7, 34, -20, 14, 13], [-1, -3, 1, 14, 10, -2, -20, -3, -1, -7, -1, -15, -21, 8, -15, 6], [-4, 6, 13, 10, 10, 14, -8, -16, 8, 10, 2, 10, 15, 4, 26, -8], [-8, 4, 10, -4, -1, -28, -6, 11, -11, -2, -2, -10, -33, 19, 9, -36], [-12, 0, -36, 0, -12, 12, 16, 0, -12, 0, 0, -12, -12, 4, -28, 12], [-2, -9, -26, -11, -11, -11, 1, 9, -8, -2, 8, -19, -15, -10, -19, 4], [-18, 5, 4, 3, 10, -10, -2, -18, -10, -3, -2, -18, 1, 5, -31, 19], [7, 1, -19, -1, 7, 19, 15, -8, -9, 7, 8, -1, 3, 20, 8, 15], [-32, 11, 13, 15, -11, -48, -18, 14, 15, -14, -9, -9, -1, 0, -12, -2], [-24, -10, -12, -10, 20, -12, -16, 4, 20, -10, -20, -4, 18, -10, -2, 18], [10, -11, 9, -5, -11, 1, 14, 4, 5, 4, -8, 8, 3, -12, 4, -6], [-20, 16, 10, 18, 2, 6, -44, -4, -2, -18, 2, -4, -26, 2, -16, -4], [9, 3, -4, 0, 7, 19, 4, -7, 0, -3, -3, -7, 15, -30, -18, 13], [-22, -1, -12, 0, 11, -10, -2, -13, 2, 1, 1, -11, 7, 14, -7, 16], [-39, -2, 6, -11, 13, -16, 17, -15, 16, -13, 5, 11, 24, 5, -7, 5]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1050_bc_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1050_2_bc_h();".
// 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_2_bc_h(:prec:=16)
    chi := MakeCharacter_1050_bc();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 2));
    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_2_bc_h();".
// 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_2_bc_h( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1050_bc();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<11,R![146689, 38300, 470366, -785088, 1355706, -1104284, 799216, -365284, 172687, -57924, 23088, -5596, 1530, -192, 46, -4, 1]>,<13,R![171295744, -51933184, 7872512, -9624320, 18339968, -7707968, 1764384, -370872, 304225, -126936, 29856, -4424, 1442, -536, 128, -16, 1]>,<17,R![16384, -1490944, 37621760, -67084288, 61214208, -44632064, 28418176, -13729280, 4810640, -1336352, 319232, -62912, 10108, -1376, 144, -12, 1]>],Snew);
    return Vf;
end function;