
// Make newform 688.4.a.i in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_688_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_688_4_a_i();".
// 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_688_4_a_i();".
// 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 := [60, 276, 251, -16, -32, 0, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0], [30, 103, -36, -24, 2, 1], [-16, -51, -17, 3, 1, 0], [16, 59, 17, -3, -1, 0], [-19, -17, 1, 1, 0, 0], [-74, -153, 6, 26, 0, -1]];
    Rf_basisdens := [1, 8, 2, 2, 1, 4];
    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_688_a();"
function MakeCharacter_688_a()
    N := 688;
    order := 1;
    char_gens := [431, 517, 433];
    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_688_a_Hecke(Kf)
    return MakeCharacter_688_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+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], [-1, 1, 0, 0, 0, 0], [7, 1, 0, 0, -1, 0], [-2, 0, 0, -1, 1, 2], [3, 2, 0, -3, -2, 1], [7, -2, 3, -2, 2, 3], [4, 3, 2, -1, 2, -2], [11, -3, 3, 2, 0, 2], [-24, -5, -2, -1, -11, -6], [81, -5, 13, -1, -4, -6], [-42, -1, 11, -2, -8, -14], [47, -3, 7, -16, 17, -14], [78, -17, 3, -17, 4, -23], [43, 0, 0, 0, 0, 0], [-79, -5, 29, -7, -4, -13], [67, -30, -9, 19, -35, 2], [-62, -30, -10, -11, -3, -11], [-208, -4, 3, 20, 29, 4], [113, -78, 0, -7, 6, -63], [62, 28, -17, 45, 54, 16], [148, 92, 28, 45, -43, 8], [297, 53, -60, 12, 23, 37], [79, -102, 42, 26, 11, 48], [576, -62, 9, -10, 53, -36], [4, -29, -3, 54, -79, -76], [-153, -46, -51, -85, 15, -16], [414, 47, -86, -66, -40, -87], [166, 38, -92, 7, -43, 31], [-105, 54, -77, -20, -22, -81], [258, 18, 18, 68, 28, 130], [144, 35, 129, -35, -9, 99], [-211, -197, 112, -103, 151, -50], [740, -78, -90, -166, -54, -12], [601, 208, -84, 124, -139, 112], [181, 111, 94, 135, -3, -56], [734, 20, 60, -79, 27, -28], [1529, 99, -64, 103, -18, -70], [435, -157, 34, -36, 89, -64], [-1043, 324, -94, 0, -145, 92], [1140, 38, -6, -44, -30, -32], [-903, 183, -77, -39, 3, -6], [398, -64, -72, -39, 121, 243], [98, 94, 28, 18, 96, -26], [-332, 263, -29, -84, 117, 106], [-208, 114, -356, 77, 105, -5], [1648, 266, -45, -19, -218, -72], [-1485, -253, -135, 88, -109, -146], [-1150, 304, 81, 6, -157, -2], [-1385, 167, -42, 13, 44, -18], [57, 102, 107, 88, -170, 123], [-1272, -302, -152, 60, 120, 128], [315, -113, 60, -172, 189, -113], [-3766, 162, -93, -47, 120, 188], [-1089, 28, -120, -79, -312, 151], [986, 176, 40, -43, 37, 366], [14, 104, -17, 415, -420, -86], [875, 162, 19, -106, 38, 417], [154, -559, 68, -86, -106, 103], [1165, 35, 191, 153, -29, -82], [-652, -667, 144, -96, -433, -149], [197, 198, 42, -186, 127, -220], [3438, -308, 432, 75, 185, 117], [-435, -258, -284, 124, 241, 86], [927, -322, -46, -149, 462, 251], [1302, -94, -108, 41, 7, 226], [3873, -294, -47, 36, -106, -149], [-3040, 636, 215, 240, 95, 486], [-2780, -813, 154, -490, -555, -555], [-3477, -747, 560, -396, -265, 2], [201, -301, -72, -156, 38, 172], [1113, -390, 49, -48, -400, -813], [750, -489, -325, 94, -228, -1154], [-2621, -739, -275, -637, -766, -659], [1001, -359, -656, -399, 480, 260], [69, 400, 386, 115, 536, 461], [-5936, -832, -397, -367, 350, -508], [1894, 156, -507, 125, -112, 24], [-2578, -676, -130, -737, 113, -151], [-1338, 1041, 46, 446, -239, 445], [-4224, 42, -517, 42, 235, -196], [2210, -484, -233, -710, -153, -184], [4365, 259, -679, -492, -30, -522], [-334, -289, 417, 81, 861, -11], [1726, 360, 163, 170, -501, 162], [2490, 245, 717, 366, -440, 656], [3016, 756, 88, 359, -453, -341], [-2784, 1360, 473, -128, -51, 248], [-3572, -800, -47, -160, 125, 2], [3238, 664, -244, 201, 101, 695], [-2192, 254, -536, 219, -225, 600], [4435, -681, 348, -241, 571, -436], [9894, -169, -854, -191, 273, 228], [7351, -105, -508, -395, 484, 248], [4565, 1137, -273, 363, 265, 494], [-1641, 1451, -308, -396, -150, -20], [5070, 1392, -104, 542, -472, -48], [1269, 1698, -419, -67, 643, 74], [5730, 1886, -593, 182, 17, -622], [2159, -417, 1035, -221, -470, -954], [-1569, 0, -309, -355, -889, -1546], [4521, -1068, 72, -1084, 691, 218], [-1347, 294, -85, 208, 484, 627], [-539, -350, -574, 501, 1542, 5], [-1775, -624, 113, 29, 543, 1926], [-6691, -713, -667, -777, -674, -1306], [-5492, 1146, 386, 783, 847, 1070], [2522, -1236, 1039, 371, -458, 538], [4764, -350, -1100, 569, 295, -164], [15344, 1233, 417, 197, 269, 891], [-374, -730, 525, 57, -64, -150], [-5504, -1016, -113, 309, 450, 866], [3894, -2264, 264, -27, 1535, -547], [2438, -1483, -603, -312, 837, -542], [-4412, 324, -1446, 236, 1534, 398], [-278, -424, -334, 1216, -60, -188], [-622, 88, -218, -671, 1763, -270], [3714, 1978, 28, 1219, 801, 2649], [2202, 458, -1056, 598, 996, 334], [12021, -777, 198, -1231, 162, -888], [10601, 970, -242, -121, -1334, 379], [-2775, -1188, -411, 603, -1785, -248], [11674, -430, 299, -628, 561, -92], [11099, -543, 507, 662, -988, 882], [-8941, -982, 1036, -1019, 1044, -599], [-4042, -1492, 390, -837, 937, -1164], [-4748, 1710, 644, 873, 631, 605], [-5193, -1382, -163, 84, -956, -1493], [11649, -1157, -139, 734, 569, -1038], [7862, 554, -601, 637, 748, 1128], [-15651, -1549, -217, 310, 615, 40], [1579, 1783, 733, 1040, -1961, -1810], [3382, 610, 82, 360, -136, -918], [4600, -60, -135, -1958, -1021, -1012], [-433, 169, -513, 776, 385, -2038], [-11634, 462, 534, 248, 1056, 2014], [-3373, 2147, -1005, -1089, 444, -779], [14663, 1375, 404, -582, -1674, 262], [6394, -530, -1764, -1435, -325, -1825], [19130, -944, -290, -619, -495, 905], [-7475, 1001, -181, 1583, 304, 1349], [-7441, 159, 1451, 993, -1267, -1608], [-5939, 782, -581, -318, -1500, -1177], [-6849, 814, 1822, 1081, 1096, 89], [3496, -464, -1416, -556, 1270, 2660], [-1835, 1567, 1320, 1859, -1225, -514], [-1912, -1958, 1030, -395, 689, -194], [1355, -706, -1411, -105, -213, 642], [11669, 1359, -214, 813, 1932, -206], [-2283, 4645, 491, 1144, -692, 542], [-2640, 3526, -1494, 1584, -2128, 1412], [-5223, 2538, 67, 2669, -815, 1156], [16152, -385, -370, 948, 1863, 95], [-6817, -142, 2296, 557, 1414, 1931], [-4426, -2112, -398, -1564, 632, 182], [-16235, -4804, 710, -1274, -1017, -430], [3178, 4138, 1181, 56, 247, 1690], [10366, 1015, -2947, 1745, -1843, -1681], [-9706, -900, 1339, -1517, 2100, 94], [17308, -4054, 1739, 540, 725, -920], [467, 1068, 1259, -800, -668, -2087], [4989, -1012, 590, 1252, 2669, -1478], [-9384, 4540, 1709, 1198, 949, 1918], [-14668, -1519, 102, 688, -1164, -2669], [14645, -2848, -1296, -61, 270, 1093], [-7325, -3261, -1915, -83, 20, -2993], [-5144, 2034, 498, -1631, -139, 506], [-11080, -728, -1271, -1400, -2069, -3402], [-305, -485, 210, 2580, -2774, -608], [596, 5162, -1801, 989, -4386, 250], [3176, 1742, 486, 732, 908, 1064], [7867, -717, 1773, -160, 3047, 1206], [-6121, -4039, -2131, -2230, -442, -3002], [-12948, 964, 1039, -568, 1321, -638], [-2682, 27, 1193, 904, -2459, -3800], [-2434, -1864, 2294, 2068, 700, -1194], [-10403, 91, -1762, -1396, -1715, -2283], [-4433, 3273, 98, -1425, -2281, 662], [5673, 175, 294, 798, 3717, -514], [2494, -1094, -2332, 285, 2821, 2437], [4873, -231, 1111, -2086, 3166, 2004], [-15140, -1742, 221, -474, -609, 1558], [11676, -5008, 1762, -73, -1045, -1645], [-20912, 2200, 1146, -1343, 379, 1338], [2722, -5136, 1760, -1763, -1223, -2704], [-5558, -354, -1569, 1334, 1049, 4620], [6976, -1468, -511, -531, 274, -782], [-1929, 1325, 312, -1676, -1325, -1590], [-3393, 3535, -1574, -104, -3152, 2542], [6371, 1411, -2241, -611, 1446, 1149], [-11930, -4918, 2383, -2558, 221, -3494], [2564, -3761, -2118, -4290, -263, -1045], [17617, -33, 2862, 2476, 2671, 1622], [870, 3582, 2514, 1379, -245, -617], [-1401, 1539, -2618, 893, -1624, 566], [4190, 2524, -1766, 2487, -2219, -1664], [11978, -2238, 214, 1606, 3690, -1302], [14490, 2547, 2057, -1732, -4299, 806], [1027, 5292, 393, -1006, -1590, -2299], [-893, -1651, -870, -38, 737, -2851], [20722, -2062, 884, -1475, 2747, -60], [-16983, 348, 3611, 3423, 2021, 3282], [-22446, 2880, 1971, 1017, 720, -2632], [-7348, -4932, 130, -768, -4196, 74], [18720, -558, 334, 2276, 3660, 1940], [-27913, 4495, -536, 1762, 692, 5358], [30777, 2115, -1679, 716, 1811, 3208], [-11084, 1936, 1779, 3667, -366, 2320], [15851, -4182, 1058, -930, -2751, -1644], [316, 3602, -229, -9, -4310, -1992], [-24883, -5180, -1558, -4866, 4007, 220], [1882, -5108, 4514, -3862, 360, -2298], [30859, -4446, -893, 1241, -1191, 348], [-2091, -100, -754, 2978, -143, -3740], [16627, 5632, 1826, 3423, -4178, -2531], [12778, -106, -2378, -603, 2661, -86], [-7820, -3815, 436, 2067, -518, 1140], [24584, 680, 641, -2146, 5749, 1616], [44078, 42, -4510, 836, -762, 352], [24146, 4952, -1495, 1066, 5067, 2910], [-22509, 2358, 1671, 854, -1172, -2019], [-39681, 1509, -1689, 2767, 1263, 1052], [12866, -7358, -2910, -4165, -1823, -3157], [16054, -3182, -1070, -1075, 1933, -3038], [38634, -2433, 3280, 1291, -1151, -5038], [-1951, 4477, -6103, -782, -1184, -2378], [-11219, -2050, -381, -3643, 581, -728], [44929, -2158, -271, -4588, -308, -947], [-21738, 846, -1644, 699, 411, 1314], [-3252, -8678, -1032, -3772, -3898, -3396], [-28933, -1075, 47, -656, -2878, -4832], [14265, 3727, 1478, -680, 124, 5720], [13913, 546, -1294, 1874, 4017, 150], [3728, 1363, -986, -863, 3619, 5016], [36448, 1964, 875, -509, -246, 5912], [7605, 1472, 1406, 1422, -1117, 3170], [21759, 5037, -3247, 567, -178, 1239], [-8472, -496, -4141, -695, -2632, -6574], [27695, -9404, 1727, -4089, -285, -6604], [-7325, 3287, 1604, -3392, -4593, -1774], [-25116, -5315, 3614, -1011, -457, -1898], [-6417, -1571, 1427, 2158, 665, -1616], [-34545, -273, -1764, 1329, -606, 270], [29499, 2995, 3796, -2521, 1878, 6186], [9344, 778, 2018, 3697, -4389, 2945], [-20646, -210, -4005, 2605, -4804, -2658], [3041, -2643, -820, 700, -6653, 1851], [-48508, 7916, -2468, 2212, -3500, 2460], [-8585, -1932, 6352, 512, 2727, 3894], [10127, -2288, -5880, -3139, 664, -1837], [3412, 3793, -2308, 1916, -146, 4821], [438, -4132, -70, -5857, 1071, 865], [-40123, -3786, 4101, 1566, -150, -1435], [48087, -2508, 1550, 314, 4371, -472], [-9182, -2056, 562, 4436, 3070, -4440], [22029, -1379, -416, -546, 3386, 1040], [21485, -9081, -4335, 1106, -737, -5300], [3363, 1387, 5911, 4264, 1698, 2730], [5827, 738, -48, 4193, 7012, -2193], [16378, 10148, -2742, -847, -7083, -1504], [282, -9625, -1045, -2017, 7396, 1871], [15372, -9374, 2297, 2419, -4244, -3904], [16543, 7609, 736, 2176, 2947, 6300], [14958, 5380, -1970, -862, -1324, -2528], [38522, 1324, -5898, 2977, 1177, -1793], [21534, -4714, 6301, -714, -3529, 394], [5807, -2929, -6540, -753, 2147, 712], [-1929, -2369, 3888, -1603, -3393, 1122], [-57660, -2193, 865, -2733, 3176, 433], [-8238, 6748, -4624, 762, -6512, -5018], [-42299, -5138, 5965, -4614, 2640, -11], [-13885, -5336, -1019, -1973, 2119, 3744], [15103, 3685, -2018, 4986, 587, -692], [12880, 3206, -2545, 5452, -903, -2434], [9006, -3372, 889, 1762, 1275, 6530], [-29701, -6709, -1593, 227, -1736, -4867], [-9566, -8638, 957, -2508, 4619, -282], [23911, -2502, 6266, -5213, -2402, -6797], [-22041, -4909, 4789, -2431, -5021, -2572], [14828, 7, 3604, -4154, 4311, 2375], [16881, -2739, -4897, 1993, 5835, 3478], [-15158, 3629, -7219, 2410, 1404, -2214], [46811, -1131, 1753, 2134, 1505, 7820], [-30750, 893, 2649, 1733, 1899, 4407], [-911, 7397, 3159, -1177, -5416, 1526], [-2653, -3811, 2605, -1205, 8318, 2224], [-32512, -1106, 5328, 2483, 1501, 4324], [4182, 7575, 3675, 8443, 2032, 4831], [21513, 2181, -2176, 1098, 398, -698], [12458, 1502, -845, -3564, -1385, -11090], [-53392, -6013, -3711, 2127, 2944, -1405], [-16379, 8720, -705, -267, -33, 2312], [-10045, 2122, 1856, 4414, -4199, -1128], [-10285, -1155, 1654, 3668, -837, -2233], [2303, 11407, -2554, 6421, 3359, 8230], [-33797, -3438, 4765, -2847, 1369, 4110], [58815, -2260, -1721, -3440, 5368, 1033], [-62488, -6001, 3568, -3826, 2376, -1349], [30037, -5160, 4127, 628, -754, -6819], [-24866, -8586, 3792, -5039, -8279, -1333], [-18946, 2574, 5068, -268, 8448, -42], [-41828, 7163, 498, -3229, -1170, 5290], [-33395, 3321, 1510, -1140, 7799, -3530], [-7731, -6548, -2372, -7606, -2445, -9110], [-5921, 4150, -166, -12, 4483, -2046], [38437, -1323, -7131, 3429, -6138, -3208], [13862, 8468, -164, -3940, 1054, -2648], [1905, -7818, 4248, -1073, -8602, -1583], [49885, -7295, 1898, 3389, 6230, -3432], [-25912, 4406, -3589, 3482, -1865, -4934], [10901, 4597, -8889, 3504, 1780, -3680], [-35448, 1546, -4962, 392, -184, -4490], [-77638, 2708, -3137, 5206, 3273, 2734], [-22808, 623, -2435, 2970, 2369, 6074], [16233, 8555, -2267, -1264, 818, -458], [-24266, -2187, -663, -814, -1808, 8824], [85616, -4767, -951, 1135, -992, -1717], [2134, 7274, -8924, 1051, 3579, -3447], [12338, 8158, 2546, 9083, -4071, 1763], [5236, -4967, 5852, -6170, 5081, -5481], [10836, -7102, 5167, 3899, 3468, 5854], [4495, -9546, -348, -3345, -10652, 165], [-13384, 8364, 1270, -896, 4658, 2254], [-35385, -8065, 6608, 1869, -6337, -3456], [-62646, -2338, -3782, 2317, 371, 655], [-87354, 6074, -2537, 3819, -1990, 4192], [-16480, -9657, 2634, -2251, -716, -1926], [80262, -1436, -1638, -1251, 6227, 6448], [-48793, 2840, 2916, -167, -1230, 7581], [-8835, 6473, -1990, -7371, 6092, 6908], [-10413, 3431, 568, 5110, -5162, -11064], [31194, -4564, 3086, 571, 7183, -286], [5603, -5842, -2769, 494, -3386, 123], [28404, 7044, 3160, 2661, 1297, 11874], [-67203, 10579, -1454, -2418, 2956, 240], [1026, -5766, 454, -4721, -5543, 7511], [52253, 10962, 1314, 6844, -8825, -5592], [10016, 5356, -1214, -128, -5692, -10570], [-28070, 11160, -435, 3673, 5920, 7622], [-14020, -8724, -2852, -2212, -2950, 7822], [73966, 6166, -2093, 6336, -3537, 630], [60173, -5164, -4635, -591, -2643, 2680], [-46224, -2552, 1785, 5314, 7135, -4364], [-24540, -2912, -4603, -5101, 5852, 4370], [-18054, -5106, 1519, 2760, 12203, 1740], [53031, -12400, -591, -2526, 60, -2259], [-53997, 94, 5760, -436, 2699, 4042], [-8799, 13205, 2100, 1084, 1448, 12768], [-64604, -8644, 4376, -4012, 4818, -6884], [-10098, -5030, -5272, 4458, 8318, 5340], [59299, 15380, -12457, 9161, -4723, 1646], [25728, 8024, 724, 3167, -3103, -7495], [-40690, -4390, -3270, -5545, 2531, 7986], [-80140, -9858, -4622, -5891, 10109, -2543], [-29082, 1392, 4014, 2913, -11117, -1500], [3884, -17502, -6354, -1045, 3635, 27], [-11552, -14502, -4404, -7035, 951, -1796], [-5998, -9578, 4576, 2072, -5818, -10396], [2893, -2277, -975, -6242, -2393, -5486], [-9508, -1439, -1808, 4223, -6062, -8838], [-45724, 3451, -9803, -2576, -10570, -11266], [80319, -2433, -4662, -987, 11585, 5676], [-121244, -7078, 6033, -6252, -991, 4320], [-50192, -1934, -3876, -2331, -5153, -13506], [25931, -10623, 3305, 990, 10942, 8190], [40161, -5356, -7506, 2043, 1978, 1327], [-61768, -5112, -7732, -6944, -2940, -7614], [2881, 11857, -1460, 9315, 498, 16484], [44465, -15473, 5001, -2023, 2808, -8423], [17600, 5154, -3100, 1445, 6385, 12186], [21311, -735, -10907, -2164, 3020, 3400], [80505, -7279, 10957, 4887, -2876, -5250], [-27853, -11381, -294, 4228, 8407, -3603], [-42771, -373, 4716, 490, 527, -2982], [21830, -11543, -7873, 6854, -1074, -8060], [-2600, 9064, -8015, -1323, -1630, 5116], [-57609, 785, 4394, 8143, 1042, 9066], [8890, 13394, 7212, -673, -1545, 2881], [69168, 4347, 5736, -5152, -6799, -8583], [48184, 6628, -6241, -9270, -1099, -3904], [2742, -6112, 3277, 3486, 11867, 8978], [35949, -6160, 5999, -3965, 9825, 10348], [-50626, -821, -8941, -1699, -3518, 2269], [-790, 4119, -847, -4387, 17505, 3209], [-67960, 12470, -4578, -3827, 3523, 2584], [-65675, -4994, 210, -6069, -11416, -19911], [26134, -2151, 3947, 11249, 6977, 4083], [-44234, 12032, 422, 11239, -4033, 13320], [16299, 11768, -1913, 10478, -1314, 6881], [-60420, 3924, 3872, 971, 7105, 9], [-79555, 5206, 566, 8139, -3292, -5667], [2664, 19855, -1266, 13976, -8037, 6085], [77843, 4011, 7597, 6837, -7716, -2514], [-2764, -1296, 10772, -7996, -10464, -6322], [39417, -1556, -8434, -3262, -12657, 4276], [-43792, -3324, 7646, -2551, -5791, 4460], [118833, -265, -6764, -4896, -2869, 249], [3524, 1775, -457, -3179, -5679, 7033], [-6794, 3126, -7497, 1510, 11065, 4372], [-129433, -5075, 4573, -3419, -2189, -2006], [-8345, -18281, 3782, 3286, 15, 806], [113427, 12068, -2389, 6129, -3873, -11034], [-68497, 21557, -10148, -3498, 27, 8697], [35256, 12037, -5262, -3112, 11940, 9443], [25433, 5431, -14922, 1930, 2483, 6155], [124583, -7001, -2182, -5709, -73, -6446], [60002, 1938, 2010, -8425, 13783, 62], [45605, 12793, -7296, 1845, 5503, -7948], [-103785, 8675, -3977, 131, -1180, 14201], [120439, 20967, -4857, 3098, 5912, -4284], [25259, -1066, 3616, 9072, 3365, -5274], [-26983, 8859, 852, 1998, 2953, -2271], [64014, -17016, 611, 4809, 8698, 852], [-95613, -797, 12397, -2774, 529, -5154], [-22049, 24540, -5536, 7032, 8213, 10276], [22530, -11344, 9573, 1736, 2911, 7592], [-107819, 186, 3527, -5497, 9749, 4798], [-96413, -9550, 6392, 2233, 2774, 18699], [-17111, -13703, -7628, -13270, -3307, -2943], [-70860, 16774, 8114, -2055, 1491, -4277], [-134554, 2386, -6184, 8873, 4427, 9192], [-36711, 28177, 3521, 2215, 4987, 16538], [-76066, 9552, -7584, 5043, -4999, -2075], [36452, -9996, 5408, 4149, -5367, -14976], [-49885, -8284, 338, -4911, 5698, 1329], [59920, 13410, 1421, 3995, 9744, 3584], [12921, 21693, 9058, 3439, -7304, 3352], [-7445, 14363, -16477, 3654, -18613, 1392], [-60478, 3102, 7567, -3254, -1447, 7738], [-35579, -8378, -1880, 12730, 8749, 246], [-52770, 14452, -11271, -2902, -5583, 10956]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_688_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_688_4_a_i();".
// 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_688_4_a_i(:prec:=6)
    chi := MakeCharacter_688_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_688_4_a_i();".
// 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_688_4_a_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_688_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<3,R![11156, 11756, 2140, -588, -97, 7, 1]>],Snew);
    return Vf;
end function;