
// Make newform 2160.3.c.p in Magma, downloaded from the LMFDB on 02 September 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_2160_c();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_2160_c_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_2160_3_c_p();".
// 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_2160_3_c_p();".
// 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 := [196, 0, 25444, 0, 40465, 0, 15824, 0, 1798, 0, 76, 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, 0, 0], [-9205598, 0, -34496851, 0, -18048418, 0, -2221126, 0, -97172, 0, -1299, 0], [19243268, 0, -85130140, 0, -54640101, 0, -7302111, 0, -339565, 0, -4703, 0], [-5948478, 0, -61554583, 0, -36630480, 0, -4460178, 0, -190618, 0, -2507, 0], [186344612, 0, 540082056, 0, 230657783, 0, 26783999, 0, 1144371, 0, 15143, 0], [0, -1220950086, 0, -1555432611, 0, -518268874, 0, -55822864, 0, -2302068, 0, -29933], [22344848, 1423359286, -111164620, 2121258799, -34554732, 806491152, -2861028, 91057122, -84668, 3843242, -824, 50555], [2934592, 1423359286, 111164620, 2121258799, 34554732, 806491152, 2861028, 91057122, 84668, 3843242, 824, 50555], [0, -317870642, 0, -1237923375, 0, -571720619, 0, -67873097, 0, -2925949, 0, -38866], [0, -16055179562, 0, -25287967429, 0, -10042470682, 0, -1146131464, 0, -48521048, 0, -638811], [7920668, -15579025090, -1619380658, -27226367229, -1033124456, -11169263242, -125135948, -1288120840, -5285140, -54817776, -68922, -723619], [0, -18475789382, 0, -33230441799, 0, -13292195192, 0, -1516990574, 0, -64192458, 0, -844871]];
    Rf_basisdens := [1, 1579965, 2106620, 1053310, 6319860, 29492680, 25279440, 25279440, 14746340, 88478040, 88478040, 88478040];
    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_2160_c();"
