
// Make newform 1150.4.b.n in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1150_b();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1150_b_Hecke();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_1150_4_b_n();".
// 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_1150_4_b_n();".
// 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 := [116964, 0, 58833, 0, 5308, 0, 136, 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, 1, 0, 0, 0, 0, 0, 0], [0, 35577, 0, 4966, 0, 136, 0, 1], [342, 0, 68, 0, 1, 0, 0, 0], [0, 89367, 0, 1019, 0, -79, 0, -1], [0, 584289, 0, 72794, 0, 2141, 0, 17], [4458, 0, 247, 0, 2, 0, 0, 0], [15102, 0, 3409, 0, 118, 0, 1, 0]];
    Rf_basisdens := [1, 1, 37962, 111, 6327, 18981, 111, 333];
    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_1150_b();"
function MakeCharacter_1150_b()
    N := 1150;
    order := 2;
    char_gens := [277, 51];
    v := [1, 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_1150_b_Hecke();"
function MakeCharacter_1150_b_Hecke(Kf)
    N := 1150;
    order := 2;
    char_gens := [277, 51];
    char_values := [[-1, 0, 0, 0, 0, 0, 0, 0], [1, 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 := 4;
    raw_aps := [[0, 0, 2, 0, 0, 0, 0, 0], [0, 1, -1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, -2, 0, 0, 1, 0, 0, 0], [-10, 0, 0, 1, 0, 0, 1, 1], [0, 8, -5, 0, 0, 1, 0, 0], [0, -13, 6, 0, -1, 1, 0, 0], [-14, 0, 0, -2, 0, 0, -2, 3], [0, 0, -23, 0, 0, 0, 0, 0], [-41, 0, 0, 14, 0, 0, -3, 3], [97, 0, 0, 16, 0, 0, 5, 0], [0, 18, -116, 0, -2, 4, 0, 0], [121, 0, 0, -1, 0, 0, 10, 0], [0, 24, 222, 0, 6, -6, 0, 0], [0, -44, 67, 0, -3, -11, 0, 0], [0, -40, 146, 0, -8, -8, 0, 0], [20, 0, 0, -10, 0, 0, 2, 14], [290, 0, 0, 33, 0, 0, 19, -7], [0, -28, 368, 0, 0, -12, 0, 0], [57, 0, 0, 39, 0, 0, -4, -28], [0, 44, 287, 0, -1, 3, 0, 0], [232, 0, 0, 72, 0, 0, -16, -20], [0, -26, -256, 0, -24, 6, 0, 0], [450, 0, 0, -30, 0, 0, -34, -16], [0, 137, 504, 0, 31, 1, 0, 0], [86, 0, 0, 46, 0, 0, -62, 22], [0, -127, 10, 0, 45, 5, 0, 0], [0, -12, 972, 0, 30, 4, 0, 0], [-352, 0, 0, -14, 0, 0, -26, 5], [0, -104, -210, 0, -20, 12, 0, 0], [0, 70, 805, 0, -1, 5, 0, 0], [247, 0, 0, -66, 0, 0, 19, -45], [0, 38, 862, 0, 25, -56, 0, 0], [-961, 0, 0, -94, 0, 0, 27, 1], [-280, 0, 0, 230, 0, 0, -34, 27], [-191, 0, 0, 83, 0, 0, 32, 64], [0, -322, -446, 0, 10, 14, 0, 0], [0, -108, 173, 0, -6, 13, 0, 0], [0, -48, 2120, 0, -36, 48, 0, 0], [0, -175, 1584, 0, -23, 29, 0, 0], [-849, 0, 0, 208, 0, 0, -7, -7], [634, 0, 0, 238, 0, 0, 16, 97], [-1662, 0, 0, -90, 0, 0, 24, -40], [0, -212, 1031, 0, -65, 3, 0, 0], [0, -95, -477, 0, -60, -26, 0, 0], [16, 0, 0, -206, 0, 0, 10, 52], [1344, 0, 0, 266, 0, 0, 62, -116], [0, -276, 1488, 0, 116, 20, 0, 0], [0, -52, 1006, 0, 12, 82, 0, 0], [-1638, 0, 0, 4, 0, 0, -80, 36], [0, 276, 253, 0, 81, 117, 0, 0], [2697, 0, 0, 308, 0, 0, -45, 49], [-2218, 0, 0, -266, 0, 0, 130, -88], [-1234, 0, 0, 150, 0, 0, -222, 87], [0, -468, -1101, 0, -49, -77, 0, 0], [0, 651, -1814, 0, -13, -133, 0, 0], [-661, 0, 0, 110, 0, 0, -47, -181], [3554, 0, 0, -156, 0, 0, -200, -151], [0, -964, -1287, 0, -137, 5, 0, 0], [-330, 0, 0, 334, 0, 0, 54, 46], [0, 406, -3514, 0, 82, 72, 0, 0], [0, 88, 1280, 0, -218, 26, 0, 0], [0, 545, 1450, 0, 47, -83, 0, 0], [171, 0, 0, 992, 0, 0, 29, 63], [0, -206, 4830, 0, 49, -112, 0, 0], [0, -424, -3656, 0, -105, -60, 0, 0], [-555, 0, 0, -202, 0, 0, -15, 263], [0, 438, 1712, 0, -5, -58, 0, 0], [0, 187, 3902, 0, 105, -217, 0, 0], [-5249, 0, 0, 452, 0, 0, 95, 141], [0, 734, -1057, 0, -87, -79, 0, 0], [-1712, 0, 0, 802, 0, 0, -270, -80], [0, -420, -2796, 0, 8, -104, 0, 0], [0, 36, 3314, 0, 150, 32, 0, 0], [650, 0, 0, 1777, 0, 0, 93, 129], [0, -200, 1870, 0, -170, -310, 0, 0], [3942, 0, 0, 1049, 0, 0, -21, 153], [0, -851, -2667, 0, -74, -64, 0, 0], [-1602, 0, 0, 892, 0, 0, -140, -438], [3569, 0, 0, -348, 0, 0, -377, -154], [3954, 0, 0, -268, 0, 0, -6, -10], [-1816, 0, 0, 606, 0, 0, -70, -129], [6366, 0, 0, 200, 0, 0, 142, 116], [0, -490, 2288, 0, 277, 30, 0, 0], [5057, 0, 0, 36, 0, 0, 133, 54], [0, 604, 5067, 0, 26, 275, 0, 0], [-11052, 0, 0, 56, 0, 0, 68, 175], [0, 440, -5128, 0, 90, 78, 0, 0], [4625, 0, 0, -44, 0, 0, -195, -99], [0, -238, 1444, 0, 228, -202, 0, 0], [0, 1338, -4086, 0, -168, -84, 0, 0], [6740, 0, 0, -790, 0, 0, 22, 268], [0, 666, -4935, 0, 83, -275, 0, 0], [1661, 0, 0, -1876, 0, 0, -113, 27], [-4007, 0, 0, 612, 0, 0, 359, -67], [0, 802, 4800, 0, -441, -240, 0, 0], [-3761, 0, 0, -910, 0, 0, 385, -249], [-3364, 0, 0, 1624, 0, 0, 198, 398], [0, 574, 2838, 0, 14, -320, 0, 0], [6161, 0, 0, -82, 0, 0, -61, -109], [0, -24, -3237, 0, -28, 107, 0, 0], [0, 1566, -4342, 0, -120, 186, 0, 0], [0, -200, -3072, 0, -192, 224, 0, 0], [2062, 0, 0, -560, 0, 0, -200, 404], [-5038, 0, 0, 173, 0, 0, -7, -267], [0, -1612, 4101, 0, 443, 429, 0, 0], [0, 483, -10379, 0, -68, 400, 0, 0], [0, -64, -3546, 0, 250, -120, 0, 0], [-1974, 0, 0, -1985, 0, 0, -109, 461], [-13425, 0, 0, 228, 0, 0, 321, -150], [0, -840, 2280, 0, -48, -32, 0, 0], [0, -920, -4300, 0, -554, 102, 0, 0], [0, 511, 4002, 0, 435, -399, 0, 0], [17474, 0, 0, -282, 0, 0, -62, -279], [-21790, 0, 0, -138, 0, 0, -8, 120], [874, 0, 0, 694, 0, 0, -34, 660], [0, -1304, 12546, 0, -512, -470, 0, 0], [0, 678, -7733, 0, -485, -69, 0, 0], [0, 412, -4089, 0, -572, -199, 0, 0], [8996, 0, 0, 1136, 0, 0, 500, 120], [-12340, 0, 0, 2365, 0, 0, -547, -77], [0, -2912, -2439, 0, -305, -111, 0, 0], [0, 2048, 3830, 0, 736, -72, 0, 0], [0, 656, -7975, 0, 574, 221, 0, 0], [-4508, 0, 0, -76, 0, 0, -440, 234], [2212, 0, 0, 1346, 0, 0, -474, -11], [3396, 0, 0, -287, 0, 0, -139, -93], [-10406, 0, 0, 2044, 0, 0, 496, 457], [0, 3511, -10776, 0, -535, -559, 0, 0], [0, 836, -22780, 0, 26, 266, 0, 0], [-10369, 0, 0, 3600, 0, 0, 125, 11], [0, 150, -8898, 0, 441, 790, 0, 0], [-12118, 0, 0, -490, 0, 0, -384, 412], [0, -1410, -3900, 0, -34, 560, 0, 0], [2615, 0, 0, -1764, 0, 0, -487, -74], [3266, 0, 0, 3120, 0, 0, 684, 48], [0, 878, 8446, 0, -596, -582, 0, 0], [0, 1694, 23764, 0, 246, -58, 0, 0], [0, -3856, -264, 0, -416, -574, 0, 0], [-3764, 0, 0, -885, 0, 0, -169, 151], [14487, 0, 0, 1964, 0, 0, 141, 45], [3530, 0, 0, -1704, 0, 0, 388, -544], [0, 3202, 7309, 0, -39, 301, 0, 0], [0, 1450, 7280, 0, 662, -674, 0, 0], [-20022, 0, 0, -1152, 0, 0, -376, -320], [-2614, 0, 0, 340, 0, 0, 302, 80], [0, -152, -13296, 0, 123, 648, 0, 0], [0, -1312, -4205, 0, 621, 59, 0, 0], [3509, 0, 0, -4852, 0, 0, -465, -661], [0, -718, 12919, 0, -379, 1135, 0, 0], [0, -3755, -17472, 0, 297, -835, 0, 0], [-3944, 0, 0, 4742, 0, 0, -400, 470], [0, 796, 11314, 0, -431, 484, 0, 0], [0, 2636, -1261, 0, -649, -439, 0, 0], [0, 860, 24988, 0, -202, 500, 0, 0], [7576, 0, 0, -752, 0, 0, 284, 686], [-12666, 0, 0, 116, 0, 0, -538, 562], [-8699, 0, 0, -1356, 0, 0, -875, 47], [0, -3426, 19866, 0, -447, -140, 0, 0], [-5762, 0, 0, -1803, 0, 0, -941, 1013], [0, 1432, -5731, 0, 526, 1345, 0, 0], [0, 639, -17900, 0, -367, -581, 0, 0], [0, 746, 16717, 0, 467, 329, 0, 0], [20808, 0, 0, 2263, 0, 0, -431, 497], [0, 62, -10470, 0, -469, 872, 0, 0], [0, 913, -27860, 0, 583, -101, 0, 0], [15566, 0, 0, -4899, 0, 0, 313, 243], [0, 2384, 6910, 0, 232, 580, 0, 0], [36, 0, 0, -3508, 0, 0, 138, 140], [0, -465, -29169, 0, -534, -8, 0, 0], [21840, 0, 0, -4536, 0, 0, -760, -604], [3257, 0, 0, -370, 0, 0, 231, 1217], [10032, 0, 0, -3336, 0, 0, -76, 618], [0, -1045, -9550, 0, -745, -911, 0, 0], [18465, 0, 0, -2719, 0, 0, 274, 1402], [-16414, 0, 0, -2774, 0, 0, -998, 930], [-16031, 0, 0, -5630, 0, 0, -715, 705], [34947, 0, 0, 1014, 0, 0, -87, -363], [0, -2243, -5162, 0, -327, -315, 0, 0], [-18986, 0, 0, -2118, 0, 0, 380, -439], [0, -206, 9441, 0, -225, -635, 0, 0], [1340, 0, 0, 5651, 0, 0, 329, -91], [0, -5464, -2015, 0, -226, -149, 0, 0], [0, -4058, -5434, 0, -422, 186, 0, 0], [0, 3057, -8520, 0, 527, 15, 0, 0], [15446, 0, 0, 426, 0, 0, -892, 181], [0, 4484, -704, 0, 767, -704, 0, 0], [0, -4320, -2044, 0, -520, 348, 0, 0], [20337, 0, 0, 6489, 0, 0, 980, -286], [11114, 0, 0, -649, 0, 0, 1355, 173], [0, 2516, 13921, 0, -1479, -191, 0, 0], [0, -68, -24176, 0, 684, 648, 0, 0], [-2614, 0, 0, 5556, 0, 0, 210, 250], [-10702, 0, 0, 1202, 0, 0, 622, -1712], [0, -6918, 16154, 0, 186, 624, 0, 0], [0, -4506, -34880, 0, 305, -346, 0, 0], [2240, 0, 0, -2234, 0, 0, -1596, -60], [0, -424, 6544, 0, -98, 2242, 0, 0], [0, -5440, 12476, 0, 870, -574, 0, 0], [0, -1640, 187, 0, 789, -2319, 0, 0], [-10306, 0, 0, -6389, 0, 0, 265, 1495], [-32970, 0, 0, -3388, 0, 0, -404, -47], [0, 6997, -20489, 0, -348, -1250, 0, 0], [-7072, 0, 0, -8086, 0, 0, -144, -354], [-11192, 0, 0, 6816, 0, 0, 168, 344], [0, -4816, -38319, 0, 919, -1063, 0, 0], [-1240, 0, 0, 8774, 0, 0, 22, 648], [0, -1361, -37937, 0, -698, -542, 0, 0], [-21325, 0, 0, -272, 0, 0, 701, -850], [7721, 0, 0, 3784, 0, 0, 463, 1263], [0, -6910, -19717, 0, 811, -1351, 0, 0], [35379, 0, 0, 700, 0, 0, -33, 1717], [0, 2518, 41276, 0, 1675, 64, 0, 0], [0, -1744, 56846, 0, -840, -58, 0, 0], [9860, 0, 0, 2880, 0, 0, 2420, -1224], [-36806, 0, 0, -2902, 0, 0, -282, 1042], [0, -1790, 30255, 0, -647, -321, 0, 0], [7509, 0, 0, 936, 0, 0, 29, -333], [0, 462, -10868, 0, 1807, 768, 0, 0], [0, -1964, 7529, 0, -1105, -1023, 0, 0], [-12233, 0, 0, -1382, 0, 0, -1251, 739], [-1860, 0, 0, -442, 0, 0, -470, 576], [-10267, 0, 0, -4761, 0, 0, 1658, 64], [0, 4118, -30564, 0, 601, -300, 0, 0], [0, -2876, -69153, 0, 719, -919, 0, 0], [-3955, 0, 0, -5062, 0, 0, -845, -1463], [0, 2762, -18710, 0, -543, -4, 0, 0], [-14523, 0, 0, -308, 0, 0, 201, 1350], [0, -5954, -28920, 0, -957, 1396, 0, 0], [47220, 0, 0, 7152, 0, 0, 672, 72], [0, 6344, -348, 0, 967, 996, 0, 0], [3036, 0, 0, 427, 0, 0, 1321, -1419], [-7678, 0, 0, -808, 0, 0, 798, 1262], [-17624, 0, 0, 3059, 0, 0, 431, -1285], [0, -8356, 35208, 0, -382, 72, 0, 0], [0, -4216, 10622, 0, -390, 698, 0, 0], [10296, 0, 0, 6806, 0, 0, 560, -128], [0, -1874, 37096, 0, 1300, 940, 0, 0], [53077, 0, 0, -3596, 0, 0, -1697, -629], [-1061, 0, 0, 6193, 0, 0, -616, 1648], [0, -3724, -51996, 0, -30, -284, 0, 0], [44787, 0, 0, 1366, 0, 0, -2041, 155], [0, -8542, -25775, 0, -2387, -39, 0, 0], [-44451, 0, 0, 108, 0, 0, -2019, -167], [0, -490, 36662, 0, 1226, 286, 0, 0], [58155, 0, 0, 6164, 0, 0, 871, -966], [0, -588, 7831, 0, -1011, -295, 0, 0], [-27800, 0, 0, -5646, 0, 0, 0, -1733], [41564, 0, 0, 2681, 0, 0, 1347, -337], [0, -1421, -18368, 0, -2375, 309, 0, 0], [0, -2836, -27812, 0, -1604, -230, 0, 0], [-9950, 0, 0, 260, 0, 0, 320, -1258], [0, -782, -30376, 0, -1013, 504, 0, 0], [-19114, 0, 0, -1662, 0, 0, 994, 728], [0, -1584, -86690, 0, 844, -992, 0, 0], [18627, 0, 0, 5418, 0, 0, 1135, -867], [41878, 0, 0, -3193, 0, 0, 1089, -737], [0, -4826, 46298, 0, 80, 592, 0, 0], [0, -4632, -14849, 0, -642, 29, 0, 0], [0, -6820, -57195, 0, 1923, -2435, 0, 0], [0, 4523, 41210, 0, -1177, 699, 0, 0], [0, -4506, 41150, 0, -1174, -3280, 0, 0], [14258, 0, 0, 6058, 0, 0, -222, -992], [0, 5526, 26594, 0, 1326, -1294, 0, 0], [0, 5420, -17306, 0, -1700, 1260, 0, 0], [-21186, 0, 0, -141, 0, 0, 919, 139], [9350, 0, 0, -13693, 0, 0, -1263, -2309], [-4374, 0, 0, -14180, 0, 0, -2068, -1432], [0, -1570, 7332, 0, -2294, 630, 0, 0], [0, 3816, 4981, 0, 972, -949, 0, 0], [-51511, 0, 0, 12534, 0, 0, -169, -539], [0, 1452, -48886, 0, -650, -2110, 0, 0], [0, -1102, 72336, 0, 767, -626, 0, 0], [8258, 0, 0, -5988, 0, 0, 1194, -1470], [0, 5628, -3855, 0, -2377, 1737, 0, 0], [0, -1546, 42917, 0, -1241, -2339, 0, 0], [0, 5233, 46978, 0, -201, -1563, 0, 0], [-6282, 0, 0, -482, 0, 0, 1926, 2310], [-34442, 0, 0, 7384, 0, 0, 236, -1852], [-28402, 0, 0, 5906, 0, 0, -6, 341], [0, 6520, -47729, 0, 1035, 1497, 0, 0], [-25390, 0, 0, 1684, 0, 0, 394, -1798], [0, -2057, 92686, 0, 927, 1259, 0, 0], [-53766, 0, 0, -1672, 0, 0, 1024, -2940], [0, -1224, 47346, 0, -1957, -932, 0, 0], [82178, 0, 0, 467, 0, 0, -1193, -1611], [0, 12928, 50794, 0, -988, 3128, 0, 0], [0, -6320, -39860, 0, 1076, -2282, 0, 0], [36174, 0, 0, 4663, 0, 0, -1529, 2997], [24316, 0, 0, -11649, 0, 0, 2299, 2483], [-6590, 0, 0, 500, 0, 0, -2308, -440], [0, -13214, -31180, 0, 626, -2502, 0, 0], [0, -3080, 36550, 0, -886, -1112, 0, 0], [-70234, 0, 0, 11758, 0, 0, -94, -21], [0, 6709, 45953, 0, -3434, -208, 0, 0], [-61484, 0, 0, 5155, 0, 0, -1085, 1789], [-14936, 0, 0, -2600, 0, 0, -444, 2182], [0, -10007, -73917, 0, -984, -398, 0, 0], [-19265, 0, 0, -15934, 0, 0, -2793, 883], [0, 9931, -2485, 0, 782, 962, 0, 0], [0, -8962, 7884, 0, 271, 2302, 0, 0], [0, 7438, -62492, 0, 768, 2396, 0, 0], [-100204, 0, 0, -1254, 0, 0, 1098, -1382]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1150_b_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1150_4_b_n();".
// 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_1150_4_b_n(:prec:=8)
    chi := MakeCharacter_1150_b();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 4));
    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_1150_4_b_n();".
// 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_1150_4_b_n( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1150_b();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<3,R![26896, 0, 79385, 0, 6116, 0, 140, 0, 1]>,<7,R![205811024896, 0, 1374197220, 0, 3173141, 0, 3015, 0, 1]>],Snew);
    return Vf;
end function;