
// Make newform 1344.4.b.g in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1344_b();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1344_b_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_1344_4_b_g();".
// 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_1344_4_b_g();".
// 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 := [262144, -32768, -8192, -3072, 0, 448, -448, 56, 0, -6, -2, -1, 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], [-24576, 65536, -44032, 15360, -7744, -1216, -200, -128, 122, -2, -1, 1], [1671168, 372736, 74752, 8960, 3904, 5792, -1048, 40, -26, -74, -47, -13], [786432, 120832, 31744, -1408, -2240, 1232, -904, 172, -50, -32, -11, -7], [241664, -142336, 44032, 9536, 640, -1880, -184, -130, -88, -49, -8, 3], [360448, -401408, 195584, -95744, 38336, -9472, -488, 1744, 226, 190, -85, -3], [425984, -262144, 97280, 66048, 12480, -896, 184, 1008, -102, -74, -1, -7], [-598016, -115712, -22528, -4160, -1984, -1480, 688, 58, 10, 19, 11, 6], [561152, 349184, 80896, 9536, -4736, 3496, -856, -130, -16, -25, 4, -9], [589824, 200704, 13312, 2304, 3264, 736, -264, -136, 18, -30, -13, -7], [2260992, 393216, 150528, 13824, -2624, 6912, -1704, -240, -14, -114, -29, -27], [-2686976, -708608, -158720, -14080, -4544, -6176, 1928, 280, 174, 70, 61, 31]];
    Rf_basisdens := [1, 8192, 49152, 24576, 12288, 49152, 16384, 12288, 12288, 8192, 16384, 16384];
    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_1344_b();"