function MakeCharacter_2160_c()
    N := 2160;
    order := 2;
    char_gens := [271, 1621, 2081, 1297];
    v := [2, 2, 1, 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_2160_c_Hecke();"
function MakeCharacter_2160_c_Hecke( : Kf := false)
    N := 2160;
    order := 2;
    char_gens := [271, 1621, 2081, 1297];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 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, 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, 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, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 1, -1, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 1, 1, -1, 0, 0, 1], [-1, -1, 0, 0, 1, 0, -1, 1, 0, 0, 0, 0], [-2, 0, 0, 0, 0, 1, 2, 2, -1, 2, 0, -1], [0, 1, 0, -1, 0, 2, 0, 0, 2, 1, 2, 1], [-2, 1, 0, -1, 0, -1, 2, 2, -1, -1, 2, -2], [4, 0, -1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [-5, 1, 1, -2, 0, 0, -1, 1, 0, 0, 0, 0], [3, 1, 0, -1, 0, -7, -3, -3, -3, -3, 2, -3], [-10, 4, 0, -1, 2, 0, -5, 5, 0, 0, 0, 0], [-4, 0, 0, 0, 0, 1, 4, 4, 3, 4, 0, 1], [0, 0, 0, 0, 0, 3, 0, 0, 0, -4, 0, -3], [-2, -2, 0, 2, 0, -1, 2, 2, 1, -1, -4, 1], [-6, 3, -3, 2, 0, 0, -6, 6, 0, 0, 0, 0], [-7, 2, -1, 2, -3, 0, -2, 2, 0, 0, 0, 0], [-6, 1, 0, -1, 0, -1, 6, 6, -5, 3, 2, 2], [-7, 1, 0, -1, 0, -1, 7, 7, -1, 4, 2, 3], [-5, -2, 0, 2, 0, 17, 5, 5, -3, 8, -4, 3], [-12, 0, 0, 0, 0, 3, 12, 12, -5, -6, 0, 3], [23, 1, 3, 3, -1, 0, -1, 1, 0, 0, 0, 0], [-12, -4, -1, -1, -5, 0, -13, 13, 0, 0, 0, 0], [2, -2, 1, -2, 3, 0, 6, -6, 0, 0, 0, 0], [-11, -2, 0, 2, 0, 9, 11, 11, -5, 8, -4, 1], [11, -1, 0, 1, 0, 13, -11, -11, 3, 4, -2, -3], [30, 2, 1, -2, 2, 0, -2, 2, 0, 0, 0, 0], [-16, 6, 2, -4, 0, 0, -12, 12, 0, 0, 0, 0], [10, -4, 0, 4, 0, 4, -10, -10, 7, 8, -8, 5], [-29, -18, 3, 8, 3, 0, -9, 9, 0, 0, 0, 0], [-14, 0, 0, 0, 0, -8, 14, 14, 7, -4, 0, -4], [-10, 0, 0, 0, 0, -11, 10, 10, 5, 10, 0, 1], [68, -2, -4, -1, -6, 0, 7, -7, 0, 0, 0, 0], [-39, -7, -4, -4, -9, 0, -7, 7, 0, 0, 0, 0], [-3, -3, 0, 3, 0, -12, 3, 3, 4, 4, -6, 2], [-12, 24, 1, 1, -3, 0, -21, 21, 0, 0, 0, 0], [0, 2, 0, -2, 0, 1, 0, 0, 1, 6, 4, -1], [0, 4, 0, -4, 0, -6, 0, 0, -4, -3, 8, -10], [77, -7, 3, 0, -2, 0, -7, 7, 0, 0, 0, 0], [-13, 10, 0, -6, -4, 0, -17, 17, 0, 0, 0, 0], [14, -32, -2, -8, -7, 0, -14, 14, 0, 0, 0, 0], [0, -2, 0, 2, 0, 7, 0, 0, 11, -12, -4, -7], [84, -5, 6, -3, 4, 0, -9, 9, 0, 0, 0, 0], [-34, -14, 3, 7, -1, 0, -23, 23, 0, 0, 0, 0], [-30, 22, -8, 4, 2, 0, -14, 14, 0, 0, 0, 0], [8, 6, 0, -6, 0, 12, -8, -8, 0, -4, 12, 0], [-42, 37, 5, -11, -7, 0, 1, -1, 0, 0, 0, 0], [-18, 2, 0, -2, 0, 10, 18, 18, -6, -14, 4, 6], [122, 4, -1, 8, 4, 0, 22, -22, 0, 0, 0, 0], [-50, 16, 3, -6, -3, 0, -2, 2, 0, 0, 0, 0], [-12, 4, 0, -4, 0, -10, 12, 12, 6, -6, 8, -12], [13, -43, 2, -4, -5, 0, -7, 7, 0, 0, 0, 0], [-36, -2, 0, 2, 0, 13, 36, 36, -4, 6, -4, 11], [2, 5, 0, -5, 0, -23, -2, -2, 13, 1, 10, -10], [-16, -5, 0, 5, 0, 28, 16, 16, 4, 31, -10, 9], [-74, -9, 1, 10, 6, 0, 26, -26, 0, 0, 0, 0], [-8, 4, 0, -4, 0, 6, 8, 8, -4, -22, 8, 10], [12, -4, 0, 4, 0, -11, -12, -12, -6, 6, -8, 15], [3, 1, 0, -1, 0, 32, -3, -3, 0, 12, 2, 14], [167, 9, -2, 10, 5, 0, -9, 9, 0, 0, 0, 0], [-106, -50, -6, 8, -4, 0, -14, 14, 0, 0, 0, 0], [29, -1, 0, 1, 0, 1, -29, -29, 11, -17, -2, -7], [215, -3, 6, -3, 8, 0, 41, -41, 0, 0, 0, 0], [10, -20, 2, -15, -16, 0, -29, 29, 0, 0, 0, 0], [-4, -32, 20, 14, 10, 0, 4, -4, 0, 0, 0, 0], [-30, -2, 0, 2, 0, 53, 30, 30, 11, 20, -4, 7], [18, -2, 0, 2, 0, -22, -18, -18, -7, -12, -4, -13], [-26, -8, 0, 8, 0, 27, 26, 26, -7, -4, -16, 1], [-62, 30, -6, 2, 9, 0, -6, 6, 0, 0, 0, 0], [-56, 18, 2, -7, 0, 0, 27, -27, 0, 0, 0, 0], [-10, -2, 0, 2, 0, 5, 10, 10, -2, -14, -4, -4], [-28, 4, 0, -4, 0, 15, 28, 28, -4, -20, 8, -3], [42, -2, 0, 2, 0, -7, -42, -42, 15, 14, -4, -9], [3, -20, -9, 4, -7, 0, 34, -34, 0, 0, 0, 0], [41, -5, 0, 5, 0, -22, -41, -41, -20, 7, -10, 8], [-174, 66, -12, -13, 6, 0, -33, 33, 0, 0, 0, 0], [-38, 0, 0, 0, 0, -36, 38, 38, 5, -6, 0, 4], [52, 2, 0, -2, 0, -39, -52, -52, 13, 5, 4, 3], [49, 23, 12, 2, -11, 0, 5, -5, 0, 0, 0, 0], [-130, 39, 1, -5, 5, 0, -33, 33, 0, 0, 0, 0], [-16, -7, 0, 7, 0, 19, 16, 16, -9, 13, -14, 0], [47, -1, 0, 1, 0, -15, -47, -47, -1, 10, -2, 5], [-5, 0, 0, 0, 0, -57, 5, 5, -9, -10, 0, 3], [17, 14, 0, -14, 0, -2, -17, -17, -6, -14, 28, -4], [289, 26, -8, -14, -32, 0, -28, 28, 0, 0, 0, 0], [-4, -2, 0, 2, 0, 53, 4, 4, -16, -4, -4, 7], [13, 2, 0, -2, 0, 21, -13, -13, 6, 26, 4, -12], [71, 7, 0, -7, 0, -31, -71, -71, 15, 0, 14, -3], [16, 20, -12, -18, -29, 0, 20, -20, 0, 0, 0, 0], [-148, -78, 3, -3, -17, 0, -31, 31, 0, 0, 0, 0], [35, 8, 0, -8, 0, 10, -35, -35, -14, 20, 16, -10], [-32, -9, 0, 9, 0, -24, 32, 32, -6, -5, -18, 3], [-6, 11, 0, -11, 0, -52, 6, 6, -12, -9, 22, 1], [62, 66, 31, 0, 9, 0, -6, 6, 0, 0, 0, 0], [42, -1, 0, 1, 0, 6, -42, -42, 26, 15, -2, 7], [391, -38, -6, -6, 10, 0, -29, 29, 0, 0, 0, 0], [-67, 25, 5, -1, -19, 0, 61, -61, 0, 0, 0, 0], [-10, -5, 0, 5, 0, 29, 10, 10, -13, 37, -10, 4], [176, -66, 12, 0, -9, 0, 24, -24, 0, 0, 0, 0], [79, 9, 0, -9, 0, -36, -79, -79, 8, -7, 18, -10], [249, -16, -21, 12, 17, 0, -66, 66, 0, 0, 0, 0], [22, 90, -3, -18, -22, 0, -38, 38, 0, 0, 0, 0], [46, -12, 0, 12, 0, 75, -46, -46, 16, 10, -24, -7], [-165, 54, 7, 14, 9, 0, 90, -90, 0, 0, 0, 0], [43, 6, 0, -6, 0, -30, -43, -43, -7, 2, 12, 5], [-8, -4, 0, 4, 0, -24, 8, 8, 20, 2, -8, 12], [372, 2, 21, -12, 6, 0, 48, -48, 0, 0, 0, 0], [142, 24, 2, -14, 0, 0, 6, -6, 0, 0, 0, 0], [71, -55, -11, -14, -14, 0, -1, 1, 0, 0, 0, 0], [-48, -12, 0, 12, 0, 48, 48, 48, -4, 6, -24, 22], [74, -3, 0, 3, 0, 1, -74, -74, 31, 7, -6, -14], [422, 26, 28, 13, 22, 0, -39, 39, 0, 0, 0, 0], [-327, -39, 18, 0, 17, 0, 69, -69, 0, 0, 0, 0], [-46, 0, 0, 0, 0, -48, 46, 46, -36, -11, 0, -24], [170, 64, -19, -6, -25, 0, -26, 26, 0, 0, 0, 0], [90, -8, 0, 8, 0, 25, -90, -90, 1, -3, -16, -13], [472, 42, 5, -10, 3, 0, -12, 12, 0, 0, 0, 0], [-184, -115, -8, 25, 18, 0, -9, 9, 0, 0, 0, 0], [-302, -56, 16, 14, 35, 0, 70, -70, 0, 0, 0, 0], [-61, 10, 0, -10, 0, -7, 61, 61, 19, 42, 20, 11], [114, -6, 21, 28, 27, 0, -6, 6, 0, 0, 0, 0], [-38, 10, 0, -10, 0, -16, 38, 38, -48, -62, 20, -12], [-5, -6, 0, 6, 0, 20, 5, 5, -10, 32, -12, 26], [-28, 18, 0, -18, 0, 7, 28, 28, 25, -8, 36, 1], [-124, 24, 14, 0, 9, 0, 60, -60, 0, 0, 0, 0], [-198, 50, -22, 14, -6, 0, -4, 4, 0, 0, 0, 0], [305, -23, -13, 16, -28, 0, 49, -49, 0, 0, 0, 0], [-38, -18, 0, 18, 0, 107, 38, 38, 7, 56, -36, 17], [50, 1, 0, -1, 0, -37, -50, -50, -19, 15, 2, 16], [-17, -10, 9, 6, 7, 0, 98, -98, 0, 0, 0, 0], [-456, 143, -20, -2, 5, 0, -8, 8, 0, 0, 0, 0], [66, 13, 0, -13, 0, -44, -66, -66, -42, 3, 26, -25], [637, 25, -15, -12, 12, 0, 25, -25, 0, 0, 0, 0], [-54, -3, 0, 3, 0, 30, 54, 54, 34, 51, -6, 11], [226, -38, 7, 2, -43, 0, -2, 2, 0, 0, 0, 0], [-28, 14, 0, -14, 0, 76, 28, 28, -8, 4, 28, -16], [-8, -10, 0, 10, 0, 1, 8, 8, -28, -16, -20, 12], [408, 73, -2, 25, 12, 0, 19, -19, 0, 0, 0, 0], [-44, -28, 1, -10, 19, 0, -28, 28, 0, 0, 0, 0], [82, 12, 0, -12, 0, 0, -82, -82, 40, 8, 24, -16], [-28, 16, 0, -16, 0, -66, 28, 28, -36, -74, 32, -6], [368, 44, -14, 4, 11, 0, -24, 24, 0, 0, 0, 0], [-10, -22, 22, 34, 13, 0, 14, -14, 0, 0, 0, 0], [-264, -148, -1, -1, -5, 0, -67, 67, 0, 0, 0, 0], [-44, -2, 0, 2, 0, -109, 44, 44, -30, -40, -4, 13], [6, 25, 0, -25, 0, 38, -6, -6, -10, 29, 50, -11], [74, -7, 0, 7, 0, 36, -74, -74, 54, 1, -14, -7], [526, -4, -17, -17, -37, 0, -49, 49, 0, 0, 0, 0], [-48, 18, 0, -18, 0, -37, 48, 48, 11, -24, 36, -3], [42, 8, 0, -8, 0, -32, -42, -42, -13, -66, 16, 4], [81, -8, -2, 4, -34, 0, -35, 35, 0, 0, 0, 0], [4, -3, 0, 3, 0, -63, -4, -4, 53, 19, -6, 4], [73, -11, 0, 11, 0, -79, -73, -73, 33, 50, -22, 25], [33, -16, 0, 16, 0, -8, -33, -33, 48, -26, -32, 6], [601, -72, 17, -4, 19, 0, -54, 54, 0, 0, 0, 0], [144, 178, 10, 4, 20, 0, -20, 20, 0, 0, 0, 0], [-31, -6, 0, 6, 0, 37, 31, 31, -21, -50, -12, -41], [-15, -1, 0, 1, 0, 85, 15, 15, -23, 48, -2, 5], [350, 42, -30, -12, -36, 0, 14, -14, 0, 0, 0, 0], [-142, 98, 7, -23, -13, 0, 75, -75, 0, 0, 0, 0], [179, 5, 11, 26, 16, 0, 59, -59, 0, 0, 0, 0], [-6, 18, 0, -18, 0, -28, 6, 6, 19, -30, 36, -60], [-67, 20, 29, 18, 7, 0, 56, -56, 0, 0, 0, 0], [-640, -65, -10, -10, -45, 0, -20, 20, 0, 0, 0, 0], [-127, -15, 0, 15, 0, -3, 127, 127, 13, 14, -30, 5], [356, -48, 8, -27, 30, 0, -39, 39, 0, 0, 0, 0], [-34, -16, 0, 16, 0, 79, 34, 34, -22, -2, -32, 25], [70, 18, 0, -18, 0, -98, -70, -70, 10, -70, 36, -46], [-185, -1, 29, -8, -26, 0, 35, -35, 0, 0, 0, 0], [-6, 5, 0, -5, 0, 31, 6, 6, 17, -83, 10, -14], [-732, 62, 11, -52, -26, 0, -64, 64, 0, 0, 0, 0], [32, -32, 0, 32, 0, 110, -32, -32, 3, 50, -64, 15], [-62, 14, 0, -14, 0, 49, 62, 62, -32, 92, 28, -12], [184, 30, -43, -4, -9, 0, -96, 96, 0, 0, 0, 0], [-24, 18, 0, -18, 0, 85, 24, 24, -24, 24, 36, 12], [-59, 3, 0, -3, 0, 45, 59, 59, 77, 38, 6, 1], [-82, 8, 0, -8, 0, 46, 82, 82, -26, 58, 16, -34], [398, -100, 33, 24, 19, 0, 26, -26, 0, 0, 0, 0], [-248, 48, 32, -7, 30, 0, -69, 69, 0, 0, 0, 0], [43, 4, 0, -4, 0, -52, -43, -43, 4, 30, 8, -58], [-42, 14, 0, -14, 0, 38, 42, 42, 59, -72, 28, -14], [2, 14, 0, -14, 0, -75, -2, -2, -71, -44, 28, -1], [-111, -2, -1, -56, -31, 0, -20, 20, 0, 0, 0, 0], [-18, -14, 0, 14, 0, 128, 18, 18, 29, 84, -28, 52], [-16, 4, 0, -4, 0, 131, 16, 16, 41, 4, 8, 21], [-213, 144, 18, -6, -14, 0, -54, 54, 0, 0, 0, 0], [382, 88, -21, -14, 38, 0, -2, 2, 0, 0, 0, 0], [29, -16, 0, 16, 0, -53, -29, -29, 61, -8, -32, -25], [662, 37, -1, -25, -41, 0, 19, -19, 0, 0, 0, 0], [498, -76, -12, 54, 33, 0, 42, -42, 0, 0, 0, 0], [551, -118, -35, 10, 7, 0, -10, 10, 0, 0, 0, 0], [-32, -32, 0, 32, 0, -65, 32, 32, 25, 38, -64, -23], [244, 82, -4, 32, 46, 0, 24, -24, 0, 0, 0, 0], [-234, -214, -3, -24, 7, 0, -18, 18, 0, 0, 0, 0], [2, -22, 0, 22, 0, 40, -2, -2, 37, 118, -44, -7], [-667, 110, 40, 18, -8, 0, 65, -65, 0, 0, 0, 0], [-88, -10, 0, 10, 0, -3, 88, 88, 57, 118, -20, 35], [363, 54, -32, 6, -72, 0, -36, 36, 0, 0, 0, 0], [78, 2, 0, -2, 0, 16, -78, -78, 30, -55, 4, 36], [606, -92, -36, 30, -10, 0, -18, 18, 0, 0, 0, 0], [146, -16, -12, -10, 34, 0, 2, -2, 0, 0, 0, 0], [-387, 98, -56, -38, 4, 0, -20, 20, 0, 0, 0, 0], [-26, 10, 0, -10, 0, 17, 26, 26, -63, -62, 20, -3], [322, 88, -36, 34, 14, 0, -146, 146, 0, 0, 0, 0], [-98, 2, 0, -2, 0, -55, 98, 98, -95, -61, 4, 15], [-1, 18, 0, -18, 0, 93, 1, 1, 12, -38, 36, -42], [-157, 10, 0, -10, 0, -30, 157, 157, 40, 46, 20, 6], [241, -13, -9, -39, -29, 0, -107, 107, 0, 0, 0, 0], [-198, 2, 0, -2, 0, -77, 198, 198, -39, -38, 4, 45], [-861, -140, 10, 36, 14, 0, -32, 32, 0, 0, 0, 0], [53, -4, 0, 4, 0, -33, -53, -53, 40, 4, -8, -4], [18, 20, 0, -20, 0, -71, -18, -18, -71, -92, 40, -37], [612, 104, 22, -17, 24, 0, 43, -43, 0, 0, 0, 0], [-924, -69, -8, 10, 41, 0, -68, 68, 0, 0, 0, 0], [556, -160, 30, -12, -14, 0, -70, 70, 0, 0, 0, 0], [-302, -105, -15, 6, -72, 0, -114, 114, 0, 0, 0, 0], [14, -17, 0, 17, 0, -76, -14, -14, 30, -107, -34, 33], [-23, 38, 0, -38, 0, 63, 23, 23, 4, -46, 76, -18], [447, 30, 17, 20, 27, 0, 20, -20, 0, 0, 0, 0], [216, -16, 11, 37, 43, 0, -61, 61, 0, 0, 0, 0], [612, -142, -55, 14, -22, 0, 56, -56, 0, 0, 0, 0], [14, -26, 0, 26, 0, 44, -14, -14, -61, 80, -52, 4], [-102, -16, 0, 16, 0, -86, 102, 102, 16, -30, -32, -14], [-208, 0, 0, 0, 0, 21, 208, 208, -79, -8, 0, -5], [-74, -20, 0, 20, 0, 25, 74, 74, -26, -46, -40, 67], [-512, -84, 37, 30, -24, 0, 60, -60, 0, 0, 0, 0], [750, 144, -22, -62, -72, 0, -18, 18, 0, 0, 0, 0], [-58, -2, 0, 2, 0, -121, 58, 58, 53, 74, -4, 13], [-158, -21, 0, 21, 0, 98, 158, 158, -30, 41, -42, 5], [186, -76, -34, 5, 68, 0, 185, -185, 0, 0, 0, 0], [-502, 59, -1, 21, 67, 0, -67, 67, 0, 0, 0, 0], [-812, 241, -18, 18, 19, 0, 88, -88, 0, 0, 0, 0], [-33, 33, 0, -33, 0, 138, 33, 33, -12, 40, 66, -60], [-84, 18, 0, -18, 0, -120, 84, 84, -57, -78, 36, -12], [-196, 116, -37, 14, 5, 0, -104, 104, 0, 0, 0, 0], [342, 194, -19, -2, -56, 0, -130, 130, 0, 0, 0, 0], [-95, -4, 0, 4, 0, -40, 95, 95, 54, 98, -8, 0], [-314, 120, -23, 53, -15, 0, -51, 51, 0, 0, 0, 0], [530, -72, 16, -14, 42, 0, -126, 126, 0, 0, 0, 0], [132, -18, 0, 18, 0, -48, -132, -132, 14, -58, -36, 16], [91, 28, 0, -28, 0, -47, -91, -91, 37, -4, 56, -29], [64, -6, 0, 6, 0, -66, -64, -64, 56, -31, -12, 70], [-348, 4, 38, -30, 56, 0, -140, 140, 0, 0, 0, 0], [-60, -234, 4, 49, 42, 0, 79, -79, 0, 0, 0, 0], [-62, 18, 0, -18, 0, -180, 62, 62, -2, -46, 36, -16], [124, -10, 0, 10, 0, 145, -124, -124, 107, 8, -20, 13], [378, -52, -31, 53, 49, 0, -169, 169, 0, 0, 0, 0], [413, 128, 60, -26, 76, 0, 2, -2, 0, 0, 0, 0], [-969, -149, 12, 36, 15, 0, 27, -27, 0, 0, 0, 0], [73, 1, 0, -1, 0, 71, -73, -73, -21, 56, 2, -9], [504, -182, -10, -29, -4, 0, -11, 11, 0, 0, 0, 0], [-58, 3, 0, -3, 0, 83, 58, 58, 5, 121, 6, -26], [649, -113, -47, -14, 32, 0, 137, -137, 0, 0, 0, 0], [-12, 6, 0, -6, 0, -148, 12, 12, 94, 39, 12, -48], [80, -4, 0, 4, 0, -170, -80, -80, -81, -50, -8, -61], [187, -48, 36, 42, 16, 0, -170, 170, 0, 0, 0, 0], [-58, 24, 17, -29, -51, 0, 33, -33, 0, 0, 0, 0], [36, 58, 0, -58, 0, -27, -36, -36, 5, 6, 116, -49], [-256, -66, 25, 22, 30, 0, -120, 120, 0, 0, 0, 0], [744, -134, 28, -20, -46, 0, 28, -28, 0, 0, 0, 0], [-42, 20, 0, -20, 0, 97, 42, 42, -21, 38, 40, 15], [12, -8, 0, 8, 0, -100, -12, -12, 36, 106, -16, 42], [-58, 26, 0, -26, 0, -180, 58, 58, 8, -56, 52, -28], [-1142, -112, -2, -62, -60, 0, -58, 58, 0, 0, 0, 0], [892, -110, -22, 75, 32, 0, 25, -25, 0, 0, 0, 0], [130, -10, 0, 10, 0, -122, -130, -130, -40, 62, -20, 6], [-92, 22, 0, -22, 0, -69, 92, 92, -7, -73, 44, -23], [-555, -141, 4, -14, -3, 0, 57, -57, 0, 0, 0, 0], [2, 24, 0, -24, 0, 207, -2, -2, 107, 25, 48, 13], [-78, -14, 0, 14, 0, -27, 78, 78, 44, -78, -28, 2], [-137, -106, 41, -4, -77, 0, 84, -84, 0, 0, 0, 0], [752, 0, 54, -25, -48, 0, 81, -81, 0, 0, 0, 0], [413, -246, 51, 20, 21, 0, -48, 48, 0, 0, 0, 0], [-53, -3, 0, 3, 0, -213, 53, 53, -41, 25, -6, -13], [86, 74, 23, -40, -119, 0, -242, 242, 0, 0, 0, 0], [865, 167, 15, -18, -80, 0, -103, 103, 0, 0, 0, 0], [606, 8, -62, 19, -60, 0, 193, -193, 0, 0, 0, 0], [-1110, -122, 40, 9, 38, 0, 139, -139, 0, 0, 0, 0], [-198, 18, 0, -18, 0, 29, 198, 198, -7, 18, 36, 9], [22, 24, 0, -24, 0, -9, -22, -22, -100, -106, 48, -59], [3, -7, 0, 7, 0, 30, -3, -3, -46, -126, -14, -32], [-29, 44, 40, -20, 104, 0, -145, 145, 0, 0, 0, 0], [92, 37, 16, 74, -49, 0, -80, 80, 0, 0, 0, 0], [-16, -38, 0, 38, 0, 101, 16, 16, -71, 122, -76, 77], [24, 0, 0, 0, 0, -57, -24, -24, -137, 98, 0, 23], [479, 120, -33, -6, 77, 0, 176, -176, 0, 0, 0, 0], [1052, -38, 48, -48, -118, 0, -136, 136, 0, 0, 0, 0], [-23, -31, 0, 31, 0, -89, 23, 23, -17, 68, -62, -49], [-18, 18, 0, -18, 0, 97, 18, 18, -100, 108, 36, 63], [22, 16, 0, -16, 0, 101, -22, -22, 139, -22, 32, 11], [-1271, 255, -41, 26, 12, 0, 93, -93, 0, 0, 0, 0], [-1007, -126, 74, 14, 102, 0, 117, -117, 0, 0, 0, 0], [151, -51, 0, 51, 0, 144, -151, -151, 58, 78, -102, 2], [236, 35, 0, -35, 0, -192, -236, -236, -30, -107, 70, -127], [-127, 19, 0, -19, 0, -89, 127, 127, -105, -29, 38, -33], [303, 15, 80, -4, 11, 0, -37, 37, 0, 0, 0, 0], [657, -86, -78, 18, -46, 0, 157, -157, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_2160_c_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_2160_3_c_p();".
// 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_2160_3_c_p(:prec:=12)
    chi := MakeCharacter_2160_c();
    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_2160_3_c_p();".
// 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_2160_3_c_p( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_2160_c();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<7,R![5395783936, 0, 975048384, 0, 65457468, 0, 2141348, 0, 36381, 0, 306, 0, 1]>,<17,R![-5972292, 413316, 148383, -3744, -888, 0, 1]>],Snew);
    return Vf;
end function;