
// Make newform 1350.3.k.a in Magma, downloaded from the LMFDB on 20 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1350_k();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1350_k_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_1350_3_k_a();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1350_3_k_a();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [1, 0, 0, 0, -1, 0, 0, 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, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 1], [0, 1, 0, 0, 0, 0, 0, -1], [0, 0, 0, 1, 0, 1, 0, -1], [0, 1, 0, 1, 0, -1, 0, 0]];
    Rf_basisdens := [1, 1, 1, 1, 1, 1, 1, 1];
    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_1350_k();"
function MakeCharacter_1350_k()
    N := 1350;
    order := 6;
    char_gens := [1001, 1027];
    v := [5, 3];
    // 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_1350_k_Hecke();"
function MakeCharacter_1350_k_Hecke(Kf)
    N := 1350;
    order := 6;
    char_gens := [1001, 1027];
    char_values := [[0, 0, 1, 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 := 3;
    raw_aps := [[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, 1, 0, 0, 3, 0, 0, 3], [-3, 0, -3, 0, 0, 0, 3, 0], [0, -5, 0, 5, -6, 0, 0, 12], [0, -12, 0, 6, 0, 0, 0, -6], [10, 0, 0, 0, 0, 6, 6, 0], [0, 3, 0, 3, -3, 0, 0, 0], [3, 0, 3, 0, 0, 0, 6, 0], [0, 0, 19, 0, 0, 9, -18, 0], [0, 0, 0, 32, 12, 0, 0, -6], [42, 0, -21, 0, 0, -18, 0, 0], [0, 23, 0, 0, 9, 0, 0, 9], [0, 9, 0, -18, -21, 0, 0, 21], [0, 60, 0, -30, 0, 0, 0, 30], [42, 0, -21, 0, 0, -39, 0, 0], [31, 0, -31, 0, 0, -36, 18, 0], [0, 53, 0, -53, -9, 0, 0, 18], [30, 0, -60, 0, 0, -24, 24, 0], [0, 0, 0, 52, -36, 0, 0, 18], [-7, 0, 7, 0, 0, -30, 15, 0], [0, 63, 0, -126, -15, 0, 0, 15], [-30, 0, 60, 0, 0, -66, 66, 0], [0, 7, 0, 0, 42, 0, 0, 42], [3, 0, 3, 0, 0, 0, -108, 0], [0, 37, 0, -37, -27, 0, 0, 54], [0, 120, 0, -60, 0, 0, 0, -48], [16, 0, 0, 0, 0, 54, 54, 0], [0, 9, 0, 9, -132, 0, 0, 0], [0, 0, 0, -34, -36, 0, 0, 18], [-138, 0, 69, 0, 0, -81, 0, 0], [0, 111, 0, -222, 30, 0, 0, -30], [0, 0, 11, 0, 0, 39, -78, 0], [6, 0, -3, 0, 0, 78, 0, 0], [175, 0, -175, 0, 0, -90, 45, 0], [0, -109, 0, 109, -36, 0, 0, 72], [0, 0, 0, 58, -156, 0, 0, 78], [0, 99, 0, 99, 87, 0, 0, 0], [0, -9, 0, 18, -60, 0, 0, 60], [-96, 0, 192, 0, 0, 84, -84, 0], [140, 0, 0, 0, 0, 42, 42, 0], [3, 0, 3, 0, 0, 0, -9, 0], [0, -125, 0, 125, 90, 0, 0, -180], [0, -48, 0, 24, 0, 0, 0, 84], [-80, 0, 0, 0, 0, -30, -30, 0], [0, 0, 103, 0, 0, 21, -42, 0], [0, 203, 0, 0, 45, 0, 0, 45], [0, 27, 0, -54, 87, 0, 0, -87], [0, 0, 143, 0, 0, 108, -216, 0], [0, 96, 0, -48, 0, 0, 0, 48], [-18, 0, 9, 0, 0, -51, 0, 0], [-143, 0, 143, 0, 0, -48, 24, 0], [-48, 0, 96, 0, 0, 96, -96, 0], [0, 27, 0, 27, 24, 0, 0, 0], [0, -231, 0, 462, 45, 0, 0, -45], [30, 0, -60, 0, 0, -6, 6, 0], [-34, 0, 0, 0, 0, -126, -126, 0], [0, 49, 0, 0, 0, 0, 0, 0], [105, 0, 105, 0, 0, 0, -114, 0], [0, 145, 0, -145, 81, 0, 0, -162], [0, -87, 0, -87, 96, 0, 0, 0], [0, 0, 0, 110, -36, 0, 0, 18], [186, 0, -93, 0, 0, 63, 0, 0], [0, -397, 0, 0, -12, 0, 0, -12], [0, -165, 0, 330, 126, 0, 0, -126], [-245, 0, 245, 0, 0, -186, 93, 0], [0, 335, 0, -335, 12, 0, 0, -24], [0, -207, 0, -207, 159, 0, 0, 0], [107, 0, -107, 0, 0, -168, 84, 0], [0, 105, 0, -210, -102, 0, 0, 102], [36, 0, -72, 0, 0, 252, -252, 0], [0, -77, 0, 0, -45, 0, 0, -45], [0, -113, 0, 113, 138, 0, 0, -276], [328, 0, 0, 0, 0, 66, 66, 0], [0, -183, 0, -183, 297, 0, 0, 0], [-39, 0, -39, 0, 0, 0, 72, 0], [0, 0, 0, -124, 108, 0, 0, -54], [-390, 0, 195, 0, 0, -54, 0, 0], [0, 0, -385, 0, 0, -24, 48, 0], [-306, 0, 153, 0, 0, -195, 0, 0], [-269, 0, 269, 0, 0, -12, 6, 0], [-276, 0, 552, 0, 0, 156, -156, 0], [0, 0, 0, -344, -108, 0, 0, 54], [-139, 0, 139, 0, 0, -342, 171, 0], [0, -81, 0, 162, 489, 0, 0, -489], [-54, 0, 108, 0, 0, -450, 450, 0], [0, -401, 0, 0, -126, 0, 0, -126], [69, 0, 69, 0, 0, 0, -78, 0], [0, 283, 0, -283, 93, 0, 0, -186], [0, 120, 0, -60, 0, 0, 0, -516], [279, 0, 279, 0, 0, 0, -123, 0], [0, 0, 0, -190, 132, 0, 0, -66], [-690, 0, 345, 0, 0, -249, 0, 0], [0, 0, 35, 0, 0, 243, -486, 0], [0, 684, 0, -342, 0, 0, 0, 216], [390, 0, -195, 0, 0, -378, 0, 0], [-168, 0, 336, 0, 0, -60, 60, 0], [0, 0, 0, -488, 324, 0, 0, -162], [-274, 0, 0, 0, 0, 96, 96, 0], [0, -41, 0, 0, 207, 0, 0, 207], [0, 636, 0, -318, 0, 0, 0, 102], [0, -333, 0, -333, 21, 0, 0, 0], [-3, 0, -3, 0, 0, 0, 180, 0], [0, 0, 7, 0, 0, 33, -66, 0], [0, 0, 0, -88, 36, 0, 0, -18], [0, -291, 0, 582, -45, 0, 0, 45], [0, 156, 0, -78, 0, 0, 0, 150], [-966, 0, 483, 0, 0, 33, 0, 0], [751, 0, -751, 0, 0, -36, 18, 0], [0, -745, 0, 745, 183, 0, 0, -366], [0, 0, 0, -56, -468, 0, 0, 234], [0, 21, 0, 21, -162, 0, 0, 0], [-175, 0, 175, 0, 0, 18, -9, 0], [-58, 0, 0, 0, 0, 42, 42, 0], [159, 0, 159, 0, 0, 0, -24, 0], [0, -593, 0, 593, 81, 0, 0, -162], [0, -72, 0, 36, 0, 0, 0, 252], [0, -375, 0, -375, -84, 0, 0, 0], [-21, 0, -21, 0, 0, 0, -279, 0], [0, 0, -395, 0, 0, 252, -504, 0], [0, 137, 0, 0, 174, 0, 0, 174], [0, 33, 0, -66, 288, 0, 0, -288], [0, 360, 0, -180, 0, 0, 0, -576], [-707, 0, 707, 0, 0, 270, -135, 0], [366, 0, -732, 0, 0, -102, 102, 0], [-349, 0, 349, 0, 0, 672, -336, 0], [180, 0, -360, 0, 0, -144, 144, 0], [0, 643, 0, 0, -81, 0, 0, -81], [0, 55, 0, -55, -270, 0, 0, 540], [-272, 0, 0, 0, 0, -270, -270, 0], [0, 297, 0, 297, -375, 0, 0, 0], [0, 0, 241, 0, 0, 429, -858, 0], [0, 0, 0, 866, -144, 0, 0, 72], [738, 0, -369, 0, 0, 222, 0, 0], [0, 0, -157, 0, 0, 204, -408, 0], [0, 468, 0, -234, 0, 0, 0, -90], [0, 359, 0, -359, -189, 0, 0, 378], [0, -63, 0, -63, -858, 0, 0, 0], [6, 0, -12, 0, 0, -174, 174, 0], [74, 0, 0, 0, 0, -270, -270, 0], [-87, 0, -87, 0, 0, 0, 774, 0], [0, 1579, 0, -1579, -15, 0, 0, 30], [0, 888, 0, -444, 0, 0, 0, -132], [-980, 0, 0, 0, 0, 42, 42, 0], [-27, 0, -27, 0, 0, 0, -771, 0], [0, 77, 0, 0, -162, 0, 0, -162], [0, 495, 0, -990, 42, 0, 0, -42], [0, 0, 245, 0, 0, 291, -582, 0], [0, 1056, 0, -528, 0, 0, 0, 276], [0, 317, 0, -317, 282, 0, 0, -564], [510, 0, -1020, 0, 0, -462, 462, 0], [0, 0, 0, 838, 444, 0, 0, -222], [0, -87, 0, -87, -513, 0, 0, 0], [0, -335, 0, 0, -345, 0, 0, -345], [-99, 0, -99, 0, 0, 0, -777, 0], [-38, 0, 0, 0, 0, -522, -522, 0], [279, 0, 279, 0, 0, 0, 102, 0], [0, 0, 0, 896, -348, 0, 0, 174], [-330, 0, 165, 0, 0, -456, 0, 0], [0, -225, 0, 450, -273, 0, 0, 273], [0, 684, 0, -342, 0, 0, 0, 90], [0, 629, 0, -629, 243, 0, 0, -486], [90, 0, -180, 0, 0, 576, -576, 0], [0, 15, 0, 15, 1092, 0, 0, 0], [0, -15, 0, 30, -567, 0, 0, 567], [650, 0, 0, 0, 0, 90, 90, 0], [0, -275, 0, 0, -396, 0, 0, -396], [1204, 0, 0, 0, 0, 162, 162, 0], [0, -489, 0, -489, 270, 0, 0, 0], [-519, 0, -519, 0, 0, 0, 213, 0], [0, 0, 307, 0, 0, 270, -540, 0], [258, 0, -129, 0, 0, -369, 0, 0], [0, 89, 0, 0, -498, 0, 0, -498], [0, 0, -769, 0, 0, -489, 978, 0], [546, 0, -273, 0, 0, -12, 0, 0], [1453, 0, -1453, 0, 0, -162, 81, 0], [18, 0, -36, 0, 0, 810, -810, 0], [0, 0, 0, -818, 84, 0, 0, -42], [599, 0, -599, 0, 0, 864, -432, 0], [0, -467, 0, 0, -357, 0, 0, -357], [-141, 0, -141, 0, 0, 0, 171, 0], [0, -215, 0, 215, -540, 0, 0, 1080], [0, -900, 0, 450, 0, 0, 0, 486], [0, 429, 0, 429, 405, 0, 0, 0], [447, 0, 447, 0, 0, 0, 918, 0], [0, 0, 0, -574, 288, 0, 0, -144], [0, 251, 0, 0, 249, 0, 0, 249], [0, 0, 635, 0, 0, -552, 1104, 0], [-204, 0, 408, 0, 0, -1176, 1176, 0], [0, 0, 0, 1144, -204, 0, 0, 102], [0, -243, 0, 486, -555, 0, 0, 555], [230, 0, 0, 0, 0, 150, 150, 0], [219, 0, 219, 0, 0, 0, 396, 0], [0, -336, 0, 168, 0, 0, 0, -636], [0, -735, 0, -735, 204, 0, 0, 0], [0, 0, -1157, 0, 0, -6, 12, 0], [0, -61, 0, 0, -60, 0, 0, -60], [0, -219, 0, 438, 360, 0, 0, -360], [0, 120, 0, -60, 0, 0, 0, -336], [1242, 0, -621, 0, 0, -204, 0, 0], [-875, 0, 875, 0, 0, 1038, -519, 0], [0, -553, 0, 553, 240, 0, 0, -480], [-517, 0, 517, 0, 0, 144, -72, 0], [-276, 0, 552, 0, 0, -420, 420, 0], [0, -156, 0, 78, 0, 0, 0, -834], [-1430, 0, 0, 0, 0, -138, -138, 0], [0, -471, 0, -471, 405, 0, 0, 0], [-471, 0, -471, 0, 0, 0, 0, 0], [0, 0, 97, 0, 0, -327, 654, 0], [0, 0, 0, -148, -708, 0, 0, 354], [-942, 0, 471, 0, 0, -366, 0, 0], [0, -193, 0, 0, -63, 0, 0, -63], [0, 555, 0, -1110, -225, 0, 0, 225], [378, 0, -189, 0, 0, -1095, 0, 0], [-923, 0, 923, 0, 0, 864, -432, 0], [0, 161, 0, -161, 279, 0, 0, -558], [909, 0, 909, 0, 0, 0, 762, 0], [0, -24, 0, 12, 0, 0, 0, 996], [0, 723, 0, 723, 618, 0, 0, 0], [0, 0, 715, 0, 0, -150, 300, 0], [0, 0, 395, 0, 0, -297, 594, 0], [2910, 0, -1455, 0, 0, -54, 0, 0], [0, 0, 0, 214, 1980, 0, 0, -990], [0, -441, 0, -441, 15, 0, 0, 0], [731, 0, -731, 0, 0, 888, -444, 0], [0, -657, 0, 1314, 264, 0, 0, -264], [84, 0, -168, 0, 0, 1164, -1164, 0], [0, -161, 0, 0, -429, 0, 0, -429], [-831, 0, -831, 0, 0, 0, 3, 0], [0, -1343, 0, 1343, 96, 0, 0, -192], [214, 0, 0, 0, 0, -558, -558, 0], [0, 0, 1351, 0, 0, -495, 990, 0], [1014, 0, -507, 0, 0, 396, 0, 0], [0, -379, 0, 0, -543, 0, 0, -543], [0, -51, 0, 102, 903, 0, 0, -903], [0, 0, 5, 0, 0, -390, 780, 0], [0, -900, 0, 450, 0, 0, 0, 738], [-1926, 0, 963, 0, 0, -447, 0, 0], [168, 0, -336, 0, 0, 888, -888, 0], [0, -861, 0, 1722, 765, 0, 0, -765], [-286, 0, 0, 0, 0, 306, 306, 0], [0, -251, 0, 251, 873, 0, 0, -1746], [-236, 0, 0, 0, 0, -198, -198, 0], [0, 435, 0, 435, -786, 0, 0, 0], [381, 0, 381, 0, 0, 0, -399, 0], [0, 0, 0, -730, 1788, 0, 0, -894], [2346, 0, -1173, 0, 0, -441, 0, 0], [0, 0, 1925, 0, 0, -153, 306, 0], [0, -2016, 0, 1008, 0, 0, 0, -972], [0, 233, 0, -233, 90, 0, 0, -180], [90, 0, -180, 0, 0, -1242, 1242, 0], [0, -975, 0, -975, -357, 0, 0, 0], [-301, 0, 301, 0, 0, 1512, -756, 0], [0, 855, 0, -1710, -852, 0, 0, 852], [726, 0, -1452, 0, 0, -624, 624, 0], [-1528, 0, 0, 0, 0, 162, 162, 0], [0, -689, 0, 0, 891, 0, 0, 891], [0, -1584, 0, 792, 0, 0, 0, 324], [0, 0, 0, -2248, -108, 0, 0, 54], [0, -2599, 0, 0, 129, 0, 0, 129], [0, -27, 0, 54, 1527, 0, 0, -1527], [0, 0, -1621, 0, 0, 396, -792, 0], [0, 0, 0, 724, 1500, 0, 0, -750], [0, -15, 0, -15, 522, 0, 0, 0], [-319, 0, 319, 0, 0, 1602, -801, 0], [-822, 0, 1644, 0, 0, 510, -510, 0], [495, 0, 495, 0, 0, 0, -804, 0], [0, 199, 0, -199, -423, 0, 0, 846], [0, 783, 0, 783, 66, 0, 0, 0], [0, 0, -1037, 0, 0, 870, -1740, 0], [0, 0, 0, 1058, -1356, 0, 0, 678], [0, 203, 0, 0, -468, 0, 0, -468], [0, 0, 791, 0, 0, 819, -1638, 0], [0, -1675, 0, 1675, -450, 0, 0, 900], [0, 0, 0, 358, 1044, 0, 0, -522], [0, 1119, 0, 1119, 387, 0, 0, 0], [-427, 0, 427, 0, 0, -1908, 954, 0], [560, 0, 0, 0, 0, -450, -450, 0], [129, 0, 129, 0, 0, 0, -1161, 0], [0, -1551, 0, -1551, 585, 0, 0, 0], [0, 0, 2161, 0, 0, -351, 702, 0], [0, -789, 0, 1578, -969, 0, 0, 969], [-707, 0, 707, 0, 0, 720, -360, 0], [0, 1583, 0, -1583, 207, 0, 0, -414], [-450, 0, 900, 0, 0, -144, 144, 0], [0, 0, 0, -332, 1740, 0, 0, -870], [0, 1527, 0, 1527, 408, 0, 0, 0], [-2569, 0, 2569, 0, 0, -630, 315, 0], [576, 0, -1152, 0, 0, -288, 288, 0], [-1251, 0, -1251, 0, 0, 0, 618, 0], [0, 84, 0, -42, 0, 0, 0, 1104], [0, 93, 0, 93, -156, 0, 0, 0], [1386, 0, -693, 0, 0, 879, 0, 0], [0, -1417, 0, 0, -108, 0, 0, -108], [1194, 0, -597, 0, 0, -588, 0, 0], [2887, 0, -2887, 0, 0, -546, 273, 0], [0, -231, 0, 462, -810, 0, 0, 810], [-108, 0, 216, 0, 0, 504, -504, 0], [0, -1055, 0, 0, 87, 0, 0, 87], [0, 373, 0, -373, 480, 0, 0, -960], [0, 1044, 0, -522, 0, 0, 0, -738], [2770, 0, 0, 0, 0, 90, 90, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1350_k_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1350_3_k_a();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_1350_3_k_a(:prec:=8)
    chi := MakeCharacter_1350_k();
    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_1350_3_k_a();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function MakeNewformModSym_1350_3_k_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1350_k();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<7,R![7890481, 0, -308990, 0, 9291, 0, -110, 0, 1]>],Snew);
    return Vf;
end function;