function MakeCharacter_1344_b()
    N := 1344;
    order := 2;
    char_gens := [127, 1093, 449, 577];
    v := [1, 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_1344_b_Hecke();"
function MakeCharacter_1344_b_Hecke(Kf)
    N := 1344;
    order := 2;
    char_gens := [127, 1093, 449, 577];
    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 := 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 := 4;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0], [-1, 0, -1, 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, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0], [-7, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, -1, -1, -1, 0, 0, 1, -1, -1, 0, 0], [-17, 0, -2, 1, 0, 1, 1, 0, 1, 0, 0, 0], [32, 0, 3, -1, -1, -2, 1, 0, -1, 0, 0, 0], [19, 0, -1, 2, 0, -1, 1, 0, -1, 0, 0, 0], [0, 0, 1, 1, -3, 0, 0, -5, -3, -1, 1, 0], [0, 0, -3, -3, 0, 0, 0, -9, 0, 3, 1, -3], [-23, 0, 1, -2, 2, 1, -2, 0, -1, 0, 0, 0], [2, 2, -1, -1, 0, 2, -1, 0, 2, 0, 0, 0], [103, -4, 7, -8, -1, 1, -2, 0, 2, 0, 0, 0], [0, 0, 2, 2, -3, 0, 0, 18, -3, -5, 8, -6], [0, 0, -3, -3, -3, 0, 0, 15, -3, -1, 9, -3], [0, 0, -3, -3, 2, 0, 0, -23, 2, 9, -2, 0], [0, 0, 10, 10, 6, 0, 0, 6, 6, 0, -2, 12], [0, 0, -11, -11, 3, 0, 0, -24, 3, -16, -2, 0], [-87, -2, -3, 12, 0, -9, 0, 0, -9, 0, 0, 0], [0, 0, 21, 21, 3, 0, 0, 37, 3, 7, -15, 0], [0, 0, 8, 8, -9, 0, 0, -42, -9, -8, 2, 6], [0, 0, 22, 22, -6, 0, 0, 29, -6, 2, -2, 24], [-150, 2, 7, -9, 7, 2, 5, 0, -5, 0, 0, 0], [0, 0, -10, -10, 3, 0, 0, -6, 3, -20, -4, -5], [172, 0, -22, 26, -3, -4, 4, 0, -1, 0, 0, 0], [-159, 0, -39, 36, 4, 3, 0, 0, -1, 0, 0, 0], [0, 0, 1, 1, -9, 0, 0, -66, -9, -2, 16, -6], [-461, 6, -29, 22, -7, 7, -2, 0, 14, 0, 0, 0], [214, 2, -26, 40, -8, -14, -2, 0, -6, 0, 0, 0], [-332, 6, 0, -2, 10, 2, 2, 0, -8, 0, 0, 0], [-436, -10, -49, 65, -10, -16, -1, 0, -6, 0, 0, 0], [0, 0, -9, -9, -12, 0, 0, 42, -12, -6, -2, -6], [0, 0, 30, 30, -3, 0, 0, -54, -3, -5, 12, 18], [0, 0, 29, 29, -3, 0, 0, -39, -3, 5, 11, 27], [-136, -4, -16, 20, -14, -4, 2, 0, 10, 0, 0, 0], [0, 0, -6, -6, -18, 0, 0, -55, -18, -48, 30, -36], [0, 0, 62, 62, -5, 0, 0, 110, -5, 24, -26, -3], [0, 0, 72, 72, 12, 0, 0, -36, 12, 31, -36, 0], [0, 0, 63, 63, -12, 0, 0, -63, -12, 5, -18, -10], [792, -11, -70, 53, 8, 17, 6, 0, 9, 0, 0, 0], [-27, 20, -72, 57, 4, 15, 3, 0, 11, 0, 0, 0], [256, 18, 23, -35, 12, 12, 0, 0, 0, 0, 0, 0], [0, 0, 9, 9, 18, 0, 0, -183, 18, -7, -37, -45], [-156, 12, -29, 39, -8, -10, -4, 0, -2, 0, 0, 0], [118, -20, -134, 142, -1, -8, -2, 0, -7, 0, 0, 0], [0, 0, 78, 78, -15, 0, 0, -36, -15, 15, 60, 18], [-767, -10, 1, -14, 0, 13, 4, 0, 13, 0, 0, 0], [0, 0, 97, 97, 18, 0, 0, -177, 18, -25, -14, 20], [0, 0, 96, 96, -27, 0, 0, -90, -27, 2, 6, -18], [314, -6, -46, 8, 19, 38, 2, 0, 19, 0, 0, 0], [0, 0, 79, 79, 27, 0, 0, -185, 27, -15, -29, -36], [0, 0, 5, 5, 29, 0, 0, 121, 29, -53, 12, -6], [0, 0, -16, -16, 24, 0, 0, -67, 24, 14, 20, -72], [-684, -26, 1, 15, 7, -16, -19, 0, -23, 0, 0, 0], [1065, 14, -109, 110, -20, -1, -1, 0, 19, 0, 0, 0], [-63, 20, -27, 24, 22, 3, 0, 0, -19, 0, 0, 0], [-673, -15, 61, -31, -12, -30, -24, 0, -18, 0, 0, 0], [0, 0, 88, 88, -30, 0, 0, -19, -30, -46, 4, -60], [1741, -17, 75, -89, -2, 14, -4, 0, 16, 0, 0, 0], [949, -40, 19, -8, -16, -11, -2, 0, 5, 0, 0, 0], [0, 0, 20, 20, -6, 0, 0, 192, -6, 20, 32, 96], [-1080, -2, 21, 15, -10, -36, -3, 0, -26, 0, 0, 0], [0, 0, -89, -89, 33, 0, 0, -39, 33, 93, -97, 117], [-152, -16, -138, 108, -26, 30, -2, 0, 56, 0, 0, 0], [0, 0, 62, 62, -26, 0, 0, -106, -26, 34, -20, -45], [0, 0, -102, -102, -15, 0, 0, 78, -15, -11, -36, 42], [0, 0, 61, 61, 9, 0, 0, 301, 9, 27, -11, -72], [0, 0, 63, 63, -24, 0, 0, -21, -24, 83, 18, -82], [-2158, -30, 63, -49, -16, -14, -20, 0, 2, 0, 0, 0], [-2414, -64, -110, 112, 21, -2, -28, 0, -23, 0, 0, 0], [0, 0, 37, 37, 48, 0, 0, -45, 48, 203, -99, 9], [-1753, 44, -79, 92, -38, -13, 44, 0, 25, 0, 0, 0], [3315, 48, 36, -45, 8, 9, 21, 0, 1, 0, 0, 0], [0, 0, -84, -84, 30, 0, 0, 450, 30, 61, -48, -36], [-2554, -2, -82, 20, 36, 62, -46, 0, 26, 0, 0, 0], [0, 0, -188, -188, 45, 0, 0, -642, 45, -28, -2, -78], [2983, 28, -209, 250, -28, -41, 4, 0, -13, 0, 0, 0], [2063, -16, -43, 44, 44, -1, 45, 0, -45, 0, 0, 0], [0, 0, 129, 129, -33, 0, 0, 303, -33, 21, 132, -94], [0, 0, 52, 52, 18, 0, 0, -348, 18, 78, -128, 72], [-4676, 34, 143, -167, -48, 24, 24, 0, 72, 0, 0, 0], [0, 0, 68, 68, -20, 0, 0, 152, -20, -88, -2, -57], [1061, -68, 71, 26, -22, -97, 2, 0, -75, 0, 0, 0], [-2938, -8, 298, -296, -39, -2, 50, 0, 37, 0, 0, 0], [0, 0, -296, -296, 12, 0, 0, 131, 12, -136, 88, 84], [0, 0, -217, -217, -6, 0, 0, -72, -6, -212, 86, 30], [-4974, -70, -210, 264, 9, -54, 42, 0, -63, 0, 0, 0], [-5929, 72, -301, 290, 10, 11, -4, 0, 1, 0, 0, 0], [0, 0, 57, 57, 105, 0, 0, -366, 105, 98, -22, 60], [0, 0, 64, 64, -15, 0, 0, -300, -15, 62, 124, -59], [0, 0, -197, -197, -57, 0, 0, -159, -57, -103, 15, 21], [3371, 64, -217, 110, 106, 107, -46, 0, 1, 0, 0, 0], [0, 0, -190, -190, 66, 0, 0, 53, 66, 198, -82, -144], [0, 0, -389, -389, -60, 0, 0, 295, -60, -37, 103, -24], [-4160, -34, 54, -8, 52, -46, -28, 0, -98, 0, 0, 0], [-59, -56, 363, -348, -18, -15, 9, 0, 3, 0, 0, 0], [0, 0, 113, 113, 93, 0, 0, 477, 93, 97, -97, -213], [3950, 50, 233, -259, 68, 26, 23, 0, -42, 0, 0, 0], [-413, 10, -209, 160, 50, 49, -92, 0, -1, 0, 0, 0], [-5191, 82, 287, -232, 44, -55, 50, 0, -99, 0, 0, 0], [0, 0, -41, -41, 18, 0, 0, -921, 18, -25, 73, -33], [0, 0, 36, 36, -6, 0, 0, -372, -6, -90, 84, 60], [6268, -50, -320, 334, -40, -14, -44, 0, 26, 0, 0, 0], [0, 0, -69, -69, -102, 0, 0, 181, -102, -181, 147, -180], [0, 0, 261, 261, -138, 0, 0, -747, -138, -151, -18, 152], [0, 0, -182, -182, -33, 0, 0, -336, -33, 274, 76, -150], [-6310, -16, 57, -97, -16, 40, -44, 0, 56, 0, 0, 0], [1786, 48, -102, -24, 3, 126, 66, 0, 123, 0, 0, 0], [-1168, 66, 458, -574, 80, 116, 8, 0, 36, 0, 0, 0], [-6880, -46, -200, 98, 36, 102, 30, 0, 66, 0, 0, 0], [0, 0, -171, -171, -171, 0, 0, 150, -171, 14, 264, -246], [4960, 28, -68, -110, 60, 178, -98, 0, 118, 0, 0, 0], [4541, 43, -107, 17, 12, 90, 96, 0, 78, 0, 0, 0], [-482, 100, -308, 334, -10, -26, 46, 0, -16, 0, 0, 0], [4210, -30, 553, -527, -6, -26, 1, 0, -20, 0, 0, 0], [0, 0, 258, 258, -47, 0, 0, 890, -47, 76, -16, 183], [0, 0, -22, -22, 111, 0, 0, -978, 111, -121, -136, 222], [326, 121, -80, 169, -78, -89, 50, 0, -11, 0, 0, 0], [0, 0, 146, 146, -30, 0, 0, -121, -30, 20, 110, -108], [0, 0, 168, 168, 102, 0, 0, -1092, 102, -216, -18, -29], [-11882, 90, 612, -632, -20, 20, 68, 0, 40, 0, 0, 0], [-4162, 50, 623, -553, -112, -70, 5, 0, 42, 0, 0, 0], [-5814, 212, 64, 10, -5, -74, 42, 0, -69, 0, 0, 0], [-12617, 88, -413, 346, 62, 67, -44, 0, 5, 0, 0, 0], [3792, 154, -305, 285, 73, 20, 59, 0, -53, 0, 0, 0], [0, 0, -550, -550, 39, 0, 0, 576, 39, -173, -112, -330], [0, 0, -315, -315, -177, 0, 0, -189, -177, -257, 45, 81], [0, 0, 307, 307, 120, 0, 0, 573, 120, 113, -218, 182], [0, 0, -449, -449, -108, 0, 0, -744, -108, -80, 132, -240], [1332, 40, -206, 262, 49, -56, -102, 0, -105, 0, 0, 0], [0, 0, -183, -183, 204, 0, 0, -719, 204, 289, -51, 48], [0, 0, 174, 174, 3, 0, 0, 888, 3, -488, 96, 186], [0, 0, 366, 366, 96, 0, 0, 515, 96, 150, 174, 228], [6440, -44, 622, -430, -96, -192, 54, 0, -96, 0, 0, 0], [0, 0, -282, -282, -168, 0, 0, 575, -168, 208, 6, -108], [6313, -222, 559, -608, -20, 49, -2, 0, 69, 0, 0, 0], [11922, -78, 308, -408, 38, 100, -8, 0, 62, 0, 0, 0], [-5814, -198, -393, 303, 16, 90, -93, 0, 74, 0, 0, 0], [0, 0, 11, 11, 36, 0, 0, -1902, 36, -22, -160, 36], [0, 0, 46, 46, -11, 0, 0, 830, -11, -308, 114, -195], [0, 0, -226, -226, 3, 0, 0, -924, 3, 189, 200, 222], [4056, 24, 18, 150, -138, -168, -48, 0, -30, 0, 0, 0], [0, 0, 874, 874, -57, 0, 0, 1362, -57, 297, -44, 270], [0, 0, -107, -107, 18, 0, 0, 673, 18, -467, -83, 156], [-16539, -19, -367, 291, -46, 76, 28, 0, 122, 0, 0, 0], [0, 0, 339, 339, -16, 0, 0, -395, -16, 193, 466, 54], [8848, 84, 124, -188, 87, 64, 38, 0, -23, 0, 0, 0], [0, 0, 221, 221, -90, 0, 0, 655, -90, 93, 293, -36], [0, 0, -653, -653, 117, 0, 0, 807, 117, 95, 77, -225], [-25492, -104, -244, 140, 124, 104, 50, 0, -20, 0, 0, 0], [0, 0, -39, -39, -126, 0, 0, -1797, -126, -65, 25, -279], [0, 0, -47, -47, -103, 0, 0, 1381, -103, -289, -244, -54], [0, 0, 9, 9, 105, 0, 0, 828, 105, 172, -220, -222], [0, 0, 885, 885, 27, 0, 0, -701, 27, 203, -27, -132], [0, 0, -306, -306, 57, 0, 0, -876, 57, 84, 264, 78], [0, 0, -338, -338, 18, 0, 0, 239, 18, -536, 190, -348], [0, 0, -98, -98, -69, 0, 0, -318, -69, -172, -146, 229], [-1854, -42, -450, 444, 122, 6, -42, 0, -116, 0, 0, 0], [0, 0, 193, 193, 75, 0, 0, 972, 75, -376, -2, -48], [-17952, 132, 852, -930, -171, 78, 54, 0, 249, 0, 0, 0], [4533, 292, -9, 42, -26, -33, 186, 0, -7, 0, 0, 0], [4506, -144, 330, -204, -6, -126, -90, 0, -120, 0, 0, 0], [0, 0, -721, -721, -12, 0, 0, 1314, -12, -350, 18, -126], [0, 0, 454, 454, -207, 0, 0, -2058, -207, -179, -68, -126], [-4782, -23, -530, 169, 137, 361, -80, 0, 224, 0, 0, 0], [0, 0, 432, 432, -72, 0, 0, 77, -72, -604, 228, 96], [0, 0, 98, 98, 85, 0, 0, -1450, 85, 572, 76, 543], [0, 0, -224, -224, 216, 0, 0, -1626, 216, -265, -188, -792], [0, 0, -879, -879, 8, 0, 0, 439, 8, -289, -182, -48], [-15066, 149, 204, -375, -40, 171, -52, 0, 211, 0, 0, 0], [-14066, 208, -85, 229, 0, -144, 240, 0, -144, 0, 0, 0], [0, 0, 105, 105, -246, 0, 0, 31, -246, -279, 237, 12], [0, 0, 75, 75, -228, 0, 0, 459, -228, -365, 129, 675], [-8446, 138, -655, 653, 24, 2, 113, 0, -22, 0, 0, 0], [9564, -284, -107, 81, -203, 26, 59, 0, 229, 0, 0, 0], [0, 0, -90, -90, -237, 0, 0, 1590, -237, -559, 372, 294], [0, 0, 225, 225, 87, 0, 0, -354, 87, 350, -132, -66], [6718, 34, -638, 772, 83, -134, -50, 0, -217, 0, 0, 0], [19083, -226, -559, 434, -146, 125, -1, 0, 271, 0, 0, 0], [0, 0, -245, -245, -24, 0, 0, -1211, -24, 339, -437, -168], [0, 0, 893, 893, -94, 0, 0, 2443, -94, 179, 342, 732], [0, 0, 416, 416, -90, 0, 0, -151, -90, -16, -4, -624], [-10858, 116, -264, 18, 287, 246, -64, 0, -41, 0, 0, 0], [-4880, -64, -684, 400, 124, 284, -196, 0, 160, 0, 0, 0], [-5132, 191, 98, -37, 124, -61, 158, 0, -185, 0, 0, 0], [-8775, 68, -105, 36, 48, 69, 102, 0, 21, 0, 0, 0], [0, 0, 1316, 1316, 129, 0, 0, -378, 129, 398, -154, 498], [0, 0, -482, -482, 21, 0, 0, -306, 21, -68, -530, -167], [0, 0, -955, -955, 24, 0, 0, -135, 24, -443, -333, -441], [0, 0, 260, 260, -270, 0, 0, -343, -270, 512, 188, 720], [0, 0, 848, 848, -81, 0, 0, 1104, -81, -138, 308, -719], [0, 0, 25, 25, 198, 0, 0, 955, 198, -355, 37, -372], [-5750, -195, 342, -363, -221, 21, -110, 0, 242, 0, 0, 0], [22431, -278, -763, 734, 46, 29, -121, 0, -17, 0, 0, 0], [0, 0, 1015, 1015, -30, 0, 0, -347, -30, 755, -245, 72], [-21143, 156, 1099, -1124, 14, 25, 190, 0, 11, 0, 0, 0], [719, -188, -532, 299, 104, 233, -199, 0, 129, 0, 0, 0], [29708, 470, 75, -391, 128, 316, 148, 0, 188, 0, 0, 0], [0, 0, 706, 706, 261, 0, 0, 132, 261, 741, 388, -222], [0, 0, 974, 974, 252, 0, 0, 678, 252, -176, 50, -48], [34468, -86, 340, -260, 119, -80, -2, 0, -199, 0, 0, 0], [0, 0, 520, 520, -288, 0, 0, 1013, -288, 62, -308, 432], [-24002, -242, 5, -35, -36, 30, -60, 0, 66, 0, 0, 0], [0, 0, 1070, 1070, 66, 0, 0, -1782, 66, 422, 122, 121], [-7130, -38, 604, -530, -278, -74, 4, 0, 204, 0, 0, 0], [-9195, 45, 257, 75, -250, -332, 220, 0, -82, 0, 0, 0], [32292, -104, 432, -204, -163, -228, 50, 0, -65, 0, 0, 0], [0, 0, 214, 214, 60, 0, 0, 857, 60, -76, 214, 108], [0, 0, 1063, 1063, 318, 0, 0, -354, 318, 298, -646, -18], [-28406, 104, 874, -476, -130, -398, 4, 0, -268, 0, 0, 0], [-9119, -132, 217, -230, 104, 13, 52, 0, -91, 0, 0, 0], [0, 0, -568, -568, -168, 0, 0, 2316, -168, -382, 416, -120], [0, 0, 443, 443, -438, 0, 0, 1074, -438, 42, 630, -1014], [0, 0, -711, -711, -153, 0, 0, -2261, -153, 167, -555, -48], [0, 0, -1215, -1215, -387, 0, 0, 261, -387, -1077, 432, 386], [-38143, 144, -298, 287, 50, 11, 5, 0, -39, 0, 0, 0], [-10844, 240, -298, -310, 225, 608, -122, 0, 383, 0, 0, 0], [22676, -144, -723, 917, -7, -194, -221, 0, -187, 0, 0, 0], [16181, 40, -385, 230, 198, 155, -334, 0, -43, 0, 0, 0], [0, 0, 95, 95, -156, 0, 0, -1380, -156, -324, 540, -264], [15147, 50, -105, -228, -132, 333, -48, 0, 465, 0, 0, 0], [10241, 536, 69, -174, -178, 105, 317, 0, 283, 0, 0, 0], [0, 0, 969, 969, -294, 0, 0, -269, -294, -23, 645, -468], [0, 0, 85, 85, 317, 0, 0, 3139, 317, -1023, -292, -450], [-26850, 204, -881, 789, -23, 92, 11, 0, 115, 0, 0, 0], [0, 0, -2058, -2058, 153, 0, 0, 1974, 153, -356, 108, -5], [-22404, -160, -302, 922, -185, -620, 150, 0, -435, 0, 0, 0], [-13801, 265, 643, -673, -120, 30, 192, 0, 150, 0, 0, 0], [0, 0, 1125, 1125, 453, 0, 0, -30, 453, 1414, 134, 576], [-3219, 318, 1149, -774, 76, -375, 180, 0, -451, 0, 0, 0], [44181, 529, 161, -345, 2, 184, 76, 0, 182, 0, 0, 0], [-21744, -460, -1050, 1482, -276, -432, -48, 0, -156, 0, 0, 0], [0, 0, -734, -734, -438, 0, 0, -1158, -438, 404, 742, 144], [-17111, -156, -1262, 1219, 438, 43, 199, 0, -395, 0, 0, 0], [0, 0, -1260, -1260, 454, 0, 0, -2416, 454, 744, -430, -309], [11133, 112, 2397, -2190, -24, -207, 234, 0, -183, 0, 0, 0], [0, 0, -104, -104, -384, 0, 0, 2712, -384, 4, -50, 343], [-31376, -88, 444, -644, 190, 200, 248, 0, 10, 0, 0, 0], [-1564, 170, -279, 371, -88, -92, 148, 0, -4, 0, 0, 0], [30775, 342, 1019, -724, -336, -295, 31, 0, 41, 0, 0, 0], [0, 0, -359, -359, 165, 0, 0, 1525, 165, -521, 325, -540], [-37858, 12, 1724, -1582, -266, -142, -88, 0, 124, 0, 0, 0], [45768, -62, -173, 465, 277, -292, 83, 0, -569, 0, 0, 0], [1592, -98, 92, 722, -230, -814, 104, 0, -584, 0, 0, 0], [0, 0, 595, 595, 402, 0, 0, 495, 402, -1141, 85, -849], [0, 0, -545, -545, 137, 0, 0, -2873, 137, 297, -796, -360], [-4634, 28, 476, -1018, -153, 542, -92, 0, 695, 0, 0, 0], [0, 0, -1491, -1491, 174, 0, 0, -1457, 174, -1563, -99, 876], [0, 0, -1643, -1643, -85, 0, 0, 1567, -85, 301, 44, 474], [0, 0, -1004, -1004, 135, 0, 0, -966, 135, 750, 10, 498], [0, 0, -126, -126, 360, 0, 0, -163, 360, -882, -162, -288], [0, 0, 224, 224, 277, 0, 0, 1916, 277, 2, 154, 195], [-19533, 558, 1209, -1698, 568, 489, -65, 0, -79, 0, 0, 0], [-21695, -171, -1533, 1081, 406, 452, 44, 0, 46, 0, 0, 0], [0, 0, -1424, -1424, -762, 0, 0, -865, -762, -830, 688, 156], [0, 0, 412, 412, -156, 0, 0, 1200, -156, -490, 592, -1260], [0, 0, -557, -557, -24, 0, 0, -138, -24, -762, -308, -348], [0, 0, 1196, 1196, -39, 0, 0, 1764, -39, 342, -832, 769], [0, 0, -932, -932, -48, 0, 0, 660, -48, -143, 76, 720], [0, 0, -80, -80, -558, 0, 0, -438, -558, 117, 244, -1404], [0, 0, -1133, -1133, -315, 0, 0, -23, -315, 165, 703, 288], [-23566, 110, 250, 314, 0, -564, 318, 0, -564, 0, 0, 0], [-29973, -516, 324, -249, 110, -75, -165, 0, -185, 0, 0, 0], [0, 0, 645, 645, 333, 0, 0, 877, 333, -789, -279, 312], [0, 0, 457, 457, -855, 0, 0, -3975, -855, -263, 655, -225], [-17320, 650, -85, -739, 576, 824, -355, 0, 248, 0, 0, 0], [0, 0, 372, 372, -198, 0, 0, 798, -198, 1855, -372, 852], [0, 0, 47, 47, 159, 0, 0, 1821, 159, 1301, -441, 561], [0, 0, 1678, 1678, -66, 0, 0, -570, -66, 182, -134, 840], [0, 0, 293, 293, 453, 0, 0, -996, 453, -336, -456, 246], [0, 0, -1404, -1404, 681, 0, 0, 2670, 681, 638, -942, 510], [-43668, -212, 781, -543, -563, -238, 203, 0, 325, 0, 0, 0], [0, 0, -2220, -2220, 466, 0, 0, -1300, 466, -480, -466, -585], [-15089, -398, -649, 548, 192, 101, 211, 0, -91, 0, 0, 0], [-11050, -777, 1792, -1733, -6, -59, -232, 0, -53, 0, 0, 0], [-28546, -254, 890, -814, 58, -76, -136, 0, -134, 0, 0, 0], [-3026, 716, 436, -266, 62, -170, 46, 0, -232, 0, 0, 0], [0, 0, 1031, 1031, -462, 0, 0, -1242, -462, -490, 524, 1092], [11954, -96, 2180, -1450, 34, -730, 98, 0, -764, 0, 0, 0], [0, 0, -2136, -2136, 396, 0, 0, 3246, 396, 861, -108, -408], [-41158, 550, -1748, 1652, 174, 96, 204, 0, -78, 0, 0, 0], [0, 0, -471, -471, -397, 0, 0, -179, -397, -1193, -368, 1158], [-29280, 584, 554, -712, 134, 158, -222, 0, 24, 0, 0, 0], [-43563, -24, 2022, -2049, -244, 27, 357, 0, 271, 0, 0, 0], [-11240, -430, -2521, 2629, 165, -108, 87, 0, -273, 0, 0, 0], [0, 0, -1053, -1053, 213, 0, 0, -2021, 213, -363, 195, -24], [44249, -44, 1010, -757, -76, -253, -103, 0, -177, 0, 0, 0], [-4553, 526, -833, 106, 587, 727, -146, 0, 140, 0, 0, 0], [-25898, -462, -2264, 2842, -306, -578, 100, 0, -272, 0, 0, 0], [48017, 196, 2189, -1456, -245, -733, 326, 0, -488, 0, 0, 0], [22458, -696, -850, 812, -203, 38, -472, 0, 241, 0, 0, 0], [0, 0, -362, -362, 0, 0, 0, -6019, 0, 192, 286, 1152], [-29744, 250, 443, 433, -156, -876, -144, 0, -720, 0, 0, 0], [0, 0, -752, -752, 378, 0, 0, -4489, 378, 58, -380, 960], [-15284, -456, 1396, -1322, 257, -74, -530, 0, -331, 0, 0, 0], [-25056, 616, 86, -402, -316, 316, 142, 0, 632, 0, 0, 0], [0, 0, -660, -660, 294, 0, 0, -624, 294, 1304, -936, 384], [7859, -288, -232, 215, 218, 17, -25, 0, -201, 0, 0, 0], [0, 0, -747, -747, 417, 0, 0, 72, 417, -236, 1206, -648]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1344_b_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1344_4_b_g();".
// 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_1344_4_b_g(:prec:=12)
    chi := MakeCharacter_1344_b();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 4));
    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_1344_4_b_g();".
// 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_1344_4_b_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1344_b();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<5,R![224760987648, 0, 30453516288, 0, 1456436096, 0, 29440120, 0, 249644, 0, 858, 0, 1]>,<19,R![111463534080, 8618904192, 99824480, -1835880, -27084, 42, 1]>],Snew);
    return Vf;
end function;