
// Make newform 144.3.m.c in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_144_m();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_144_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_144_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_144_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 := [65536, 0, -24576, -4096, 2560, 3584, 1408, -512, -496, -128, 88, 56, 10, -4, -6, 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, 0, 0, 0, 0], [-20480, -4096, 2560, 3584, 1408, -512, -496, -128, 88, 56, 10, -4, -6, 0, 1, 0], [0, -24576, -4096, 2560, 3584, 1408, -512, -496, -128, 88, 56, 10, -4, -6, 0, 1], [-393216, -684032, -437248, -50688, 70400, 41984, -5728, -19568, -12176, -2696, 796, 618, 48, -134, -86, -19], [-180224, 966656, 976896, 195072, -146432, -142976, -22336, 38416, 30752, 9208, -1616, -2310, -588, 218, 268, 81], [-696320, -4229120, -3216896, -442368, 497536, 427584, 56272, -127072, -95144, -25888, 5874, 6524, 1602, -628, -739, -172], [-10231808, -3719168, 3177472, 2271744, 499456, -454272, -450272, -88528, 66544, 59096, 11868, -5530, -4536, -1234, 626, 347], [41648128, 25280512, -1679360, -6363648, -3471872, 299904, 1419520, 695024, 41728, -128632, -56664, -1498, 11268, 5990, -208, -697], [-4751360, -1869824, 1464832, 1115136, 241792, -166848, -197456, -38368, 31144, 27248, 5550, -2188, -1890, -484, 323, 188], [-7716864, -4317184, 741376, 1316352, 588288, -125056, -278656, -117584, 1472, 27688, 9944, -610, -2268, -1122, 88, 131], [38699008, 13115392, -12075008, -8612352, -2430464, 1527936, 1624576, 348848, -212864, -214456, -49752, 14414, 15444, 4766, -2080, -1093], [106496, -2506752, -2496512, -579072, 310784, 320896, 62976, -87984, -75648, -24072, 2872, 5042, 1356, -446, -624, -187], [29753344, 5275648, -13058048, -7193088, -842240, 1843584, 1347712, 87152, -312896, -204856, -25704, 23798, 14868, 2486, -2776, -1249], [-8830976, -3424256, 2265088, 1838592, 497152, -329856, -365312, -87376, 44800, 46568, 10248, -3874, -3564, -1090, 464, 275], [-84557824, -51503104, 5470208, 14565888, 6895616, -1079424, -3192640, -1471280, -66400, 294424, 123216, -1358, -26172, -14126, 76, 1405], [-41566208, -22089728, 7078912, 8446464, 3079936, -1020672, -1739552, -606448, 89104, 189176, 60708, -8710, -15336, -6454, 926, 1037]];
    Rf_basisdens := [1, 4096, 16384, 40960, 122880, 184320, 368640, 737280, 184320, 122880, 737280, 122880, 737280, 147456, 737280, 368640];
    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_144_m();"
function MakeCharacter_144_m()
    N := 144;
    order := 4;
    char_gens := [127, 37, 65];
    v := [2, 3, 4];
    // 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_144_m_Hecke();"
