
// Make newform 1216.4.a.be in Magma, downloaded from the LMFDB on 01 January 2026.
// To make the character of type GrpDrchElt, type "MakeCharacter_1216_a();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_1216_4_a_be();".
// 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_1216_4_a_be();".
// 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 := [7848, -46788, -4178, 4589, 212, -130, -2, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0], [-70812, 233100, 8069, -10320, -146, 92, 1], [219420, 3180, -48517, -1050, 1492, 14, -11], [-515988, 3684, 18479, 72, 274, -4, -5], [59652, 3432, -20491, -489, 883, 5, -8], [80124, -31380, -4813, 2106, -32, -22, 1]];
    Rf_basisdens := [1, 1, 10944, 10944, 10944, 5472, 1824];
    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_1216_a();"
function MakeCharacter_1216_a()
    N := 1216;
    order := 1;
    char_gens := [191, 837, 705];
    v := [1, 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;

function MakeCharacter_1216_a_Hecke( : Kf := Kf)
    return MakeCharacter_1216_a();
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 := 4;
    raw_aps := [[0, 0, 0, 0, 0, 0, 0], [-1, -1, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, -1, 0], [4, 0, 0, 1, 0, 0, 0], [-11, 1, -1, 0, -1, -1, 0], [-6, -1, 0, -1, 0, 1, -1], [-3, 6, 3, -1, -2, 2, -1], [-19, 0, 0, 0, 0, 0, 0], [-25, -2, 2, -3, -4, 11, -2], [11, -1, -2, 4, 1, -2, -2], [14, -13, 6, -5, -1, 7, 4], [-27, 12, -8, -1, -1, 1, -1], [23, 26, -4, -5, 5, 1, -1], [-172, 8, 3, 2, -5, 15, -9], [131, 4, 0, 4, 6, -9, 2], [-2, 40, -18, -2, 1, -12, 9], [-232, -19, 4, -1, 5, -7, 13], [62, -7, 18, -16, 12, 13, 17], [-318, -8, -6, -4, 20, 12, 15], [57, -31, 36, -16, -12, 32, 3], [-34, -51, 17, 1, -8, 14, 4], [87, 4, -6, -11, -5, -17, 13], [-329, -15, 30, 14, 8, -32, -1], [-19, -34, -18, 5, 15, 21, -17], [213, -17, -22, 42, 26, -6, -1], [28, 102, -30, -6, 8, 2, 6], [69, -43, -12, 12, -10, 4, 7], [-560, 39, 0, -15, -5, -97, 11], [301, 31, -50, 28, 39, -44, 16], [83, -56, 12, -39, 23, -21, 25], [146, -69, 50, 25, 13, -37, -44], [-636, 38, -19, 64, -21, -73, -7], [-212, -143, 3, -43, -14, -46, -12], [-605, 39, -87, 26, 43, -35, -20], [41, -80, 42, -20, 4, -43, -14], [80, 12, -32, -22, 66, -8, 20], [-147, -69, -86, 28, -10, -34, -63], [-796, 56, 18, 62, -10, 98, 16], [-807, 74, -66, -5, 15, 31, 27], [-395, -171, -54, 10, 0, -44, -11], [-328, 315, -34, -1, 29, 33, -36], [81, -75, 70, -34, 72, 100, -7], [-1614, -10, 118, -17, -20, 2, 30], [942, 33, 54, 25, 93, -13, -28], [243, 9, -36, -38, 60, -160, 97], [-637, 197, 82, 39, -74, 88, -71], [-1097, -18, 16, 79, -97, 195, -82], [-727, 200, -58, 33, 117, 69, 33], [-24, -191, -126, 83, 11, -189, 71], [-492, 53, -52, -6, -108, 325, -47], [-955, -199, -105, -52, 73, -3, 2], [-2951, -265, -46, -21, 26, 36, -33], [-123, -52, 76, 87, -63, 149, -59], [512, 120, 19, -224, -49, 83, 47], [9, -79, -70, 20, -22, -164, -95], [-889, 490, -36, -22, 124, -67, 66], [-571, -26, 76, -37, 11, 251, -67], [-2099, -144, 80, 59, -116, 89, 36], [398, 705, -18, 38, -58, 125, 13], [-742, -598, 12, 106, -18, 46, 78], [86, 80, -211, -6, -15, 179, 59], [-1529, 406, -12, -109, -76, 183, 32], [-1364, 197, -152, -19, 25, -47, -74], [-671, 515, 48, 31, -56, -290, -79], [-1321, -328, 176, -131, -155, 303, -68], [477, 344, -100, -99, 2, -513, -28], [878, 678, 114, -266, -58, 182, 177], [-569, -163, -98, 58, 92, -194, 63], [1615, 513, -65, 24, -103, 125, 76], [1027, -232, -60, 236, 92, -547, -82], [-52, 679, -156, -207, 119, -423, 63], [-566, 128, -92, -37, -144, -470, -144], [2775, 105, 92, -24, 74, 62, 165], [2397, -140, 16, 131, 80, -189, 110], [-1199, -830, 112, 21, -75, 573, -132], [-257, 554, 142, -225, 199, -219, 133], [-2708, -585, 126, -72, -150, 93, -25], [2396, 463, -38, 38, -50, 49, -45], [-412, 645, -70, 187, -111, 601, -200], [1896, 905, -226, -21, 103, -295, -24], [-1493, -287, -106, -126, 160, -220, 133], [-30, -44, -126, 286, 181, 192, -115], [-2994, -1262, -96, -76, 38, 64, -120], [-4011, 228, -76, -281, -213, 297, 103], [8206, -367, 62, -25, -83, 213, 34], [265, -1333, 363, -68, -61, 733, -78], [-1212, -436, 274, -294, 214, 352, 120], [-4046, -193, -409, -93, 44, -190, 66], [2570, -365, 360, -210, -190, -99, 253], [5363, 1040, 184, -112, -154, 539, -138], [448, 702, 149, 160, 269, 159, 59], [-727, -121, -456, 168, 162, -186, -193], [8399, -1629, -232, 196, -158, 132, -83], [-1732, -168, 90, -302, -572, 646, -132], [-6720, 1076, -1, 104, -207, 175, 77], [4326, 469, 118, -277, -292, 163, 199], [1435, -1355, -390, 378, 292, -710, -15], [4165, 58, -238, 125, -151, 601, -129], [1687, 634, -136, 131, 235, -113, 244], [-6263, -1300, 56, -88, -278, 287, 26], [-9280, -696, 276, -288, -200, 344, -108], [1399, 1362, 352, -98, -90, 327, 36], [-1072, 125, 550, 193, -153, 379, 228], [913, -345, -142, -202, -306, 86, -99], [2195, -69, -462, 564, 24, 6, -123], [387, -976, -387, 3, 144, -776, 155], [2683, 559, -179, 60, 3, -471, -370], [5604, -306, -42, -238, 172, -618, 150], [4588, -483, 842, 27, -295, 11, -170], [-4734, -166, -400, -290, 260, 222, 426], [6073, 109, -560, 402, -178, -468, -335], [6669, -500, 28, -54, 192, -53, -252], [2575, -1217, -657, 46, 651, -763, 270], [-992, 826, 302, -380, -442, -368, 94], [8953, -1188, 110, -618, -18, -97, 46], [-5295, 259, 410, 294, -220, 6, -665], [-3112, 698, -123, 118, 435, -865, 129], [2891, 719, 0, -257, 212, -508, 305], [-1026, 433, 348, -12, -86, -441, -215], [-1551, 1098, -956, -91, 525, -375, 386], [-2287, -810, -176, 21, -94, -47, -2], [11073, -37, 444, 98, -308, 708, -441], [3647, -1037, -86, -460, 251, 774, 328], [8372, -1642, 0, 358, 354, -1842, -148], [-3095, 1497, -297, -590, 79, 51, 138], [9144, -1308, 242, 772, -374, 804, -396], [-1100, -2996, -218, 36, 320, -72, -202], [-7054, 2990, -144, 181, 0, -208, 162], [10841, 1275, -74, -243, -544, 1296, -467], [-1427, -1605, 154, -584, -134, -466, -217], [-7675, -1405, 847, -790, -41, -443, -30], [-10264, -387, 14, 67, -89, 1223, -370], [1193, -55, -228, 342, 12, -1880, 327], [2166, 109, 200, -438, 460, 187, 153], [-3964, 1623, 49, 765, 84, 362, 148], [2288, 557, 823, -261, 40, 810, 284], [241, -3124, 952, 277, -462, 603, -16], [-3392, 1775, 582, -115, -223, 13, 251], [-4553, 139, 150, -438, 203, -998, 532], [-8325, 1068, -285, -627, -72, 1342, -99], [1445, -524, -534, -705, -299, -459, 224], [-6978, -75, -1010, 890, 70, -1607, 309], [12134, 538, -602, 35, 570, -1714, 112], [-57, 1501, -382, -186, -284, -168, 362], [3173, -3328, 128, 219, -568, 423, -394], [-12929, 2717, -668, -26, 438, 694, 375], [13713, 2597, -1054, 210, -398, 160, 177], [-764, 906, 1060, -56, -356, 516, 328], [-2590, -584, 305, -138, -259, 1835, -17], [-22632, -41, -510, -453, -357, -559, 222], [-4026, 999, 648, 565, -28, 109, 503], [-1381, 377, 489, -1354, -135, 369, -386], [-13635, -917, -127, 704, -569, 859, -1072], [-8234, -1934, -496, 206, 176, 700, -346], [2023, 501, -578, 1038, 424, -1492, -464], [-20913, -2949, 512, 592, 416, -104, -165], [13856, 1549, 618, -355, -376, -95, -97], [-13967, 38, -928, 293, -435, -1061, 118], [-777, -1294, 739, -347, -732, 788, -817], [-19952, 1141, 456, -843, 198, 269, 175], [-7813, 2701, 600, 448, -288, 222, -315], [7979, -1446, 750, -61, 545, 1683, 91], [13587, -1185, 1086, 180, -80, -946, 61], [6246, -430, 304, 868, -24, -1104, -578], [26690, -1201, -162, -401, 123, -635, 382], [-13534, 404, -304, 518, -204, 1294, -296], [-11725, 3182, 70, -219, 115, 373, -175], [-1820, -1049, 950, 646, 946, -1195, 99], [-686, -1139, -534, 325, 461, -809, -882], [-3858, 511, 562, -936, -828, 79, -223], [-7925, -1385, -272, 356, 84, -2364, -198], [18579, 239, -70, 130, -137, -58, -288], [-13841, 1493, 776, -336, 982, -122, 417], [6052, -2097, 1068, -391, -65, -1287, 1261], [10281, 99, -1076, 1452, 414, -2342, 503], [14891, -1059, -481, 1018, -805, 363, -472], [-3308, -1204, 110, 22, -466, -926, 492], [4810, 1409, 30, -230, 200, 301, 747], [2482, -3086, 248, -480, 306, 1092, -462], [15519, -2824, -354, 1064, -888, -537, -282], [11243, 741, 208, -733, -426, 570, -91], [-3609, -564, 166, -1011, 803, -457, 662], [-17723, 3551, -886, 1340, 974, -2482, 13], [-13183, 229, -1404, 1280, 520, -2030, -717], [-6003, -63, 1430, 797, -144, 238, 39], [-10935, -3802, -588, 712, 290, -799, 244], [2155, 1554, -1080, 881, 1082, 671, -982], [-8242, 166, -1338, 404, 430, -4142, 488], [28312, -1063, 76, -453, -629, 1787, -280], [-21298, 1391, -1304, 495, 246, -1957, -465], [1806, 4579, -444, -509, -135, -2221, 834], [-16694, -1760, -633, 540, 959, 361, 81], [-8804, -1917, 860, -141, 231, -1037, -558], [-26756, -2498, 270, -584, -919, 36, -985], [-19398, -596, 1730, -1108, 360, -224, 658], [-382, 1560, 1494, 1124, 1236, -1846, 640], [8330, 2351, -1219, -865, -1354, 1352, 16], [-775, -6437, 1526, 620, -824, 1770, -365], [-11711, 2500, 480, 347, 295, 1529, -116], [-14297, 1507, 1036, 209, -404, -376, -803], [10007, -3057, 1922, -716, -146, 192, 397], [15201, -1304, 410, 2073, 227, 2461, -593], [-15488, -2200, 1042, 936, -201, 142, 759], [-18916, 1511, -228, 1617, -771, 573, -462], [-30527, 3361, -506, -1104, 770, 278, 913], [-10621, -3710, -698, 1576, 988, -1103, 268], [7842, -2554, -660, 1703, 462, 488, -652], [-33348, -279, -614, -805, -169, 799, -105], [19023, -4264, 459, -1013, -942, -686, 535], [13040, -3047, 1572, 839, 25, 2173, -731], [-35048, 4213, 288, 335, 753, -249, -477], [-13941, 7553, 898, -484, 802, 510, -599], [18155, 1482, -452, -2296, -238, 861, 8], [-17758, -375, 1010, -3, -67, 1457, 971], [-16719, 6240, -462, -599, 31, 1373, -13], [3814, -3889, 772, 935, -623, 1103, -578], [44583, 1806, -404, 263, 1868, -2159, -218], [-13758, 6924, -966, -1476, 468, -1230, 258], [28763, -1596, -2362, 1305, 435, -1361, -727], [18043, 632, -260, -2614, -344, 877, 956], [2107, 4471, 346, -1470, -740, 3544, -929], [27145, -758, 218, 1135, -1205, 443, -183], [-2906, 1099, -1740, 515, -1625, 2263, -1298], [10292, 1250, -2206, 539, -1396, 3628, -1402], [-19841, 666, 412, 31, -1049, 2499, -1076], [-28753, 1994, 2058, -1462, -1350, 2429, -800], [44170, 3162, -1244, -474, -574, 430, -388], [-10142, -4933, -418, 927, -615, -1633, -34], [11053, 1383, 372, 1130, 102, 3570, 271], [7769, 393, 1227, 1816, -367, -581, -12], [-25514, 5307, 986, -1022, -410, 1127, 941], [13208, 146, -1846, -156, 692, -1264, -655], [-499, 3084, 1358, -609, -217, 1849, 1185], [18907, -7, -228, -146, -1780, 712, -665], [10330, -180, 1013, 2192, -275, 627, 641], [17060, 3134, -500, -73, -124, 2166, -1002], [381, -4289, -127, 1142, 137, 701, 1020], [15076, 1635, 804, -730, 1302, 1171, 2049], [-21873, -2423, 206, 458, 252, 688, 1187], [-22894, 2737, 1030, 529, 1387, 29, -584], [2838, 2704, 266, 234, -1892, -544, 256], [33361, -3615, -1017, 214, 299, 315, 578], [-17972, 4023, -970, -349, -114, -981, 51], [-61011, 214, -2252, 47, 254, -1663, -194], [-29850, 4043, 1996, -3493, 503, 1575, 1488], [-11739, -2616, 792, 122, 452, 865, -1304], [17709, -7804, 48, -398, -532, 1925, 136], [25422, -6511, -480, 1023, -897, 4715, -956], [9482, -3454, 3244, -104, -1008, 2592, -746], [16192, -5520, -1324, 1675, -538, -3396, 186], [61303, -3215, 1922, 788, -288, 2958, -693], [-43671, 4612, 479, 295, 2310, -580, 997], [-27686, 4055, -1028, 39, -818, -2749, 887], [2865, -524, 2, 2095, -307, 3907, -1203], [38334, -3, -398, -2016, -726, 1733, 679], [-12177, -4185, -458, 1148, 114, -3178, 995], [16457, 12042, -1266, -1070, 380, -2785, 876], [20352, -6411, 1054, -1659, 3, -3117, -1256], [-11099, 2968, 1752, 343, -313, -3891, -1177], [40938, 1244, 3202, -546, -900, 2754, -1160], [-14283, 4400, -538, 1373, -1029, 37, -2165], [13972, -298, 210, 878, -496, 2200, 18], [14455, 2896, -2076, 518, -20, -2423, -1422], [-29506, 3217, 1844, 231, 608, -2073, -1011], [26339, 1175, 3023, 316, -211, 2925, 760], [22731, -3791, -1338, 102, -444, -1748, -1070], [-7446, 1402, 2730, 1748, -1183, -22, -865], [-25570, -5421, 63, 467, -624, 2282, 1600], [24254, -8541, -2600, -217, 1605, -899, 401], [-42795, 5114, 22, -28, -1840, 8051, 138], [32494, -5176, -1142, -2698, 2449, -3024, 1213], [38141, -647, -64, 736, -632, 332, 216], [-55841, 4388, 465, 3341, -1678, -72, -193], [17361, 1419, 1140, -1967, 1780, 1130, -1047], [19075, 628, -1214, 1101, 2333, -4227, 2003], [-4283, -4418, 846, 2363, 416, 2973, -802], [-40169, -2105, 1125, -1894, 675, -955, 1370], [-6492, 2052, -1766, 1028, 3719, -2106, 2071], [-25321, -1577, -952, 1780, 1304, 346, -327], [57499, -783, 1709, -2820, 425, 2419, 104], [-661, 225, -4096, 3146, 730, -6566, -171], [-79029, -2700, -1138, -273, -754, -631, -442], [38322, 3948, 876, 1597, -328, 934, 156], [-5303, -2608, 1780, 933, 1360, 2871, 1610], [3335, 4719, -409, -1276, -1477, 7083, -1268], [17209, -3364, -788, 104, 938, -1135, -362], [-19177, 5112, -2859, -9, 1196, -5164, -211], [-17751, -2593, -3898, 1018, 616, -4302, 803], [-13359, 5097, -248, 387, -1646, 2628, 237], [73297, -5127, 98, 308, -1606, -5116, -1413], [37229, 369, -1418, -2458, -2400, 3160, 45], [34913, 5127, -1827, -724, 3759, -5665, 2698], [-2986, -2336, 858, -1136, -620, 10466, -898], [-28392, -6788, -2586, -940, 2122, -2770, 2722], [36097, 325, 1646, 190, -1820, 3860, -2007], [5496, -1104, -1432, 2806, -1096, -1794, -2224], [-31723, 10065, 88, 1194, 746, 4212, 669], [37701, 7740, 1900, 264, -1112, -3013, 730], [-66057, -653, -1366, -2584, 1430, -2938, 1692], [11638, -1156, 899, 2590, -2191, 2665, -3291], [9697, 7711, -3601, 1520, 3409, -3293, 100], [-54057, -1174, 4, -879, 1194, -6217, 1642], [-16193, 6315, 2494, -4319, -1780, 4174, -1431], [-33144, -5268, 1282, -1190, -2126, 5634, -2447], [10383, 1077, 2355, -4828, 1601, 2669, 762], [482, -4181, -2150, -81, -975, -4711, -624], [-49094, -9311, -358, 1277, -963, 1737, -303], [-34244, 4074, 3974, -3004, -607, 5104, 451], [34867, -2264, -1714, -144, 3032, -663, 404], [72287, -4919, -1460, -1278, 74, 2872, 1477], [-6437, -706, 234, 2410, -3422, 4483, -1928], [62496, 290, -1164, -2036, -262, 3116, -390], [-7304, -7132, 2082, -238, 1604, -3032, 380], [26414, -1155, 1614, 1175, 597, 4517, 2682], [-641, -1597, -1168, 3270, -2596, 1620, -2243], [38832, -7603, 1790, -2593, -291, -479, 1432], [-38277, 12153, -1771, 1674, -475, 5747, -252], [-17194, -4387, 886, -2555, 3175, 3029, 2758], [30089, -2148, 3163, -2625, -766, 592, 73], [-4303, -8831, -3893, 3170, 115, -5447, -436], [53320, -5976, 4572, 406, -892, 8968, -827], [-31017, 5430, -153, 73, -264, 244, 401], [39898, 10819, -3264, -1975, 2294, -7047, 605], [-3900, -6871, 3038, -1145, 29, -1293, 1904], [24305, -3950, 2420, -2435, 1713, 1339, 2244], [-20054, -7337, 4426, -581, -331, 4653, -1516], [-47547, 520, 1082, -3345, -191, 1329, -1254], [14354, 9526, -4348, 2586, 3792, -3980, 1187], [46737, 4162, -1474, -3841, -25, 143, 179], [-48230, -10355, 490, -454, 1948, -1651, 3117], [62937, -3262, -940, 1082, 1250, -7179, -1416], [42045, 12296, 616, 421, -2570, 6555, -960], [-1742, -11029, 1776, 315, -762, -2549, 2859], [2954, 6662, 2349, -760, 1161, -1759, -1517], [17315, -3585, 961, -806, 971, -2531, 2714], [-59609, 839, 1373, 3788, 1453, -4447, 850], [-25100, 4408, 1082, -3732, 125, -2970, 881], [6133, 4944, -2324, 667, 1407, -5867, 917], [-19072, 4729, 1395, -1389, -784, -2006, -490], [48349, 3716, -526, 3013, -1590, -4497, 874], [16090, 5540, -4010, 3646, -1865, 784, 179], [3311, 8854, -1303, 2535, -488, -6174, 497], [-55854, 3542, 50, 3126, 2337, 2734, 363], [-69244, -4427, 538, 3131, 1559, 1087, -1528], [-19016, -2657, 2416, 1831, -1932, -1225, -381], [-57950, -1464, 5816, -2918, -154, -1398, 290], [-15080, 5870, 4262, -702, -1274, 3654, -1598], [-18938, 6958, 1444, 3838, -648, -4576, -45], [9369, -799, -96, -942, -1316, -5676, -223], [53315, -14514, 1114, -852, -2260, -967, -1184], [8080, -10771, -314, -1875, -949, 1123, -788], [-28795, 9845, 3986, -1200, 1918, -3708, -753], [25538, -7227, -2522, 4344, 498, -2483, -521], [-12053, -7473, -2324, 3976, 2552, -2076, -509], [44091, -7928, -4512, 4223, 2563, -7445, 583], [40401, 7941, 2358, 128, -2396, 2544, -1271], [-47879, -13432, 1854, 989, -1256, 8495, -416], [-47022, 4692, 4430, -1716, -3192, -268, -4238], [47690, 1461, 3181, 3437, -2532, -5498, 802], [7645, 11566, -4534, 2847, 1495, -325, -511], [15022, -3379, -3700, 3452, 3300, -2041, 3157], [-44156, 3708, -310, -3080, -2770, -6744, -838], [86608, -387, -3330, -915, 2675, -5393, -1602], [-82520, 3918, 2462, 3104, 1428, -6152, -1263], [22646, -5070, 641, -778, -2349, 2105, -2447], [23455, 7116, 476, 1589, 1971, -9261, 3031], [-25720, -5436, 5502, -1792, -1948, 7292, -2182], [-85210, 1470, 3640, -3902, -860, -1656, 3098], [9909, 4036, 1858, -3717, -975, 4871, 4601], [42760, -1838, -1848, -4390, 1548, 2634, 1778], [17272, 9426, -3872, 3688, 2626, 4070, -2451], [41130, -9270, 818, 2041, -1474, 2926, -2360], [-16464, -8604, -1758, -4130, 2833, -6778, 2417], [-25587, -6736, -2504, 3460, 1870, -7659, 470], [-34736, -1139, -330, -676, -3178, 1907, -2313], [-17142, -10713, -562, 2575, 351, -1789, 1039], [22841, -211, 2932, 1526, 568, 2640, -85], [-89937, -6081, 621, -1830, -1155, 11531, -2552], [17994, 1949, -67, 1335, -2738, 6514, -3210], [26230, 6280, -1918, -3404, 2518, -3730, 4388], [30421, -4033, 4650, 112, 50, -6498, 4201], [-25925, -12445, 2101, -2734, 3005, 12115, -2016], [13243, -1515, 1508, -6097, -2174, 2870, 2465], [42879, -17023, 5887, -4198, -3221, 6803, -44], [9550, -768, 4048, 2300, -1166, 1438, 713], [-113914, 5080, 1820, -3774, -2482, -2082, 352], [-65304, -11955, -4406, 1841, 2916, -14135, 2675], [57857, -575, -342, -710, -1176, -5168, 1131], [-11992, 872, 2555, 1236, 2629, -1337, -1413], [44144, -19589, 570, -1937, 317, 1833, -1028], [-69810, -1570, -820, 906, -1384, 3834, -64], [-8960, -893, -3764, -4057, -1618, 4755, -3071], [-115740, -8048, -2110, 1934, -1216, 1622, -2514], [33047, 4939, 3047, -5010, -2337, 11807, -72], [-34899, 1799, 540, -718, -2068, -6074, -1015], [-35105, 8665, 2992, -1278, -306, 1908, -2061], [-86602, 6029, 542, 4577, -1749, -59, -618], [5832, -3747, -1228, 567, 2429, -61, -1398], [49896, -3229, -1722, -5205, -807, 2273, 2604], [-45405, -10139, 1358, -1576, -1560, 50, 3797], [21749, -1356, 3020, -4403, -3923, 5953, 553], [27771, -763, 2255, -2442, -2445, -6133, 368], [64958, -1832, 4304, 1202, -2076, 6198, -784], [-34886, -3386, 404, -2494, 1734, 9570, 202], [-48237, 13488, 4684, -5981, -169, 2247, 787], [-101951, 14051, -5660, 1603, 5744, -118, 2465], [35302, -6851, -2512, 2424, -48, -11685, 847], [85406, -2697, -1472, -749, 2183, -7785, -1672], [-5470, 2182, -7404, -1466, -2088, 7916, -2313], [36717, -11673, 6703, 4732, -3297, 3881, -724], [-27408, 4131, -3458, 5225, 217, -12125, 2424], [17836, -10213, -4566, 2188, -1116, -5359, 287], [-55023, 11534, 5432, 1765, -3923, 1481, -2428], [29621, -3361, 1749, 2026, -1547, -9761, 1574], [-31010, -10155, -2978, 515, -1869, -6829, -1907], [23129, -10733, -234, 2940, 1298, -12450, -1869], [46533, -12581, 2424, 4456, -3094, -2390, -1871], [-25472, 19961, -1966, -3809, 1991, -3921, 2250], [-24018, -9, 2674, 2769, -863, -3751, -817], [5897, 19141, 3096, 208, 1850, 7036, -523], [-89265, 5850, 476, 4553, -359, -499, 687], [-58633, -1177, -6, 7356, 2847, -9934, 200], [33910, 374, 9318, -4747, -1336, 12550, 3618], [-17244, 5700, -336, 3230, 3820, 8972, 277], [65321, -543, -1690, 6776, 1076, 2324, 3223], [-1400, -13363, 1056, 4115, 254, -2243, 1447], [54707, 9319, 1516, 1760, 5056, 3920, -3152], [-33839, -3254, 2759, 1701, 1132, 1490, 4265], [52296, -23444, -1287, -1028, -5223, -1691, -2509], [-51665, -5161, -2328, -103, 2406, -1620, 3231]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1216_a_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1216_4_a_be();".
// 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_1216_4_a_be(:prec:=7)
    chi := MakeCharacter_1216_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 4));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(2999) - 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_1216_4_a_be();".
// 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_1216_4_a_be( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1216_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<3,R![-46208, -26144, 15424, 2516, -797, -97, 9, 1]>,<5,R![70528, -1101184, -193600, 46234, 2537, -447, -5, 1]>],Snew);
    return Vf;
end function;