
// Make newform 2016.3.m.c in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_2016_m();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_2016_m_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_2016_3_m_c();".
// 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_2016_3_m_c();".
// 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, 0, 56, 0, 53, 0, 14, 0, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0], [-4, 0, -92, 0, -37, 0, -3, 0], [44, 0, 60, 0, 15, 0, 1, 0], [-24, 0, -72, 0, -33, 0, -3, 0], [0, 56, 0, 42, 0, 13, 0, 1], [0, 42, 0, 51, 0, 14, 0, 1], [0, 32, 0, 42, 0, 13, 0, 1], [0, 110, 0, 77, 0, 16, 0, 1]];
    Rf_basisdens := [1, 4, 4, 2, 4, 4, 2, 2];
    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_2016_m();"
function MakeCharacter_2016_m()
    N := 2016;
    order := 2;
    char_gens := [127, 1765, 1793, 577];
    v := [1, 2, 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_2016_m_Hecke();"
function MakeCharacter_2016_m_Hecke(Kf)
    N := 2016;
    order := 2;
    char_gens := [127, 1765, 1793, 577];
    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], [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, 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, 1, 0, 0], [0, 0, 0, 0, 0, -2, 1, 1], [4, 0, -1, 0, 0, 0, 0, 0], [2, -2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 3, 0], [0, 0, 0, 0, 2, -2, 0, 1], [10, 0, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 4, 2, 2], [-22, -2, 0, 2, 0, 0, 0, 0], [-18, -2, 0, -2, 0, 0, 0, 0], [0, 0, 0, 0, 0, -10, 7, -3], [0, 0, 0, 0, -2, 0, 2, 4], [-6, 2, -2, -2, 0, 0, 0, 0], [0, 0, 0, 0, -1, -4, 7, 2], [-24, -4, -7, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, -18, -11, 1], [0, 0, 0, 0, 0, 4, -4, -6], [34, -6, -2, 0, 0, 0, 0, 0], [0, 0, 0, 0, -4, -8, 14, 0], [0, 0, 0, 0, -1, 28, 13, 2], [10, 4, 0, 2, 0, 0, 0, 0], [66, -4, 6, 2, 0, 0, 0, 0], [16, -12, -5, 0, 0, 0, 0, 0], [0, 0, 0, 0, -2, -28, -6, 6], [0, 0, 0, 0, -6, -22, -7, 3], [26, 2, -16, 6, 0, 0, 0, 0], [20, 7, 7, 1, 0, 0, 0, 0], [0, 0, 0, 0, 2, 2, 6, -9], [0, 0, 0, 0, 3, -12, -31, 6], [-58, 0, -12, 0, 0, 0, 0, 0], [0, 0, 0, 0, 11, 0, -7, 0], [30, -12, -16, 4, 0, 0, 0, 0], [0, 0, 0, 0, -10, -10, -8, -3], [84, -4, 11, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, -10, -7, 5], [0, 0, 0, 0, -14, 8, 22, -4], [76, -12, -15, -4, 0, 0, 0, 0], [0, 0, 0, 0, 2, 34, 27, -1], [36, 8, -29, -4, 0, 0, 0, 0], [0, 0, 0, 0, 8, -68, -34, -2], [32, -9, -1, 5, 0, 0, 0, 0], [-6, -10, 30, 2, 0, 0, 0, 0], [0, 0, 0, 0, -14, -20, -14, 2], [0, 0, 0, 0, 2, -42, 41, 13], [0, 0, 0, 0, 8, -60, -4, 14], [0, 0, 0, 0, -9, -48, 29, -16], [-4, -24, -1, -4, 0, 0, 0, 0], [94, 12, 4, 0, 0, 0, 0, 0], [0, 0, 0, 0, 6, -30, 34, -9], [18, 0, 2, -6, 0, 0, 0, 0], [0, 0, 0, 0, -7, -36, -9, 10], [-50, 4, -20, -8, 0, 0, 0, 0], [0, 0, 0, 0, 16, 36, -16, 2], [44, -4, -7, -4, 0, 0, 0, 0], [0, 0, 0, 0, 12, -20, -12, 18], [18, -24, 8, -8, 0, 0, 0, 0], [-66, 4, 36, 8, 0, 0, 0, 0], [0, 0, 0, 0, 5, -88, -11, -12], [176, 12, -1, -4, 0, 0, 0, 0], [0, 0, 0, 0, -19, -12, 23, 14], [0, 0, 0, 0, -8, 24, -76, 0], [-230, 14, 4, 6, 0, 0, 0, 0], [146, -14, 2, -10, 0, 0, 0, 0], [0, 0, 0, 0, 0, 54, -53, 37], [80, 27, 43, -11, 0, 0, 0, 0], [0, 0, 0, 0, 8, -38, -19, -21], [-4, -16, -5, 0, 0, 0, 0, 0], [-62, 22, -38, 18, 0, 0, 0, 0], [0, 0, 0, 0, -18, 22, -60, -11], [0, 0, 0, 0, 40, 60, 24, 2], [370, -20, -32, 4, 0, 0, 0, 0], [0, 0, 0, 0, -12, 54, -17, -27], [0, 0, 0, 0, -34, 96, 42, 12], [262, -30, -8, -2, 0, 0, 0, 0], [-300, 28, 7, 4, 0, 0, 0, 0], [-244, 23, -21, -7, 0, 0, 0, 0], [134, 20, 26, -8, 0, 0, 0, 0], [0, 0, 0, 0, -7, -48, -103, 0], [202, 28, 44, 12, 0, 0, 0, 0], [0, 0, 0, 0, 10, -122, 2, 13], [-562, -2, 40, -4, 0, 0, 0, 0], [0, 0, 0, 0, -20, 76, -28, -10], [0, 0, 0, 0, -22, 30, 45, 1], [-290, 8, 32, 0, 0, 0, 0, 0], [40, 31, -41, 9, 0, 0, 0, 0], [-100, -40, -23, 8, 0, 0, 0, 0], [0, 0, 0, 0, 20, -188, 58, 26], [0, 0, 0, 0, 11, 0, 49, -24], [0, 0, 0, 0, -2, 12, -70, -18], [0, 0, 0, 0, -34, 98, -16, -9], [0, 0, 0, 0, -22, 150, 13, 13], [0, 0, 0, 0, -2, 34, -95, 31], [0, 0, 0, 0, -16, 60, -64, -18], [-388, 36, -15, 12, 0, 0, 0, 0], [346, 12, 18, -12, 0, 0, 0, 0], [0, 0, 0, 0, -19, -236, 45, -26], [42, 56, 76, 0, 0, 0, 0, 0], [0, 0, 0, 0, 28, 190, 41, 17], [26, 30, -66, -14, 0, 0, 0, 0], [0, 0, 0, 0, -15, 212, -7, -26], [196, 11, -9, 5, 0, 0, 0, 0], [0, 0, 0, 0, -44, 62, -93, -23], [70, 18, -2, 2, 0, 0, 0, 0], [0, 0, 0, 0, 9, 0, -33, 0], [-146, 12, 40, -20, 0, 0, 0, 0], [0, 0, 0, 0, 16, 160, -8, 36], [158, 0, -20, 2, 0, 0, 0, 0], [0, 0, 0, 0, -8, -8, 68, -20], [-114, -12, -14, 28, 0, 0, 0, 0], [-56, 17, 17, 31, 0, 0, 0, 0], [0, 0, 0, 0, -35, -72, -15, 12], [0, 0, 0, 0, 44, 200, 72, -24], [252, 15, -101, 9, 0, 0, 0, 0], [0, 0, 0, 0, -9, 252, 15, -6], [0, 0, 0, 0, -2, 68, -54, 46], [290, 32, 62, 8, 0, 0, 0, 0], [0, 0, 0, 0, 20, 90, 23, -5], [128, 24, 21, -12, 0, 0, 0, 0], [82, 32, -100, -4, 0, 0, 0, 0], [-244, -4, 81, -12, 0, 0, 0, 0], [0, 0, 0, 0, 46, -86, -31, -29], [0, 0, 0, 0, -11, 4, 43, -50], [-134, 4, -78, -4, 0, 0, 0, 0], [338, 42, -84, -18, 0, 0, 0, 0], [0, 0, 0, 0, 18, -96, -34, -4], [0, 0, 0, 0, -46, 120, 74, -4], [-464, -40, 37, -20, 0, 0, 0, 0], [0, 0, 0, 0, 0, 246, 25, 37], [0, 0, 0, 0, 62, 270, 8, 33], [0, 0, 0, 0, -2, 18, -54, -1], [-426, 32, 78, -8, 0, 0, 0, 0], [-122, -2, 124, 6, 0, 0, 0, 0], [-686, 76, -46, 6, 0, 0, 0, 0], [520, 12, -17, 16, 0, 0, 0, 0], [0, 0, 0, 0, 5, 72, -53, -36], [-580, 20, 97, -12, 0, 0, 0, 0], [-168, -55, 25, 15, 0, 0, 0, 0], [0, 0, 0, 0, 41, -200, -23, -20], [70, -28, 52, -20, 0, 0, 0, 0], [0, 0, 0, 0, 12, 164, -204, -6], [0, 0, 0, 0, -54, -6, -159, 19], [752, -20, -55, 4, 0, 0, 0, 0], [0, 0, 0, 0, 2, -188, 142, -58], [-300, -52, 51, -16, 0, 0, 0, 0], [-598, -48, -22, 40, 0, 0, 0, 0], [0, 0, 0, 0, 55, 20, 109, 22], [0, 0, 0, 0, -8, -28, -122, -38], [-86, -74, 0, 18, 0, 0, 0, 0], [-6, 42, 2, -22, 0, 0, 0, 0], [0, 0, 0, 0, -46, 2, -99, 7], [0, 0, 0, 0, 70, 120, -22, -12], [0, 0, 0, 0, 34, 2, -65, -17], [0, 0, 0, 0, 10, -222, 94, 15], [0, 0, 0, 0, -52, -332, -96, -22], [-254, -70, -108, 32, 0, 0, 0, 0], [370, 46, -14, 48, 0, 0, 0, 0], [320, 28, -49, 12, 0, 0, 0, 0], [0, 0, 0, 0, 12, 266, -129, -29], [326, 28, -68, 4, 0, 0, 0, 0], [0, 0, 0, 0, -66, 202, 140, 43], [0, 0, 0, 0, -57, -92, 151, -26], [-2, 48, -68, 20, 0, 0, 0, 0], [0, 0, 0, 0, -46, 148, -90, 38], [0, 0, 0, 0, 8, -152, -222, -24], [-144, -12, 113, 28, 0, 0, 0, 0], [-248, -69, -133, 9, 0, 0, 0, 0], [-548, 40, -39, 24, 0, 0, 0, 0], [0, 0, 0, 0, 2, -114, -195, 57], [900, 52, 75, 24, 0, 0, 0, 0], [0, 0, 0, 0, 0, 340, -104, 26], [538, -16, 112, 28, 0, 0, 0, 0], [0, 0, 0, 0, -2, -8, -290, 0], [-958, -28, -92, -14, 0, 0, 0, 0], [0, 0, 0, 0, -10, -146, -33, -23], [-622, -12, -58, 36, 0, 0, 0, 0], [0, 0, 0, 0, 84, -200, 44, 48], [-904, 16, 149, -32, 0, 0, 0, 0], [0, 0, 0, 0, 30, 226, -258, 23], [0, 0, 0, 0, -7, -164, 121, -102], [242, -10, 44, 42, 0, 0, 0, 0], [-282, 26, -110, -24, 0, 0, 0, 0], [0, 0, 0, 0, -62, 298, 58, 67], [-316, -40, 101, -72, 0, 0, 0, 0], [878, 26, 14, -42, 0, 0, 0, 0], [0, 0, 0, 0, -63, -104, -33, -60], [234, -80, -116, 8, 0, 0, 0, 0], [0, 0, 0, 0, 50, -212, -294, -18], [-402, -78, -10, 14, 0, 0, 0, 0], [0, 0, 0, 0, 54, -358, 13, 51], [0, 0, 0, 0, 82, 146, 73, -57], [-260, -44, -59, 24, 0, 0, 0, 0], [0, 0, 0, 0, -50, 22, -193, 29], [-422, 16, -80, -26, 0, 0, 0, 0], [40, -1, -153, 33, 0, 0, 0, 0], [-18, 44, -110, -20, 0, 0, 0, 0], [666, -106, -18, -14, 0, 0, 0, 0], [0, 0, 0, 0, -84, -428, -92, 18], [178, 14, 82, 2, 0, 0, 0, 0], [0, 0, 0, 0, -18, -188, 62, 146], [-400, 8, -51, 28, 0, 0, 0, 0], [750, -62, 82, -38, 0, 0, 0, 0], [0, 0, 0, 0, -53, -500, -93, -22], [-408, 16, -173, -40, 0, 0, 0, 0], [0, 0, 0, 0, 6, -148, 266, 14], [0, 0, 0, 0, -148, 110, -77, -55], [204, -121, 7, -19, 0, 0, 0, 0], [0, 0, 0, 0, -61, -228, 217, -30], [916, -55, 141, -17, 0, 0, 0, 0], [424, 64, -49, 20, 0, 0, 0, 0], [0, 0, 0, 0, 70, 166, 216, -27], [0, 0, 0, 0, 51, -224, 235, 104], [0, 0, 0, 0, 60, 404, -48, -38], [-1582, -62, -4, -2, 0, 0, 0, 0], [0, 0, 0, 0, 68, -44, 158, 26], [878, 0, 18, -22, 0, 0, 0, 0], [0, 0, 0, 0, 48, 544, -24, -28], [378, 68, 154, -28, 0, 0, 0, 0], [270, -48, -38, -16, 0, 0, 0, 0], [0, 0, 0, 0, -12, 108, -68, -42], [-746, 28, 108, -20, 0, 0, 0, 0], [0, 0, 0, 0, 146, -362, -114, -19], [0, 0, 0, 0, 47, 656, -27, 56], [-1058, -96, -70, 24, 0, 0, 0, 0], [-582, -88, -100, -6, 0, 0, 0, 0], [0, 0, 0, 0, 22, -518, 310, 27], [0, 0, 0, 0, 72, -348, 44, -14], [0, 0, 0, 0, 72, -242, 13, 1], [358, -12, -194, -4, 0, 0, 0, 0], [0, 0, 0, 0, -97, -72, -101, 44], [0, 0, 0, 0, -52, -524, -122, 2], [102, 52, -76, 28, 0, 0, 0, 0], [0, 0, 0, 0, -55, -208, 141, 8], [0, 0, 0, 0, 52, -36, -172, -54], [22, 38, 60, -68, 0, 0, 0, 0], [-162, 44, -112, -52, 0, 0, 0, 0], [0, 0, 0, 0, 82, 70, -39, -75], [0, 0, 0, 0, -20, 272, 96, 20], [0, 0, 0, 0, -48, -178, -373, 81], [0, 0, 0, 0, -27, -52, 189, 98], [0, 0, 0, 0, 8, 84, -152, -46], [374, -74, 138, -46, 0, 0, 0, 0], [770, -42, -10, 62, 0, 0, 0, 0], [0, 0, 0, 0, -58, 260, 38, -130], [0, 0, 0, 0, -144, 280, 176, 4], [0, 0, 0, 0, 115, 396, 165, -78], [0, 0, 0, 0, -20, 10, -113, 43], [0, 0, 0, 0, -8, -296, 362, 56], [-622, -84, -56, -28, 0, 0, 0, 0], [-582, 98, -74, 6, 0, 0, 0, 0], [0, 0, 0, 0, 44, 120, -56, 80], [-114, -112, -252, 34, 0, 0, 0, 0], [168, -28, -161, 48, 0, 0, 0, 0], [0, 0, 0, 0, 26, -254, 407, 23], [-1090, 96, 162, 0, 0, 0, 0, 0], [0, 0, 0, 0, 103, 32, -147, -16], [1048, 36, -37, -4, 0, 0, 0, 0], [-146, -32, -330, -44, 0, 0, 0, 0], [0, 0, 0, 0, 42, -146, 190, -151], [0, 0, 0, 0, -84, 6, -309, -115], [-880, -148, -115, 0, 0, 0, 0, 0], [-936, 140, 225, -16, 0, 0, 0, 0], [-1194, 108, 122, -14, 0, 0, 0, 0], [0, 0, 0, 0, 43, -236, 311, -82], [-522, 0, 252, 0, 0, 0, 0, 0], [306, -24, 156, -58, 0, 0, 0, 0], [0, 0, 0, 0, -34, -82, -21, -111], [-554, 6, -224, 2, 0, 0, 0, 0], [-452, -68, -153, -32, 0, 0, 0, 0], [0, 0, 0, 0, 88, 490, 73, 91], [-122, 68, 84, 82, 0, 0, 0, 0], [0, 0, 0, 0, 42, -94, -42, 87], [-1734, -20, 36, 44, 0, 0, 0, 0], [0, 0, 0, 0, 36, 256, -48, -148], [0, 0, 0, 0, 28, 510, 141, -63], [318, -130, -58, -6, 0, 0, 0, 0], [-364, -63, 129, 19, 0, 0, 0, 0], [0, 0, 0, 0, -113, -108, -115, 166], [0, 0, 0, 0, -56, 12, -372, -86], [0, 0, 0, 0, -68, 380, -300, -74], [0, 0, 0, 0, -2, -72, -350, 20], [16, 44, -127, -4, 0, 0, 0, 0], [0, 0, 0, 0, -95, 88, 269, 164], [0, 0, 0, 0, 66, 362, -166, 99], [-54, -44, -268, -60, 0, 0, 0, 0], [562, 82, 266, 38, 0, 0, 0, 0], [0, 0, 0, 0, 2, 8, -178, -4], [658, 114, 86, 34, 0, 0, 0, 0], [-518, -126, 22, -18, 0, 0, 0, 0], [0, 0, 0, 0, -17, 196, 365, 14], [-1568, 117, -99, 75, 0, 0, 0, 0], [0, 0, 0, 0, 47, 160, -117, 208], [306, -16, -24, -40, 0, 0, 0, 0], [-1148, -44, 145, 32, 0, 0, 0, 0], [0, 0, 0, 0, 140, -20, -96, 34], [1268, -28, -95, -56, 0, 0, 0, 0], [0, 0, 0, 0, -55, 148, -201, -114], [0, 0, 0, 0, -5, 296, -53, 140], [-258, 92, 98, 84, 0, 0, 0, 0], [1430, -130, 24, -38, 0, 0, 0, 0], [0, 0, 0, 0, -12, -420, 34, 78]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_2016_m_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_2016_3_m_c();".
// 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_2016_3_m_c(:prec:=8)
    chi := MakeCharacter_2016_m();
    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_2016_3_m_c();".
// 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_2016_3_m_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_2016_m();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<5,R![128, 224, -76, 0, 1]>],Snew);
    return Vf;
end function;