
// Make newform 2352.3.f.j in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_2352_f();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_2352_f_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_2352_3_f_j();".
// 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_2352_3_f_j();".
// 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, -8, 0, 14, 0, -4, 0, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0], [20, 0, 0, 0, 0, 0, 1, 0], [9, 0, -28, 0, 7, 0, -2, 0], [0, 134, 0, -126, 0, 35, 0, -8], [0, -10, 0, 126, 0, -35, 0, 10], [4, 0, -12, 0, 4, 0, -1, 0], [0, -96, 0, 91, 0, -28, 0, 5], [0, -8, 0, 91, 0, -28, 0, 8]];
    Rf_basisdens := [1, 14, 7, 14, 14, 2, 7, 7];
    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_2352_f();"
function MakeCharacter_2352_f()
    N := 2352;
    order := 2;
    char_gens := [1471, 1765, 785, 2257];
    v := [2, 2, 2, 1];
    // 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_2352_f_Hecke();"
function MakeCharacter_2352_f_Hecke(Kf)
    N := 2352;
    order := 2;
    char_gens := [1471, 1765, 785, 2257];
    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, -1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, -1, -4, 0, 2], [0, 0, 4, 0, 3, -3, 0, 0], [0, 0, -8, 0, -2, -2, 0, -1], [2, 9, 0, -2, 0, 0, -1, 0], [10, -5, 0, 6, 0, 0, -1, 0], [0, 0, -4, 0, 4, 14, 0, 3], [16, 9, 0, 4, 0, 0, 6, 0], [0, 0, -14, 0, 7, -13, 0, -5], [14, -8, 0, -8, 0, 0, 2, 0], [0, 0, -22, 0, 8, -2, 0, -7], [-18, -26, 0, -4, 0, 0, -6, 0], [0, 0, -14, 0, -12, 22, 0, -5], [0, 0, 12, 0, -5, 14, 0, -8], [8, -12, 0, -4, 0, 0, 6, 0], [-28, -43, 0, -8, 0, 0, -1, 0], [0, 0, 28, 0, -15, -6, 0, 8], [54, -28, 0, 0, 0, 0, 4, 0], [0, 0, -16, 0, -6, 6, 0, 14], [0, 0, -8, 0, 11, 23, 0, 16], [0, 0, -28, 0, 3, -10, 0, 4], [0, 0, 2, 0, 37, 11, 0, 3], [0, 0, -8, 0, -4, 18, 0, 9], [-82, 73, 0, -2, 0, 0, 3, 0], [2, 43, 0, -20, 0, 0, 0, 0], [64, 12, 0, -14, 0, 0, -8, 0], [56, 92, 0, 0, 0, 0, -6, 0], [0, 0, 8, 0, 10, 46, 0, -28], [62, -59, 0, -10, 0, 0, 21, 0], [0, 0, -16, 0, 18, -36, 0, -6], [34, -108, 0, -16, 0, 0, 4, 0], [-62, -40, 0, -24, 0, 0, -10, 0], [0, 0, -8, 0, -25, 54, 0, -1], [12, -20, 0, 12, 0, 0, 18, 0], [0, 0, -30, 0, -30, -40, 0, 23], [0, 0, -16, 0, 3, 17, 0, 46], [140, 95, 0, -12, 0, 0, -7, 0], [0, 0, 24, 0, 1, 44, 0, 13], [-56, -27, 0, 20, 0, 0, 31, 0], [-34, 56, 0, -12, 0, 0, 24, 0], [32, 22, 0, -42, 0, 0, -6, 0], [0, 0, 32, 0, 34, -20, 0, -10], [32, -56, 0, 20, 0, 0, -12, 0], [0, 0, -68, 0, 24, -24, 0, -20], [0, 0, 6, 0, -30, -20, 0, -61], [0, 0, -40, 0, -43, 48, 0, 13], [-22, -159, 0, 22, 0, 0, 3, 0], [58, -117, 0, 6, 0, 0, -3, 0], [0, 0, 8, 0, -43, 26, 0, -3], [0, 0, -66, 0, -58, -64, 0, 49], [0, 0, -82, 0, 25, 29, 0, 5], [-32, -5, 0, -16, 0, 0, -7, 0], [0, 0, -30, 0, 31, 15, 0, -37], [0, 0, -116, 0, -34, 66, 0, 13], [-40, -6, 0, -40, 0, 0, -4, 0], [150, -113, 0, 26, 0, 0, -7, 0], [0, 0, 44, 0, -8, 62, 0, 39], [0, 0, -90, 0, -7, 15, 0, 33], [0, 0, 8, 0, -96, 10, 0, -35], [0, 0, 10, 0, 50, 88, 0, 7], [0, 0, -24, 0, -21, 4, 0, 10], [-60, 26, 0, -30, 0, 0, 34, 0], [16, 224, 0, -36, 0, 0, 4, 0], [28, 49, 0, 20, 0, 0, -34, 0], [-46, 143, 0, 2, 0, 0, 13, 0], [0, 0, -88, 0, -27, -6, 0, -31], [0, 0, 182, 0, 7, -23, 0, -31], [162, -45, 0, -30, 0, 0, -19, 0], [0, 0, -188, 0, -26, 64, 0, -34], [-208, -86, 0, -12, 0, 0, 16, 0], [-184, 104, 0, -52, 0, 0, 12, 0], [0, 0, -152, 0, 20, -88, 0, 32], [302, 199, 0, -34, 0, 0, -29, 0], [0, 0, 76, 0, 37, 158, 0, -50], [-78, 53, 0, 62, 0, 0, -13, 0], [0, 0, 196, 0, 57, 10, 0, -32], [0, 0, -10, 0, 56, 94, 0, 11], [-68, -16, 0, 72, 0, 0, 40, 0], [320, -79, 0, -36, 0, 0, 47, 0], [0, 0, -48, 0, 137, -96, 0, -65], [0, 0, 36, 0, 38, -4, 0, -44], [-88, -345, 0, 4, 0, 0, -27, 0], [-112, -26, 0, -6, 0, 0, -38, 0], [56, 6, 0, 60, 0, 0, 12, 0], [0, 0, -64, 0, -37, 89, 0, 42], [-300, -106, 0, -40, 0, 0, -2, 0], [0, 0, 30, 0, 60, -106, 0, 95], [0, 0, 10, 0, 148, -6, 0, 27], [-402, 208, 0, 76, 0, 0, -18, 0], [390, -127, 0, -42, 0, 0, -5, 0], [138, 362, 0, -36, 0, 0, -30, 0], [0, 0, 80, 0, 94, -50, 0, 28], [0, 0, 26, 0, 41, 93, 0, -73], [0, 0, -6, 0, -111, -77, 0, -29], [0, 0, 160, 0, -10, -24, 0, 20], [530, 122, 0, -56, 0, 0, -48, 0], [-310, -168, 0, 108, 0, 0, 16, 0], [360, 40, 0, -34, 0, 0, 8, 0], [0, 0, -14, 0, 94, -204, 0, 1], [-414, 43, 0, 10, 0, 0, -33, 0], [298, -302, 0, -32, 0, 0, -4, 0], [0, 0, -56, 0, 21, 152, 0, 141], [0, 0, 246, 0, -20, 58, 0, 17], [0, 0, 24, 0, 125, -213, 0, -18], [400, -227, 0, 60, 0, 0, -53, 0], [0, 0, 400, 0, -3, 48, 0, 24], [0, 0, 156, 0, -30, -128, 0, -100], [258, -405, 0, 8, 0, 0, 2, 0], [-150, -467, 0, -42, 0, 0, -35, 0], [0, 0, 44, 0, -74, -152, 0, 104], [-212, 330, 0, 68, 0, 0, -38, 0], [114, 151, 0, 158, 0, 0, 33, 0], [0, 0, -176, 0, 222, -54, 0, -41], [0, 0, -90, 0, 104, -298, 0, -1], [-542, -175, 0, -82, 0, 0, -59, 0], [120, 5, 0, 116, 0, 0, 31, 0], [0, 0, -160, 0, 23, -182, 0, -81], [182, 215, 0, -28, 0, 0, -28, 0], [0, 0, -36, 0, 177, 143, 0, -88], [-324, -147, 0, 72, 0, 0, -37, 0], [0, 0, 8, 0, -84, 36, 0, -58], [-78, -91, 0, -2, 0, 0, 123, 0], [-238, -49, 0, -124, 0, 0, -16, 0], [0, 0, 372, 0, 100, -96, 0, -10], [0, 0, 312, 0, -76, -10, 0, -9], [0, 0, -184, 0, -223, -64, 0, 105], [-28, 330, 0, 72, 0, 0, -50, 0], [28, -209, 0, 116, 0, 0, 25, 0], [344, 158, 0, 20, 0, 0, 36, 0], [34, -397, 0, -28, 0, 0, 68, 0], [0, 0, 112, 0, 3, -445, 0, -20], [0, 0, 296, 0, -185, -84, 0, -85], [0, 0, -440, 0, 41, -81, 0, -122], [0, 0, -4, 0, 54, -252, 0, 146], [0, 0, -274, 0, -3, 127, 0, -63], [294, 18, 0, 68, 0, 0, 66, 0], [0, 0, -56, 0, -280, -144, 0, -36], [-4, -158, 0, -46, 0, 0, -58, 0], [210, -370, 0, 84, 0, 0, -16, 0], [390, 85, 0, -22, 0, 0, 63, 0], [0, 0, -224, 0, -141, -188, 0, 224], [0, 0, -158, 0, 2, 4, 0, 81], [0, 0, -368, 0, -91, 34, 0, -77], [0, 0, 288, 0, 39, 187, 0, -88], [0, 0, 4, 0, 114, -158, 0, 3], [166, 147, 0, 2, 0, 0, -55, 0], [-226, -251, 0, -48, 0, 0, 74, 0], [0, 0, 312, 0, -113, -259, 0, -62], [462, 446, 0, 20, 0, 0, -2, 0], [0, 0, -58, 0, 208, -174, 0, -153], [-18, -216, 0, 136, 0, 0, 66, 0], [128, -737, 0, -76, 0, 0, -31, 0], [-510, -264, 0, -48, 0, 0, -22, 0], [0, 0, -304, 0, 63, 115, 0, 40], [0, 0, 336, 0, 149, -364, 0, 112], [0, 0, 66, 0, 101, -355, 0, 19], [-266, -3, 0, -74, 0, 0, -101, 0], [1034, -262, 0, 76, 0, 0, -50, 0], [-84, 90, 0, 4, 0, 0, 86, 0], [0, 0, -736, 0, 122, 90, 0, 30], [-126, -65, 0, -70, 0, 0, -45, 0], [0, 0, 92, 0, -204, 100, 0, 128], [-642, 638, 0, -104, 0, 0, 94, 0], [0, 0, 440, 0, -33, -66, 0, -73], [-372, -506, 0, 92, 0, 0, -16, 0], [0, 0, -102, 0, 291, 137, 0, 151], [214, 551, 0, 66, 0, 0, 105, 0], [0, 0, -4, 0, -281, 198, 0, 62], [-868, 425, 0, 20, 0, 0, 3, 0], [90, 279, 0, 72, 0, 0, 22, 0], [0, 0, -456, 0, -18, 72, 0, 166], [0, 0, -690, 0, 137, -197, 0, -119], [-402, 138, 0, -236, 0, 0, -28, 0], [166, -105, 0, 102, 0, 0, -79, 0], [0, 0, -196, 0, -332, 82, 0, -69], [0, 0, 464, 0, -115, 146, 0, -45], [-222, 148, 0, -4, 0, 0, -172, 0], [0, 0, -480, 0, -246, -114, 0, 64], [212, 463, 0, 32, 0, 0, 28, 0], [0, 0, -110, 0, 35, 153, 0, 171], [-90, -113, 0, -2, 0, 0, 81, 0], [0, 0, -468, 0, 219, -91, 0, -96], [760, -374, 0, -140, 0, 0, 4, 0], [0, 0, 316, 0, 200, 84, 0, 110], [58, -379, 0, 104, 0, 0, 106, 0], [0, 0, -144, 0, -412, 208, 0, -26], [0, 0, 312, 0, -17, -22, 0, -231], [-116, 487, 0, -84, 0, 0, 5, 0], [-756, -524, 0, 88, 0, 0, 112, 0], [0, 0, 450, 0, -253, -95, 0, 23], [574, 227, 0, 110, 0, 0, -47, 0], [0, 0, 728, 0, 269, 31, 0, 26], [18, 589, 0, 140, 0, 0, 12, 0], [448, 565, 0, -8, 0, 0, 76, 0], [0, 0, -516, 0, 179, -205, 0, -214], [0, 0, 458, 0, 70, 172, 0, -229], [-290, -530, 0, -176, 0, 0, -26, 0], [0, 0, -944, 0, 82, 36, 0, -40], [0, 0, -232, 0, -21, 508, 0, 164], [0, 0, 360, 0, -383, 110, 0, 67], [0, 0, -92, 0, -300, 60, 0, 176], [0, 0, 200, 0, 59, 425, 0, 182], [0, 0, -124, 0, -272, -152, 0, 300], [-404, 79, 0, 156, 0, 0, 81, 0], [156, 148, 0, -110, 0, 0, -56, 0], [0, 0, -168, 0, 124, 370, 0, 269], [-132, 651, 0, 64, 0, 0, 40, 0], [0, 0, 462, 0, 37, 233, 0, -127], [622, -422, 0, 196, 0, 0, -118, 0], [0, 0, 688, 0, -10, -202, 0, 20], [0, 0, 394, 0, -158, -428, 0, 105], [0, 0, -568, 0, 243, -368, 0, -51], [1066, -624, 0, 88, 0, 0, 10, 0], [0, 0, -578, 0, -159, -117, 0, 245], [758, -1, 0, 166, 0, 0, 109, 0], [-62, -367, 0, -94, 0, 0, 5, 0], [-682, -295, 0, -108, 0, 0, -172, 0], [0, 0, -492, 0, 42, -326, 0, -59], [310, -94, 0, 36, 0, 0, 54, 0], [-780, -146, 0, -40, 0, 0, 32, 0], [0, 0, -540, 0, -154, -346, 0, 28], [84, -1061, 0, -68, 0, 0, -10, 0], [0, 0, -568, 0, 231, -69, 0, -12], [-384, -567, 0, 36, 0, 0, 3, 0], [0, 0, 308, 0, 178, 242, 0, -43], [-980, -121, 0, -40, 0, 0, 125, 0], [-830, 65, 0, -20, 0, 0, 80, 0], [0, 0, 632, 0, -228, -590, 0, -189], [-570, 140, 0, -172, 0, 0, -150, 0], [-728, -226, 0, 146, 0, 0, 78, 0], [0, 0, 8, 0, -20, -590, 0, 147], [0, 0, -324, 0, -182, -130, 0, 364], [0, 0, -904, 0, -29, 182, 0, 81], [1050, -416, 0, 4, 0, 0, 132, 0], [498, 571, 0, 62, 0, 0, 53, 0], [0, 0, 56, 0, 224, -488, 0, 154], [-1478, -151, 0, -6, 0, 0, -49, 0], [0, 0, -196, 0, -242, 332, 0, 70], [0, 0, -116, 0, 524, -176, 0, 74], [202, 642, 0, -200, 0, 0, 72, 0], [0, 0, 626, 0, 55, -57, 0, 63], [0, 0, -466, 0, -182, 220, 0, -173], [0, 0, 472, 0, -606, -302, 0, -111], [0, 0, 774, 0, 136, 266, 0, -155], [-406, -1156, 0, -52, 0, 0, -72, 0], [-232, 745, 0, -112, 0, 0, 75, 0], [240, 566, 0, -76, 0, 0, -136, 0], [0, 0, -486, 0, -221, -99, 0, -109], [-44, -761, 0, 0, 0, 0, -171, 0], [0, 0, -744, 0, -117, -6, 0, 121], [0, 0, -182, 0, 195, 389, 0, 35], [-970, 203, 0, -50, 0, 0, 93, 0], [692, -535, 0, 56, 0, 0, 36, 0], [0, 0, -1012, 0, -358, -94, 0, 25], [0, 0, -994, 0, -129, -7, 0, 89], [0, 0, 312, 0, 197, 356, 0, 11], [754, 576, 0, -20, 0, 0, 140, 0], [666, 457, 0, 154, 0, 0, 3, 0], [0, 0, -184, 0, 499, 52, 0, -148], [0, 0, 360, 0, 401, -394, 0, 35], [0, 0, 4, 0, -269, 513, 0, 40], [0, 0, 512, 0, 212, 308, 0, -310], [-498, 696, 0, -44, 0, 0, -16, 0], [0, 0, 320, 0, -93, 45, 0, -158], [-62, -896, 0, -136, 0, 0, -76, 0], [838, 757, 0, -162, 0, 0, 35, 0], [0, 0, 688, 0, 117, -62, 0, 305], [-144, 326, 0, 120, 0, 0, 20, 0], [0, 0, -528, 0, 147, 50, 0, -89], [-324, -612, 0, -280, 0, 0, -56, 0], [0, 0, -472, 0, -269, -278, 0, -211], [0, 0, 152, 0, -308, -118, 0, 347], [-330, -7, 0, -138, 0, 0, -149, 0], [376, -336, 0, -84, 0, 0, -36, 0], [1110, -16, 0, -164, 0, 0, 16, 0], [0, 0, 246, 0, 38, 428, 0, 131], [0, 0, -428, 0, 100, 552, 0, 340], [504, -64, 0, -92, 0, 0, 82, 0], [0, 0, -504, 0, 590, 62, 0, 4], [0, 0, -92, 0, -41, -306, 0, 184], [0, 0, -1072, 0, 394, -432, 0, -330], [896, -351, 0, -200, 0, 0, 15, 0], [-110, -1074, 0, -32, 0, 0, -56, 0], [-948, 350, 0, 118, 0, 0, -178, 0], [0, 0, -332, 0, -38, -46, 0, -199], [0, 0, 12, 0, 43, 283, 0, -102], [-546, 778, 0, -68, 0, 0, -86, 0], [0, 0, 1084, 0, 28, -136, 0, 40], [-386, 145, 0, 294, 0, 0, 29, 0], [0, 0, 590, 0, -438, 168, 0, 11], [-730, 1172, 0, 80, 0, 0, -112, 0], [0, 0, -358, 0, -379, -397, 0, 195], [0, 0, -1364, 0, 156, 4, 0, -68], [0, 0, -384, 0, -427, -855, 0, 108], [0, 0, 238, 0, -354, 148, 0, 571], [0, 0, 24, 0, -250, 28, 0, 326], [0, 0, -112, 0, -339, -132, 0, 574], [-762, 253, 0, 358, 0, 0, 123, 0], [-416, 1276, 0, 36, 0, 0, 186, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_2352_f_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_2352_3_f_j();".
// 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_2352_3_f_j(:prec:=8)
    chi := MakeCharacter_2352_f();
    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_2352_3_f_j();".
// 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_2352_3_f_j( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_2352_f();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<5,R![196, 0, 1088, 0, 1052, 0, 64, 0, 1]>,<11,R![3292, 48, -124, 0, 1]>],Snew);
    return Vf;
end function;