function MakeCharacter_144_m_Hecke(Kf)
    N := 144;
    order := 4;
    char_gens := [127, 37, 65];
    char_values := [[-1, 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], [1, 0, 0, 0, 0, 0, 0, 0, 0, 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, -1, 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, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, -1, 0, 0], [0, 1, -2, 0, -1, 1, -1, 0, 0, -1, -1, -1, 0, 1, 0, 0], [-1, 0, 2, -1, 0, 1, 3, 1, 0, -1, 1, 0, 0, 1, 1, 0], [0, 0, -2, -1, 0, -1, 0, 1, -1, 0, 1, 0, 2, 1, 1, -1], [0, -1, -3, -1, 0, -1, 0, 0, 2, 0, -2, 1, 1, 1, 1, -2], [-3, 2, 0, 1, 2, -1, -1, 1, 4, 0, -1, 0, 0, -3, 1, -2], [8, 4, -4, 0, -1, 0, 0, 0, 0, -3, 0, -4, -4, 0, 0, -4], [-6, 0, -3, 4, -1, -1, -2, 0, 2, 4, 0, 1, 4, 0, -3, 6], [1, 1, 4, -1, -3, 4, -8, 1, -2, -1, 0, 1, 6, 4, -3, -2], [-10, -2, 6, -3, 4, -3, -2, 1, 3, 2, -1, 0, 8, -1, -1, 1], [0, -1, -1, -3, 6, -5, 0, 2, -2, 2, 0, -1, -3, 3, 5, 2], [13, 0, 8, 1, 4, -3, -7, 1, -2, 0, 1, -2, -12, -5, 5, 0], [0, 4, 4, 0, -1, 0, -24, 0, 4, -5, 0, 4, -4, 0, 0, 0], [6, -11, 12, 3, 4, -4, 14, 0, 2, 9, 0, 0, 7, 1, -8, 2], [12, 0, 4, 0, -4, 8, -4, -4, 0, -4, -4, -8, -12, -4, -4, -4], [-6, 0, -16, 1, -2, -1, -2, -5, 1, 12, -5, 2, 2, -5, -11, -3], [18, 8, 4, -6, 4, 2, 22, -2, -4, -4, 2, 0, 8, -2, 2, 0], [-32, 2, -4, 0, -2, 2, -2, 0, 0, -2, -2, -2, 0, 2, 0, 0], [8, -2, -6, 0, -2, -2, -6, -6, -4, -10, 0, -2, -26, -4, 10, -2], [-1, 3, 12, -3, -5, -4, 8, -1, 0, -11, 0, 3, -2, 12, 3, 0], [11, 4, -8, 5, 1, 1, 9, -3, 0, 0, 3, 0, 2, -11, 7, -4], [0, -10, -2, 10, -14, 2, 10, -8, 0, -2, 0, -10, -6, -2, -2, 0], [0, -10, 2, -10, 4, -6, 8, 0, 4, 4, 8, 10, 18, 2, 14, 0], [0, 7, -4, -9, -16, 2, 0, 2, -2, -7, -2, 0, 5, 1, 6, 2], [24, -11, -22, 8, 1, -11, -9, 0, 2, 9, -1, 11, 0, 1, 0, -2], [4, 0, 8, 0, 12, -12, 4, 0, -4, 2, 0, 4, -20, -12, 8, -4], [-32, 0, 2, 1, 4, 1, 32, 7, 5, -8, 7, 8, -10, -9, -9, 13], [14, 8, -16, 8, -20, 12, -16, 0, -4, 4, -12, -8, 0, 8, -4, 8], [-15, -15, -12, 15, -17, -4, -32, -7, 6, 9, 0, -15, 22, -12, -11, 6], [10, -16, 0, -2, 12, -18, 30, -2, 16, 8, 2, 0, 4, -2, 2, 0], [16, 19, 11, 1, 24, 11, 0, 6, 18, 0, 0, 19, -47, -9, 5, -2], [18, 0, 36, -6, 24, -10, -6, -2, 8, 4, -2, 32, -8, -2, 14, 0], [-60, 7, 16, 1, 24, 0, -44, -8, -4, 5, 8, 0, 25, -17, 0, -4], [16, 11, -50, 0, -21, 3, -15, 0, 6, -5, -15, -11, -24, 15, -16, -14], [-4, 0, -16, 13, -18, 7, -12, 3, -3, 32, 3, -26, 6, 3, -7, 13], [29, 14, 0, -19, 8, -1, 31, 13, 12, -16, -13, 0, -12, 17, 1, 2], [-56, -14, -12, 12, 9, -10, -10, 0, 0, 7, -2, 14, 0, -2, -4, 4], [46, 0, 9, -2, 3, 1, -38, 14, 0, 28, 14, 1, -8, -2, 3, 12], [-50, -32, 36, 6, 10, -10, -22, 10, 12, 28, -10, 0, 40, -6, -18, 8], [-54, 12, 22, -5, -20, -7, -30, 5, 19, 0, -5, 0, 10, -7, -5, -7], [-18, -6, -12, 18, 19, -8, 56, -2, 24, 35, 0, -6, 8, -24, -10, 12], [-4, 22, -18, 22, -38, 4, -16, 0, -10, 22, -6, -22, -10, -6, 8, -8], [-22, 31, 20, -7, -36, 12, -30, 8, 2, -17, -8, 0, -27, 19, -16, -6], [-64, -13, 6, 8, 25, -13, 1, 0, -6, -3, 17, 13, 24, -9, 24, 6], [-2, 0, 24, 2, 28, -14, 26, 10, 32, 8, -10, 0, 4, -6, -10, -8], [23, -21, 4, 13, -3, 28, 120, 23, -4, 23, 0, -21, -18, 12, -5, 4], [101, 12, -56, -5, -9, 15, 55, 3, -16, -24, -3, 0, -34, 11, 25, 4], [-30, 0, -50, 7, 20, 9, -70, 13, 3, -12, -13, 0, -34, 5, 19, 1], [16, -6, -22, -22, 22, 6, -26, 4, -40, 18, 0, -6, 14, 6, 10, -12], [-26, 6, -8, -2, 3, -20, -56, 14, 20, 3, 0, 6, 36, -12, -6, 16], [-28, -20, 64, 4, 54, -6, 16, 0, 2, -14, -2, 20, 16, -20, 2, 12], [-125, 0, -86, -5, -48, 29, 103, -27, -8, -9, -27, -40, 40, 13, -43, -40], [-10, -2, -46, -14, 26, -10, 0, 0, 8, -38, 8, 2, -6, 14, 2, -16], [-48, -20, 20, 4, -4, -28, 16, 0, 0, 44, 24, 20, 28, -20, 36, -8], [-72, 0, -17, 14, -17, 3, 40, -14, 2, 32, -14, -13, 36, 18, -3, 2], [17, -11, -20, -13, -17, 4, -72, 1, -32, -19, 0, -11, -6, 4, 13, -8], [58, 28, -54, -35, -12, -9, 50, -5, 5, -40, 5, 0, -34, 15, 37, -1], [-16, -6, -38, 2, -26, -10, -50, -4, 0, -14, 0, -6, 30, -34, -6, 4], [44, 0, -28, -32, 20, -8, -36, -4, 8, -22, -4, 56, 20, -4, -20, -28], [82, -25, -12, 25, -36, -4, 74, 8, 14, 19, -8, 0, -3, -13, 0, -2], [-2, 0, -28, 22, -40, 6, -38, -6, -4, -4, 6, 0, -56, 10, -2, -8], [64, 16, 100, -4, 4, 8, 36, 0, -8, 12, 12, -16, -28, -32, -20, 0], [-48, 42, 14, -24, 70, -46, 44, -10, 24, 30, 0, 42, 58, -4, -2, 6], [-24, 0, 59, 2, 39, -13, 24, 14, 26, -16, 14, 63, -12, -10, 5, 42], [-22, 0, -68, 34, -56, 22, -30, -18, -8, -16, -18, -72, 24, 6, -34, 8], [-90, 6, 22, -10, -14, 12, 8, 0, -22, 6, 42, -6, -42, 2, -48, 28], [-119, 0, 58, -15, 24, -13, 165, 27, -12, -37, 27, 4, -24, 7, 51, 0], [90, 0, 92, -25, 58, -11, -34, 13, 19, 20, 13, 74, -50, -19, 23, 7], [34, -22, -34, 22, -14, 22, -48, 0, -12, 10, -20, 22, 6, 26, -38, 56], [-64, 38, 20, -16, 48, 30, 10, 0, -4, -92, -6, -38, -8, 6, 0, -4], [27, -45, -76, 37, 5, 12, -152, -21, -6, 35, 0, -45, -86, -68, 15, 2], [-12, -74, -94, 33, -80, 9, -92, -23, -57, 18, 23, 0, -36, 15, 23, 25], [-71, 0, -20, 13, -28, 13, 21, -15, 10, -6, -15, -6, 84, 47, -3, 8], [-2, 18, -28, -30, 33, 16, 72, -34, -52, 33, 0, 18, 80, -16, -18, -40], [-78, -89, -56, 19, -20, -38, -54, -42, -20, 47, 42, 0, 65, -47, 42, 16], [108, 0, 48, 31, 14, -11, -156, 1, 27, -16, 1, 34, 34, 17, 11, 59], [0, -27, -65, 5, -32, -27, -16, 0, 14, 48, -6, 27, -69, 11, -69, -14], [8, -74, -74, 18, -32, 22, 20, 36, -40, 56, 0, -74, 58, -18, -14, 16], [223, 84, -128, -23, 5, 21, 133, 41, 40, -88, -41, 0, -142, 33, 59, -20], [-46, -24, 22, 11, 84, -43, 10, -7, 51, 24, 7, 0, -2, -15, -9, -15], [68, -20, -8, 24, -59, 60, -200, -36, -32, -47, 0, -20, -112, -12, 8, -36], [28, -48, 56, 40, 68, -72, 24, 0, 20, 44, -8, 48, 32, -64, 56, -44], [112, 25, 42, 32, 27, -39, 27, 0, -18, 7, 43, -25, 0, -59, 64, -46], [-163, 0, 18, 37, -8, -1, 105, -25, 20, 7, -25, 4, 40, 19, -1, 32], [16, 19, 81, 39, 10, 11, 0, 0, -18, 10, -14, -19, 5, -39, 13, 10], [-24, 54, -18, -18, 24, 14, -48, -8, 16, 8, 0, 54, 82, -54, -38, -20], [-50, 0, 3, -30, -19, 27, 90, 10, -12, -4, 10, -21, 24, 34, 17, -32], [-5, 59, 28, 5, 25, 4, -144, 35, 82, -25, 0, 59, -46, -36, -9, 18], [-257, 28, 64, 17, -31, -11, -203, 17, 56, 16, -17, 0, 26, -39, -21, -28], [18, 38, 12, -30, -58, 44, 256, 42, -8, -70, 0, 38, 56, 4, -26, -16], [-8, 35, -54, -8, -101, 3, -3, 0, 0, 55, 5, -35, -32, 11, 0, -32], [240, 0, 20, -32, 24, -28, -192, 4, -28, -52, 4, 4, 0, 16, 60, -56], [-72, 88, 4, -68, 78, -28, -24, -16, 36, -68, 16, 0, -60, 32, 16, -24], [256, -34, -92, 0, 36, -42, -14, 0, 20, -16, 2, 34, 136, 14, 144, -28], [-74, 0, 115, -16, 45, -19, 178, 28, -26, 12, 28, -17, -116, -28, 79, -14], [-16, -49, -89, 57, 10, -5, 0, -18, 30, 70, 0, -49, -27, -97, -11, 22], [179, 0, -112, -29, -64, 35, -185, 19, -26, 10, 19, -58, 80, 45, -25, -36], [114, 0, -62, -9, 8, -41, -122, -27, -29, -20, -27, -8, 6, -11, 13, -65], [195, -14, -92, 79, -20, 29, 97, 35, 24, 12, -35, 0, -72, -33, 23, -18], [-8, 0, -85, -28, -41, 33, -56, 12, 24, -48, 12, 43, 176, 84, -41, 8], [-21, 16, -80, 25, 39, 9, -87, -23, -16, -24, 23, 0, -98, 9, 23, -16], [0, -15, 1, -29, -10, -35, -176, -26, -54, -30, 0, -15, 3, 45, 35, -10], [-100, 0, 60, 8, 60, -32, 92, -36, 32, -22, -36, 88, -36, -36, -4, 4], [-2, -38, 42, -22, 54, -12, 24, 0, -18, -14, 70, 38, 90, -2, 64, 44], [126, 0, -104, 22, -104, 70, -154, -34, -20, 38, -34, -132, 24, 18, -58, -32], [46, 64, 168, -32, 4, 76, 48, 0, -28, -52, 12, -64, 24, -16, 12, 40], [424, -96, 76, 8, 53, -60, 28, 0, 12, 79, 28, 96, -36, -36, -72, 24], [40, -34, -6, 48, -82, 94, -10, -54, -36, 6, 0, -34, 6, -20, -54, -50], [-11, 77, 76, -53, 141, -36, 80, 29, 30, 39, 0, 77, -10, 52, 25, 6], [-116, 38, 78, -45, -64, 31, -100, -49, -99, -18, 49, 0, 56, 29, -31, 19], [-16, 88, 32, -52, -4, -24, -398, -44, 0, -100, 0, 88, 16, -4, 8, -36], [160, 0, 56, 32, 0, 24, -128, -40, 8, 62, -40, -40, -128, -64, -24, 0], [-152, -47, -58, -8, 31, -7, -25, 0, 48, -17, -81, 47, 40, 33, 0, -8], [-8, 73, -29, -7, -20, 5, 16, 0, 42, -44, -82, -73, -81, -9, -13, -110], [123, -78, 64, -5, 92, -87, 297, -5, 84, 80, 5, 0, 188, -105, 23, -2], [-344, -16, -164, 16, -137, -4, -68, 0, -52, 101, 92, 16, 60, 52, 48, 64], [94, 0, 107, 78, 37, -9, -86, -2, 24, 12, -2, -21, -208, -122, -27, 100], [-76, -12, 0, -112, 68, -4, -84, 16, -40, -56, -16, 0, -28, 136, -12, 60], [-144, -82, 134, 15, -16, -45, -48, -29, 5, 74, 29, 0, 56, 17, -83, 11], [308, 28, 92, 20, 92, -20, 40, 0, -36, -60, 72, -28, -28, -60, 20, -12], [-100, 73, 136, -37, 88, 20, -20, -4, -16, -5, 4, 0, 111, -27, -36, -8], [-47, 0, 58, 9, 88, -37, 13, 51, 68, 163, 51, 164, -40, -65, -53, 128], [-73, -6, 120, -1, -28, 5, -35, 55, 44, 24, -55, 0, 20, 35, -77, 6], [-228, 0, -167, 34, -131, 101, 84, -26, 42, 24, -26, -51, 180, 70, -141, 50], [-114, -60, 66, -55, -76, -53, 22, -33, -11, 44, 33, 0, 190, -45, 17, 31], [50, 38, -4, 10, 124, 20, -512, 10, 48, 56, 0, 38, -168, -52, 30, 0], [-88, -67, -198, 32, -83, -19, -97, 0, -58, 85, 103, 67, 88, 65, 40, 106], [-46, 0, -206, 45, -156, 81, -90, -41, -7, -28, -41, -140, 162, 71, -101, -3], [300, -96, -124, 16, 2, -32, 308, -44, -36, 44, 44, 0, 116, -92, 100, 24], [-424, -46, -72, -48, 131, -74, 42, 0, 40, -91, 42, 46, -44, 6, -16, -68], [49, -11, -4, -61, 13, 44, -160, -55, -152, 19, 0, -11, 74, 68, 5, -80], [62, 32, 62, -41, 100, -39, 166, -35, 19, -4, 35, 0, 62, -27, 3, -15], [0, 19, 139, -11, 42, -33, 88, 22, 30, -10, 0, 19, -63, 131, 33, 22], [12, 26, -254, 82, -38, 44, -160, 0, -46, -66, -34, -26, 58, 78, 40, 64], [24, -37, -92, 23, 0, -50, -8, -2, 66, -11, 2, 0, -167, 49, 10, -18], [3, 22, -12, 3, -46, 45, -31, -25, -80, -4, 25, 0, 68, -37, 23, 10], [216, 0, 143, -60, 55, 45, -88, 44, 36, 96, 44, 87, -88, -20, 3, 20], [144, 37, -27, -1, 34, 25, 408, 22, 34, -122, 0, 37, -417, -63, 119, -2], [193, 0, 100, 13, 12, 29, -99, 25, -6, -42, 25, -54, -180, -73, 5, 32], [220, -157, 188, 27, -120, 18, 268, -22, -114, 125, 22, 0, 185, 29, -122, 74], [488, -23, -122, 56, 21, -7, -81, 0, -28, -23, 7, 23, -32, 25, -48, 44], [-358, 0, -228, 38, -108, 30, 242, 42, -20, 184, 42, -108, 76, -2, -110, 60], [-192, 0, -42, 63, -52, 55, 160, -7, 19, -24, -7, -80, -118, -87, -111, 75], [-448, -30, -32, 12, -102, -22, -14, 0, 56, 130, -102, 30, -28, 2, -36, -48], [-292, -14, 122, 17, 32, 45, -276, 29, -37, 46, -29, 0, 120, -17, -61, 21], [-128, -33, 23, 85, 72, -41, 40, -66, 82, 192, 0, -33, 165, -29, -87, 30], [-43, 0, 228, -67, 72, 9, 161, 81, 22, -16, 81, 102, 40, 91, 133, 36], [130, 118, 44, -90, -5, -48, 88, -30, -8, -301, 0, 118, -424, 16, 178, -36], [14, 0, 28, -25, 138, -123, -38, 29, 27, 180, 29, 202, -2, -51, 23, 31], [306, -18, 194, 58, 174, -66, 64, 0, -24, -34, 56, 18, 106, -122, 154, -24], [-497, 26, 68, -69, 112, -31, -379, 15, 40, -4, -15, 0, 136, -37, 19, 6], [176, 128, -8, 80, -198, 136, -104, 0, -88, 46, -40, -128, -72, 24, -80, 96], [-1, 0, 172, 15, 0, 75, 67, 27, 42, 60, 27, -6, -80, 1, 7, 84], [-58, 14, 152, -26, 71, -36, -408, 14, 0, 79, 0, 14, 140, 164, -22, 12], [-8, 85, 86, -88, -57, 61, 75, 0, 12, -41, 3, -85, -88, 13, -64, -36], [-136, -43, -121, 137, -86, -51, -112, 0, -46, 154, 6, 43, -93, -25, -85, 38], [64, 112, 80, -80, 200, -32, -194, 80, 48, -8, 0, 112, -208, 48, 96, 16], [-314, 0, 83, -82, 129, -73, 450, -18, -12, -20, -18, 131, -128, -74, 53, -112], [-354, 152, -44, -34, -22, 86, -486, 18, -52, -116, -18, 0, -160, 82, -2, -16], [-16, -47, -135, 79, 138, 13, -88, -46, 42, 214, 0, -47, -37, -167, -29, 10], [-296, 33, -186, 96, 107, -39, -89, 0, -4, -133, -49, -33, 48, -7, 120, -68], [459, 0, -122, -21, 56, -111, -465, 1, -52, 61, 1, 28, -48, -75, 9, -72], [368, -9, -259, 19, -2, 63, -144, 0, 6, -114, -94, 9, -47, 125, -119, 66], [-96, 128, 156, -244, 30, 128, 172, 0, 40, -230, 36, -128, -52, 72, -52, -40], [-33, -21, -92, 13, 151, -60, -256, -57, 0, 145, 0, -21, -26, -84, 27, 8], [242, 6, 110, 37, -68, -43, 298, 17, 103, 22, -17, 0, -120, 47, -97, -43]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_144_m_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_144_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_144_3_m_c(:prec:=16)
    chi := MakeCharacter_144_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(997) - 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_144_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_144_3_m_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_144_m();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<5,R![2117472256, 5171462144, 6315081728, 4258177024, 1663893504, 283883520, 12517376, 4026368, 6221952, 518400, 512, -8064, 6656, -32, 0, 0, 1]>],Snew);
    return Vf;
end function;