
// Make newform 1728.3.g.n in Magma, downloaded from the LMFDB on 20 February 2026.
// To make the character of type GrpDrchElt, type "MakeCharacter_1728_g();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1728_g_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_1728_3_g_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_1728_3_g_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 := [16, -32, 20, 4, -11, 2, 5, -4, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0], [20, 8, -16, 9, 6, -7, 0, 1], [-32, 52, -20, -15, 18, 1, -12, 5], [-90, 120, -33, -45, 33, 9, -21, 9], [48, -62, 15, 24, -17, -6, 11, -4], [-288, 332, -48, -129, 74, 39, -56, 19], [-484, 644, -178, -235, 172, 57, -114, 45], [146, -184, 41, 75, -45, -19, 33, -11]];
    Rf_basisdens := [1, 2, 4, 2, 1, 4, 4, 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_1728_g();"
function MakeCharacter_1728_g()
    N := 1728;
    order := 2;
    char_gens := [703, 325, 1217];
    v := [1, 2, 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_1728_g_Hecke();"
function MakeCharacter_1728_g_Hecke( : Kf := false)
    N := 1728;
    order := 2;
    char_gens := [703, 325, 1217];
    char_values := [[-1, 0, 0, 0, 0, 0, 0, 0], [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 := ISA(Type(Kf), Fld), 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]];
    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, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [1, 0, -1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 1, 1, 1, 0], [2, -1, 0, 0, 0, 0, 0, 0], [-6, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, -3, 0, -1, 1, 0], [0, 0, 0, -1, -2, -1, 3, 0], [-4, 0, 0, 0, 0, 0, 0, -1], [0, 0, 0, 5, -1, -1, -2, 0], [12, -1, -4, 0, 0, 0, 0, 2], [16, -1, -2, 0, 0, 0, 0, -2], [0, 0, 0, -4, 0, 4, -2, 0], [0, 0, 0, 2, 2, 4, -4, 0], [21, 4, -1, 0, 0, 0, 0, -1], [0, 0, 0, -6, 4, -6, 2, 0], [-4, -4, 12, 0, 0, 0, 0, 2], [0, 0, 0, -12, -2, -4, -2, 0], [0, 0, 0, 3, 14, 1, -3, 0], [3, 6, -6, 0, 0, 0, 0, -1], [0, 0, 0, 9, -13, -5, 3, 0], [0, 0, 0, 10, 3, 3, -13, 0], [-78, 4, -10, 0, 0, 0, 0, -4], [-17, 6, 4, 0, 0, 0, 0, -2], [1, 6, -17, 0, 0, 0, 0, -3], [0, 0, 0, 7, 9, 5, 9, 0], [0, 0, 0, -3, -18, 4, -4, 0], [-24, 3, 8, 0, 0, 0, 0, 4], [80, 11, -10, 0, 0, 0, 0, -2], [0, 0, 0, -4, 10, -12, 7, 0], [0, 0, 0, -1, 28, -2, 22, 0], [-2, 2, 6, 0, 0, 0, 0, -8], [0, 0, 0, 0, 18, 16, 12, 0], [-109, 8, -7, 0, 0, 0, 0, -5], [0, 0, 0, 15, -21, 13, -20, 0], [16, 2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 13, 20, -1, -9, 0], [0, 0, 0, 10, -28, 8, 8, 0], [-83, 8, 11, 0, 0, 0, 0, -6], [0, 0, 0, 15, -54, -4, 4, 0], [12, -8, 28, 0, 0, 0, 0, -6], [0, 0, 0, -21, 8, 13, 17, 0], [67, 0, -10, 0, 0, 0, 0, 9], [155, 6, 9, 0, 0, 0, 0, -6], [0, 0, 0, -20, 42, 4, 3, 0], [0, 0, 0, 21, 2, -9, -23, 0], [0, 0, 0, -31, -51, 3, 19, 0], [0, 0, 0, 8, 2, -20, 20, 0], [10, 6, -40, 0, 0, 0, 0, -4], [-166, 4, -42, 0, 0, 0, 0, -2], [0, 0, 0, -15, -44, 1, -11, 0], [50, -2, -16, 0, 0, 0, 0, 8], [0, 0, 0, -34, -50, -6, 10, 0], [74, -13, 20, 0, 0, 0, 0, -12], [0, 0, 0, 13, -6, -15, -19, 0], [168, 14, -32, 0, 0, 0, 0, 3], [0, 0, 0, -7, 51, 11, -8, 0], [-20, 2, 16, 0, 0, 0, 0, -8], [58, 11, 28, 0, 0, 0, 0, 6], [0, 0, 0, 23, -20, -35, 19, 0], [-164, -14, 4, 0, 0, 0, 0, -5], [0, 0, 0, -7, 62, -13, 39, 0], [0, 0, 0, 63, -12, 15, -5, 0], [-25, -2, 18, 0, 0, 0, 0, 11], [5, -2, 43, 0, 0, 0, 0, 1], [0, 0, 0, 30, -68, 26, -36, 0], [38, -6, 56, 0, 0, 0, 0, 4], [0, 0, 0, -36, 47, 11, 11, 0], [-44, 13, 60, 0, 0, 0, 0, 2], [28, -29, -22, 0, 0, 0, 0, -6], [0, 0, 0, 4, 48, -2, 38, 0], [0, 0, 0, -7, -77, 11, 22, 0], [-202, 5, 4, 0, 0, 0, 0, -10], [0, 0, 0, -6, 14, -50, -6, 0], [0, 0, 0, -25, -4, 37, -39, 0], [-161, 4, -19, 0, 0, 0, 0, 9], [-222, -3, 44, 0, 0, 0, 0, 2], [232, -12, -24, 0, 0, 0, 0, 18], [-181, 24, -8, 0, 0, 0, 0, 4], [0, 0, 0, 58, -46, -6, 10, 0], [-88, -2, 4, 0, 0, 0, 0, 6], [0, 0, 0, -24, -14, 34, 18, 0], [-231, 30, 24, 0, 0, 0, 0, 12], [0, 0, 0, 26, -126, -18, -7, 0], [0, 0, 0, -78, -6, -38, 10, 0], [-96, -29, 14, 0, 0, 0, 0, 4], [-29, 26, -68, 0, 0, 0, 0, -6], [35, -12, 57, 0, 0, 0, 0, 21], [0, 0, 0, -33, 45, 13, 30, 0], [0, 0, 0, 34, -3, -13, 43, 0], [0, 0, 0, -66, 66, 40, 16, 0], [0, 0, 0, 49, 27, -29, -13, 0], [0, 0, 0, -47, 24, 38, 14, 0], [0, 0, 0, -66, 0, -6, 28, 0], [0, 0, 0, 105, -28, -15, -27, 0], [-37, -16, 45, 0, 0, 0, 0, 6], [226, -37, -20, 0, 0, 0, 0, 12], [0, 0, 0, -15, 110, 27, 15, 0], [-160, -22, 8, 0, 0, 0, 0, 28], [0, 0, 0, -61, -88, 17, 61, 0], [-9, -44, -19, 0, 0, 0, 0, -5], [0, 0, 0, 22, -47, -67, 13, 0], [-4, -18, 40, 0, 0, 0, 0, 14], [0, 0, 0, -67, -34, -33, -41, 0], [-222, 22, -80, 0, 0, 0, 0, -8], [0, 0, 0, -29, -48, 26, -30, 0], [498, -4, 110, 0, 0, 0, 0, 14], [0, 0, 0, 124, -4, -38, -30, 0], [-119, 26, -2, 0, 0, 0, 0, -27], [0, 0, 0, 115, 5, 41, -7, 0], [234, -16, 84, 0, 0, 0, 0, -10], [-260, -23, 78, 0, 0, 0, 0, -4], [0, 0, 0, -47, -14, 27, 11, 0], [0, 0, 0, 44, 88, 4, 21, 0], [-328, 1, 18, 0, 0, 0, 0, 24], [0, 0, 0, 0, 64, 0, -12, 0], [0, 0, 0, 50, -104, 70, -66, 0], [109, 4, 19, 0, 0, 0, 0, 18], [0, 0, 0, 47, 108, 16, 48, 0], [-416, -11, -8, 0, 0, 0, 0, 12], [181, -4, 0, 0, 0, 0, 0, 24], [52, 12, 8, 0, 0, 0, 0, 1], [0, 0, 0, -86, 82, -38, -6, 0], [0, 0, 0, -96, -88, -32, -60, 0], [-801, -32, 49, 0, 0, 0, 0, 8], [-248, -36, 68, 0, 0, 0, 0, -10], [0, 0, 0, -42, 34, 54, 70, 0], [0, 0, 0, 16, 22, 16, 65, 0], [344, 41, -76, 0, 0, 0, 0, 6], [0, 0, 0, 9, 52, -13, -81, 0], [0, 0, 0, -75, 196, -29, 47, 0], [0, 0, 0, 65, 1, -45, -18, 0], [454, 6, -32, 0, 0, 0, 0, -8], [4, -42, -56, 0, 0, 0, 0, 4], [227, 44, 50, 0, 0, 0, 0, 11], [-432, 58, 16, 0, 0, 0, 0, 15], [0, 0, 0, -24, -40, -40, 88, 0], [821, -2, -41, 0, 0, 0, 0, -12], [630, 28, -14, 0, 0, 0, 0, -8], [0, 0, 0, -89, 28, 45, 127, 0], [-160, -6, 48, 0, 0, 0, 0, 19], [0, 0, 0, -113, 1, 29, -60, 0], [0, 0, 0, -68, 76, 36, 52, 0], [-726, 34, 36, 0, 0, 0, 0, -18], [0, 0, 0, -19, -12, 23, -13, 0], [-130, 86, 68, 0, 0, 0, 0, -2], [-590, 11, -28, 0, 0, 0, 0, -34], [0, 0, 0, -2, 84, 10, 10, 0], [0, 0, 0, -42, -266, 14, -82, 0], [506, 16, 32, 0, 0, 0, 0, 8], [42, -23, 168, 0, 0, 0, 0, -6], [0, 0, 0, 143, -24, -59, 95, 0], [0, 0, 0, 123, -36, -59, 57, 0], [0, 0, 0, 121, 54, 67, -83, 0], [0, 0, 0, 2, 100, -12, 36, 0], [0, 0, 0, 21, -55, 79, -14, 0], [436, 22, 80, 0, 0, 0, 0, -30], [279, 38, 172, 0, 0, 0, 0, -6], [-101, 2, 29, 0, 0, 0, 0, -11], [0, 0, 0, 53, -42, 10, -6, 0], [192, 42, 116, 0, 0, 0, 0, -12], [0, 0, 0, -91, 155, 95, -8, 0], [0, 0, 0, 20, 261, 53, -27, 0], [-118, 28, -162, 0, 0, 0, 0, -40], [0, 0, 0, 82, -34, -52, 116, 0], [0, 0, 0, -20, 24, 20, 1, 0], [-506, 39, -20, 0, 0, 0, 0, -14], [-585, -26, 56, 0, 0, 0, 0, 36], [620, 12, 0, 0, 0, 0, 0, -43], [0, 0, 0, -47, 44, 70, -18, 0], [290, 10, 56, 0, 0, 0, 0, 12], [0, 0, 0, -52, 30, 82, -78, 0], [-26, -50, 40, 0, 0, 0, 0, 52], [0, 0, 0, -103, -71, 43, 110, 0], [8, 47, -42, 0, 0, 0, 0, -22], [0, 0, 0, 7, 256, 45, 135, 0], [9, -66, -125, 0, 0, 0, 0, -32], [0, 0, 0, -153, -51, -43, -26, 0], [22, -81, 112, 0, 0, 0, 0, -24], [0, 0, 0, 29, -31, -57, -102, 0], [0, 0, 0, -122, 91, -93, 99, 0], [-152, 51, -108, 0, 0, 0, 0, -58], [-204, 62, -160, 0, 0, 0, 0, -38], [0, 0, 0, 65, -74, -25, -5, 0], [-577, 46, 129, 0, 0, 0, 0, -51], [-728, 11, 52, 0, 0, 0, 0, 6], [0, 0, 0, 223, 36, 5, 81, 0], [-475, -24, -66, 0, 0, 0, 0, -11], [0, 0, 0, -63, 136, 29, 17, 0], [-666, -78, -16, 0, 0, 0, 0, 16], [0, 0, 0, 1, -110, -42, 86, 0], [0, 0, 0, -164, -54, -12, 114, 0], [637, 64, -21, 0, 0, 0, 0, 10], [0, 0, 0, 16, 188, 28, 124, 0], [620, 52, -36, 0, 0, 0, 0, -24], [589, 26, -78, 0, 0, 0, 0, -37], [670, 16, -192, 0, 0, 0, 0, -8], [-352, 104, 104, 0, 0, 0, 0, -10], [0, 0, 0, -240, 26, 4, 76, 0], [727, 86, -15, 0, 0, 0, 0, -17], [0, 0, 0, 118, 170, -14, 53, 0], [-1046, -69, -4, 0, 0, 0, 0, 10], [-97, -30, 166, 0, 0, 0, 0, -31], [0, 0, 0, 14, -205, 77, -27, 0], [240, 10, 32, 0, 0, 0, 0, -77], [0, 0, 0, 83, -151, -87, 53, 0], [0, 0, 0, -78, 57, 139, 99, 0], [26, 66, -102, 0, 0, 0, 0, -4], [0, 0, 0, -171, -38, -121, 51, 0], [-657, 22, -166, 0, 0, 0, 0, -25], [-268, -70, -44, 0, 0, 0, 0, 9], [0, 0, 0, -203, 77, 47, 76, 0], [0, 0, 0, 33, 134, -30, 66, 0], [0, 0, 0, -236, -210, 20, 108, 0], [-307, 46, -4, 0, 0, 0, 0, -62], [0, 0, 0, 163, -125, -23, -95, 0], [118, -22, 182, 0, 0, 0, 0, -10], [0, 0, 0, 174, 206, -20, -44, 0], [-652, 4, 8, 0, 0, 0, 0, -3], [-232, -115, 176, 0, 0, 0, 0, 48], [0, 0, 0, 243, 53, 9, 13, 0], [796, 4, 180, 0, 0, 0, 0, 2], [0, 0, 0, 115, -15, 153, -75, 0], [0, 0, 0, -104, 243, 25, 81, 0], [148, -48, 28, 0, 0, 0, 0, -38], [-568, 62, -164, 0, 0, 0, 0, -10], [0, 0, 0, -93, 302, -29, 55, 0], [0, 0, 0, 237, 81, -121, -105, 0], [0, 0, 0, 66, -156, 90, 34, 0], [826, 96, -116, 0, 0, 0, 0, -22], [0, 0, 0, 52, -262, 140, -36, 0], [0, 0, 0, 97, -271, -61, 19, 0], [584, 2, 268, 0, 0, 0, 0, 32], [0, 0, 0, -28, 232, -100, -42, 0], [0, 0, 0, 178, 84, 18, 10, 0], [670, 36, 120, 0, 0, 0, 0, -52], [696, -6, -64, 0, 0, 0, 0, 25], [0, 0, 0, 80, -211, -85, 67, 0], [0, 0, 0, -248, -96, 28, -148, 0], [0, 0, 0, -24, 166, 52, -148, 0], [0, 0, 0, -392, -32, 24, 10, 0], [0, 0, 0, -56, 58, 72, -111, 0], [-870, -35, -40, 0, 0, 0, 0, 52], [-38, -53, -196, 0, 0, 0, 0, 14], [0, 0, 0, 205, -30, -29, -9, 0], [0, 0, 0, 237, -271, 87, -82, 0], [0, 0, 0, -91, 270, -120, 32, 0], [0, 0, 0, -141, -320, -79, 55, 0], [0, 0, 0, 281, 252, 55, -13, 0], [740, -2, -76, 0, 0, 0, 0, 14], [-450, 7, -296, 0, 0, 0, 0, 56], [0, 0, 0, -406, 84, -52, -4, 0], [-463, 58, -208, 0, 0, 0, 0, -72], [1687, -44, -55, 0, 0, 0, 0, -2], [0, 0, 0, -17, -262, -74, -186, 0], [666, -33, 312, 0, 0, 0, 0, 20], [0, 0, 0, -8, 150, 56, -40, 0], [1277, 40, 95, 0, 0, 0, 0, 3], [945, 26, -120, 0, 0, 0, 0, -84], [0, 0, 0, -231, 17, -133, 224, 0], [0, 0, 0, -167, -62, 22, -154, 0], [298, 96, -148, 0, 0, 0, 0, 58], [-1122, 3, -224, 0, 0, 0, 0, -48], [1828, 72, -20, 0, 0, 0, 0, 8], [0, 0, 0, -86, 428, -18, 66, 0], [1260, -30, 156, 0, 0, 0, 0, -3], [-1000, -105, 254, 0, 0, 0, 0, 68], [0, 0, 0, 283, 360, 57, 209, 0], [-1204, 56, 72, 0, 0, 0, 0, 25], [1670, -125, -72, 0, 0, 0, 0, 84], [0, 0, 0, -88, -6, -24, 240, 0], [-247, -24, 32, 0, 0, 0, 0, 72], [0, 0, 0, 70, 78, 146, 3, 0], [817, 106, -172, 0, 0, 0, 0, -10], [0, 0, 0, -168, -472, -8, 175, 0], [0, 0, 0, -68, 347, -67, 133, 0], [74, 63, 204, 0, 0, 0, 0, 2], [1449, -72, 94, 0, 0, 0, 0, -75], [0, 0, 0, -80, 64, 164, -60, 0], [0, 0, 0, -32, -204, -140, 148, 0], [0, 0, 0, -30, -26, -106, 217, 0], [0, 0, 0, 207, -288, 39, -61, 0], [-1292, -103, 184, 0, 0, 0, 0, 60], [0, 0, 0, -264, -184, -104, 206, 0], [0, 0, 0, 338, 60, -64, -192, 0], [-1131, -114, 22, 0, 0, 0, 0, 1], [1417, -8, -201, 0, 0, 0, 0, 40], [0, 0, 0, -281, 147, -75, -35, 0], [-40, -48, -232, 0, 0, 0, 0, 20], [-1072, -154, 144, 0, 0, 0, 0, 41], [0, 0, 0, -83, -214, 172, 84, 0], [1208, -30, 204, 0, 0, 0, 0, 76], [0, 0, 0, 189, -202, -66, -50, 0], [76, 153, -372, 0, 0, 0, 0, -102], [-944, 74, -264, 0, 0, 0, 0, 41], [0, 0, 0, 230, 124, 50, 13, 0], [785, -16, -77, 0, 0, 0, 0, 53], [0, 0, 0, 48, -245, 173, 53, 0], [0, 0, 0, -108, 66, -68, 178, 0], [-586, 58, -32, 0, 0, 0, 0, 80], [-231, -124, 23, 0, 0, 0, 0, -6], [0, 0, 0, -182, -412, -98, -173, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1728_g_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1728_3_g_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_1728_3_g_n(:prec:=8)
    chi := MakeCharacter_1728_g();
    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_1728_3_g_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_1728_3_g_n( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1728_g();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<5,R![229, -28, -54, -4, 1]>,<7,R![52441, 0, 51220, 0, 7758, 0, 196, 0, 1]>],Snew);
    return Vf;
end function;