
// Make newform 1296.5.e.g in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1296_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1296_e_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_1296_5_e_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_1296_5_e_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 := [440076, 85254, 6529, -1647, 1104, 121, 6, -3, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0], [-386178, 464580, -159143, 17923, -1115, 635, -142, 17], [-42441945, -1050579, 106240, 113944, -70703, 5765, -367, 53], [60657, 25974, -223, 197, 116, 34, -5, 1], [2470650, 172422, 166664, 118754, 11717, -1775, 49, 118], [178665, 18954, -18433, 428, 410, 73, -38, 4], [445521, 96174, 15841, 4441, 661, 143, 2, 5], [-71046885, 16720785, 281948, -608323, -237610, 40423, -1433, -1052]];
    Rf_basisdens := [1, 104247, 104247, 729, 34749, 729, 729, 104247];
    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_1296_e();"
function MakeCharacter_1296_e()
    N := 1296;
    order := 2;
    char_gens := [1135, 325, 1217];
    v := [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_1296_e_Hecke();"
function MakeCharacter_1296_e_Hecke(Kf)
    N := 1296;
    order := 2;
    char_gens := [1135, 325, 1217];
    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]];
    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 := 5;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0], [3, 0, 0, -1, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0], [2, 0, 0, 1, 0, 1, 0, 0], [0, -1, 1, 0, -1, 0, 0, 0], [-70, 0, 0, 0, 0, 0, -1, 0], [0, -2, -3, 0, -2, 0, 0, -1], [0, -8, -5, 0, 1, 0, 0, 1], [46, 0, 0, 4, 0, -3, 1, 0], [-5, 0, 0, -19, 0, -5, -1, 0], [0, 26, -1, 0, -3, 0, 0, 2], [-15, 0, 0, 3, 0, 2, -1, 0], [0, -11, -4, 0, 3, 0, 0, -4], [0, 61, -25, 0, 5, 0, 0, 5], [0, 63, 20, 0, 1, 0, 0, -7], [480, 0, 0, -53, 0, 19, 2, 0], [16, 0, 0, -96, 0, 3, 0, 0], [0, -35, -17, 0, -9, 0, 0, -13], [-953, 0, 0, 83, 0, -1, -8, 0], [-568, 0, 0, -90, 0, 3, -7, 0], [0, 229, 12, 0, 7, 0, 0, -12], [0, -241, -19, 0, 3, 0, 0, 7], [-1822, 0, 0, -17, 0, 1, -9, 0], [0, 163, -36, 0, 16, 0, 0, 4], [2181, 0, 0, 41, 0, -34, 16, 0], [0, -368, -60, 0, 36, 0, 0, -7], [-929, 0, 0, 1, 0, -49, 9, 0], [0, -197, 54, 0, 10, 0, 0, 0], [-792, 0, 0, 36, 0, 2, -22, 0], [0, 85, 18, 0, -33, 0, 0, -10], [0, -688, 39, 0, 17, 0, 0, -22], [907, 0, 0, 93, 0, -8, 11, 0], [0, 600, 45, 0, -33, 0, 0, -47], [4392, 0, 0, -106, 0, -37, -29, 0], [-3473, 0, 0, 166, 0, 32, 39, 0], [7748, 0, 0, -92, 0, -10, 28, 0], [0, 701, 2, 0, 39, 0, 0, 24], [0, 565, 66, 0, 6, 0, 0, -62], [0, -260, 180, 0, -48, 0, 0, 8], [-5335, 0, 0, 183, 0, 53, -17, 0], [0, 43, -234, 0, 17, 0, 0, 16], [-3740, 0, 0, 293, 0, -121, -29, 0], [0, 152, -168, 0, -52, 0, 0, -104], [-10875, 0, 0, -461, 0, 37, 37, 0], [16448, 0, 0, 282, 0, 147, -7, 0], [-6091, 0, 0, -679, 0, -98, 12, 0], [0, 372, 45, 0, -136, 0, 0, -56], [23285, 0, 0, -916, 0, 186, -37, 0], [0, -670, 506, 0, 18, 0, 0, -49], [0, -956, -337, 0, 32, 0, 0, -27], [21231, 0, 0, -248, 0, -288, 72, 0], [0, 366, -162, 0, 14, 0, 0, -73], [0, -705, -2, 0, 222, 0, 0, -13], [0, 672, 117, 0, -124, 0, 0, -99], [0, -1651, 39, 0, -247, 0, 0, -79], [25408, 0, 0, -840, 0, -222, -78, 0], [7597, 0, 0, 1060, 0, -70, -159, 0], [0, -1626, 173, 0, -257, 0, 0, -79], [-54421, 0, 0, 227, 0, -128, -48, 0], [0, 335, 426, 0, 98, 0, 0, 46], [-56982, 0, 0, -880, 0, 152, 13, 0], [0, 2194, 545, 0, 126, 0, 0, -99], [-58555, 0, 0, -906, 0, -142, 142, 0], [0, -112, -181, 0, 277, 0, 0, 75], [-42302, 0, 0, 584, 0, -31, -189, 0], [74827, 0, 0, -580, 0, -404, 50, 0], [0, -1886, -323, 0, 178, 0, 0, -220], [45127, 0, 0, 758, 0, 328, -97, 0], [0, 84, 1027, 0, -107, 0, 0, 114], [0, -2034, 210, 0, -98, 0, 0, -160], [115162, 0, 0, 120, 0, -135, 99, 0], [-79956, 0, 0, -49, 0, 167, 218, 0], [88099, 0, 0, -1317, 0, 127, 8, 0], [0, 1839, -40, 0, -227, 0, 0, -206], [0, 141, -150, 0, 506, 0, 0, 98], [-45775, 0, 0, 2951, 0, -651, 185, 0], [0, -1942, -1657, 0, 25, 0, 0, -80], [6723, 0, 0, 928, 0, 156, 126, 0], [0, -228, -201, 0, -328, 0, 0, -215], [-160106, 0, 0, 1157, 0, 613, 14, 0], [0, -1338, -1670, 0, -2, 0, 0, 96], [-111831, 0, 0, 1509, 0, 469, 166, 0], [-47430, 0, 0, -436, 0, 665, 133, 0], [0, 5163, 1594, 0, 53, 0, 0, -111], [0, -855, -969, 0, -235, 0, 0, -200], [85798, 0, 0, 5947, 0, 461, -33, 0], [0, -1904, -341, 0, -55, 0, 0, -237], [25614, 0, 0, 1804, 0, -635, 43, 0], [0, 6888, -964, 0, 464, 0, 0, 69], [0, 6320, 917, 0, -308, 0, 0, 281], [140694, 0, 0, 1534, 0, 988, -62, 0], [0, 5289, 970, 0, -313, 0, 0, 161], [-222137, 0, 0, -4059, 0, -588, -21, 0], [0, -2077, -967, 0, 81, 0, 0, 327], [0, -8704, 1909, 0, 159, 0, 0, -75], [0, 5802, 234, 0, 902, 0, 0, -115], [-239587, 0, 0, 1723, 0, -275, -199, 0], [-224608, 0, 0, 1050, 0, 1250, -170, 0], [-86030, 0, 0, -654, 0, -1695, 72, 0], [0, -8233, -1795, 0, -105, 0, 0, -311], [0, 600, 767, 0, 688, 0, 0, 90], [0, -13491, 886, 0, 42, 0, 0, -51], [60658, 0, 0, -5082, 0, 817, -22, 0], [320769, 0, 0, -143, 0, -971, -406, 0], [0, -5547, 1232, 0, -177, 0, 0, 225], [0, 9105, 195, 0, 329, 0, 0, 293], [0, 6853, -198, 0, 903, 0, 0, 888], [245798, 0, 0, 1871, 0, -459, 935, 0], [-390965, 0, 0, 5271, 0, -560, 2, 0], [-126041, 0, 0, -3331, 0, -361, -257, 0], [0, -3098, 2523, 0, -679, 0, 0, -116], [-258894, 0, 0, -1450, 0, -1471, 250, 0], [-246304, 0, 0, -8132, 0, -862, 508, 0], [0, -3009, 1348, 0, -788, 0, 0, -51], [301234, 0, 0, -6318, 0, -927, -252, 0], [0, 2422, 3434, 0, 382, 0, 0, 736], [0, -1209, -654, 0, 934, 0, 0, 918], [0, -7990, -2533, 0, -1570, 0, 0, -471], [211671, 0, 0, -2870, 0, -1160, -619, 0], [150204, 0, 0, -6457, 0, -481, -592, 0], [0, -16899, -3374, 0, -38, 0, 0, 248], [0, 8084, 952, 0, 1112, 0, 0, -361], [351345, 0, 0, 5277, 0, 1226, -226, 0], [0, 10923, 977, 0, 207, 0, 0, 435], [185291, 0, 0, 4534, 0, -2228, -261, 0], [0, 9822, -2350, 0, 850, 0, 0, 492], [-250634, 0, 0, 84, 0, 69, 513, 0], [-43436, 0, 0, 4363, 0, 479, -1140, 0], [-271957, 0, 0, -193, 0, 1735, 450, 0], [0, -13257, -1696, 0, 1893, 0, 0, 382], [420195, 0, 0, -2665, 0, -384, 324, 0], [-323186, 0, 0, 1820, 0, -1804, -332, 0], [0, 17806, -3217, 0, 1021, 0, 0, 523], [276819, 0, 0, -4594, 0, 1628, -259, 0], [0, 10335, -2243, 0, 299, 0, 0, 1539], [60567, 0, 0, 2339, 0, 1052, -1088, 0], [0, 2642, -2717, 0, 521, 0, 0, 677], [0, -17309, -1531, 0, -153, 0, 0, 546], [191004, 0, 0, 3990, 0, -2674, -247, 0], [0, 5886, 2333, 0, -2729, 0, 0, -101], [-496826, 0, 0, 3536, 0, 2597, -549, 0], [0, 862, 5530, 0, 278, 0, 0, -78], [-269223, 0, 0, 8639, 0, 1613, -223, 0], [0, -3061, -5186, 0, 189, 0, 0, 754], [-211454, 0, 0, -4267, 0, -103, 1096, 0], [0, 4706, 3393, 0, 2479, 0, 0, 1045], [402100, 0, 0, 4068, 0, 871, 686, 0], [0, 6372, -2924, 0, -88, 0, 0, -82], [108894, 0, 0, 17185, 0, 189, 156, 0], [0, -10257, 797, 0, 675, 0, 0, -93], [148740, 0, 0, -10634, 0, 2086, 1693, 0], [0, -3744, 3707, 0, -264, 0, 0, 1271], [412573, 0, 0, 2735, 0, 1622, 807, 0], [0, -1006, -1165, 0, -914, 0, 0, 1865], [67788, 0, 0, -4276, 0, -1690, 274, 0], [0, -31530, -4387, 0, 1355, 0, 0, 233], [-80425, 0, 0, -12315, 0, -2233, 439, 0], [0, 21345, -3736, 0, -1664, 0, 0, -998], [0, -32306, 2507, 0, 1342, 0, 0, 310], [0, 351, -7887, 0, -821, 0, 0, -196], [127454, 0, 0, -4652, 0, 853, -1273, 0], [0, 25959, -6779, 0, 2365, 0, 0, 679], [0, 2681, 7012, 0, -896, 0, 0, -917], [0, -10996, 2777, 0, 404, 0, 0, 513], [-141938, 0, 0, -9150, 0, 132, -2064, 0], [-148461, 0, 0, -17678, 0, -1796, -865, 0], [301473, 0, 0, -6545, 0, -7451, -175, 0], [0, -35614, -2661, 0, 1685, 0, 0, 479], [0, -17705, 7438, 0, 1605, 0, 0, 961], [-85926, 0, 0, -719, 0, 865, -514, 0], [0, 4976, 2979, 0, -2624, 0, 0, 2069], [193086, 0, 0, -6497, 0, 3237, -1647, 0], [-389157, 0, 0, -10445, 0, -3536, 52, 0], [0, 17855, 6082, 0, 1918, 0, 0, -980], [-94877, 0, 0, -23051, 0, -1584, 1195, 0], [0, -16399, -1029, 0, 1105, 0, 0, -2393], [118094, 0, 0, 9114, 0, -5316, -1450, 0], [13845, 0, 0, 10032, 0, -3614, 871, 0], [212813, 0, 0, -13595, 0, 2054, -290, 0], [0, 45953, -836, 0, 1219, 0, 0, 887], [-265599, 0, 0, -2720, 0, -4946, 1223, 0], [0, 22045, 5043, 0, -43, 0, 0, -1684], [0, -16563, -6286, 0, -677, 0, 0, 208], [0, 49910, 3037, 0, -517, 0, 0, -615], [199186, 0, 0, 4700, 0, 2480, -1622, 0], [-133179, 0, 0, 5009, 0, -3306, -1314, 0], [420433, 0, 0, -6042, 0, 942, -842, 0], [0, 26826, 1542, 0, 1262, 0, 0, 1860], [-371123, 0, 0, -15363, 0, -2559, -1412, 0], [0, 24228, -795, 0, -2644, 0, 0, -3422], [1017382, 0, 0, 3228, 0, -308, 1121, 0], [0, -7053, -220, 0, -2000, 0, 0, -1862], [0, -39970, 8790, 0, -3790, 0, 0, -1207], [0, -46919, -780, 0, -2816, 0, 0, 1399], [-777972, 0, 0, -17911, 0, -4561, 101, 0], [-710805, 0, 0, -28078, 0, 500, 1679, 0], [0, 2425, -2454, 0, -3862, 0, 0, -2091], [0, -9794, -5206, 0, -2230, 0, 0, -2446], [0, 26417, -5152, 0, 564, 0, 0, -516], [-303779, 0, 0, -6763, 0, 1790, 2172, 0], [241469, 0, 0, 11692, 0, -3974, -2475, 0], [321525, 0, 0, 5998, 0, -518, -796, 0], [0, -32668, -4416, 0, 828, 0, 0, -2307], [0, -53411, 2967, 0, 2945, 0, 0, 1425], [1123896, 0, 0, -13436, 0, -1526, -212, 0], [0, -16971, -90, 0, -1753, 0, 0, -6205], [0, -24341, -4856, 0, 1416, 0, 0, -935], [-827807, 0, 0, -1437, 0, -6542, -1021, 0], [370619, 0, 0, -19809, 0, 2867, -86, 0], [0, -38902, 8035, 0, 1981, 0, 0, -1733], [1037235, 0, 0, -16501, 0, -8920, -416, 0], [0, -18686, 9747, 0, 926, 0, 0, -2939], [0, 58873, -306, 0, 5907, 0, 0, -518], [-1105099, 0, 0, 18702, 0, -2070, -600, 0], [301696, 0, 0, 4570, 0, -3669, 2071, 0], [0, 3602, -12555, 0, 3555, 0, 0, 926], [0, 61982, 4234, 0, -3482, 0, 0, -1982], [0, 9528, 4221, 0, -2549, 0, 0, 2421], [613362, 0, 0, 17777, 0, 9905, 176, 0], [-406167, 0, 0, 653, 0, 7298, 1510, 0], [0, 13740, -10155, 0, 5379, 0, 0, 1892], [-1412870, 0, 0, 18250, 0, 1464, -4154, 0], [0, 20697, 18554, 0, -737, 0, 0, -1983], [-1356381, 0, 0, -25234, 0, -388, -3223, 0], [0, 12873, 6006, 0, -2234, 0, 0, 2300], [0, -32202, 15530, 0, 2838, 0, 0, 1496], [-1303652, 0, 0, 10134, 0, 439, -3547, 0], [0, -30892, 13129, 0, -5760, 0, 0, -1945], [1649909, 0, 0, 24648, 0, -1582, -77, 0], [-856386, 0, 0, -12510, 0, -5380, 2786, 0], [253568, 0, 0, 38174, 0, -4853, -2439, 0], [0, -28993, -1362, 0, 1258, 0, 0, -3849], [-141022, 0, 0, 20428, 0, 7865, 2335, 0], [0, 46891, 3094, 0, 4641, 0, 0, 112], [645838, 0, 0, 36237, 0, 3021, -3410, 0], [0, -9199, 5179, 0, 885, 0, 0, 3199], [0, 41671, 1684, 0, 7817, 0, 0, 571], [0, 6284, -348, 0, -1732, 0, 0, 2932], [0, -2279, -11228, 0, -1709, 0, 0, -4937], [-1261006, 0, 0, 26746, 0, 3616, -2314, 0], [326449, 0, 0, 11181, 0, 7962, -4182, 0], [-316103, 0, 0, -27517, 0, -4003, -1361, 0], [0, 25042, -11553, 0, 9, 0, 0, 1280], [0, 14887, -22350, 0, 3701, 0, 0, 390], [-2161228, 0, 0, 13776, 0, -4362, 818, 0], [0, -67352, -6761, 0, 8772, 0, 0, 580], [83646, 0, 0, -55104, 0, -4531, -4165, 0], [0, 5464, 4984, 0, -100, 0, 0, 436], [594924, 0, 0, -39929, 0, -7793, 596, 0], [0, -42921, -3255, 0, 2403, 0, 0, -2616], [0, -7752, 11291, 0, 4116, 0, 0, 5685], [1687435, 0, 0, -35386, 0, -1084, 1381, 0], [0, -16471, 6294, 0, -14, 0, 0, 4852], [0, -37635, 931, 0, -6317, 0, 0, -852], [655123, 0, 0, 30437, 0, -5461, 1549, 0], [1958448, 0, 0, -27918, 0, -7549, -2695, 0], [0, 15452, -9652, 0, 800, 0, 0, -5114], [-1003375, 0, 0, 10097, 0, 16053, 2246, 0], [-2147740, 0, 0, -23010, 0, 8919, 3371, 0], [0, -78891, -8920, 0, 5043, 0, 0, 4183], [1646611, 0, 0, 36266, 0, 7196, 751, 0], [-674187, 0, 0, 45439, 0, -7767, -1707, 0], [0, -1394, 1039, 0, -4591, 0, 0, -1173], [-38478, 0, 0, -17466, 0, -6511, -4066, 0], [0, -17433, -6219, 0, -9525, 0, 0, -5141], [0, 6951, -2596, 0, -984, 0, 0, -7475], [-910826, 0, 0, -6314, 0, -18291, 3232, 0], [0, 87186, -10109, 0, -6495, 0, 0, -2395], [-2010706, 0, 0, -32127, 0, 6989, 5452, 0], [-2231566, 0, 0, -33590, 0, -11728, 466, 0], [-1916215, 0, 0, 55130, 0, 3774, 1826, 0], [1843007, 0, 0, 38035, 0, 3460, 2132, 0], [2512104, 0, 0, -15303, 0, 307, -1337, 0], [-2171842, 0, 0, -25538, 0, -1892, -3532, 0], [0, -115729, -5632, 0, -9487, 0, 0, -592], [-611254, 0, 0, 8033, 0, -13167, -3694, 0], [-853587, 0, 0, -50823, 0, -8255, -590, 0], [0, -39006, 24543, 0, 6874, 0, 0, 6256], [0, -6077, -4028, 0, -11383, 0, 0, -7534], [-644945, 0, 0, 15091, 0, -8964, -1334, 0], [0, 40970, -21133, 0, 1902, 0, 0, 4663], [-3926373, 0, 0, 15214, 0, -1076, -5461, 0], [1034465, 0, 0, 30187, 0, -9086, 6803, 0], [0, -67047, -9173, 0, 10443, 0, 0, 5273], [-232479, 0, 0, 11531, 0, 1565, -7927, 0], [0, -59217, -6790, 0, 1866, 0, 0, -5110], [-1927101, 0, 0, 37283, 0, -6496, -1790, 0], [0, -40422, 23378, 0, 3578, 0, 0, 4043], [0, -28592, 1779, 0, 7849, 0, 0, 501], [0, -68727, -5217, 0, -3489, 0, 0, -2546], [0, -25773, -6150, 0, -8842, 0, 0, 4223], [0, 68660, -10621, 0, -3768, 0, 0, 5274], [1050461, 0, 0, -21684, 0, 6210, -2001, 0], [0, 40993, 11832, 0, 2652, 0, 0, 9950], [3014340, 0, 0, -4394, 0, 2935, 391, 0], [0, 82734, 13309, 0, -3205, 0, 0, 4015], [0, 57734, 20770, 0, -8286, 0, 0, -338], [-2483241, 0, 0, 2023, 0, 2788, -4148, 0], [877201, 0, 0, 27414, 0, -19074, -4214, 0], [0, 26593, -13741, 0, 589, 0, 0, 3985], [-1014716, 0, 0, 1804, 0, -15066, 1120, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1296_e_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1296_5_e_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_1296_5_e_g(:prec:=8)
    chi := MakeCharacter_1296_e();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 5));
    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_1296_5_e_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_1296_5_e_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1296_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,5,sign)));
    Vf := Kernel([<5,R![19274879556, 0, 403999407, 0, 2238759, 0, 2853, 0, 1]>],Snew);
    return Vf;
end function;