
// Make newform 2205.4.a.bz in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_2205_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_2205_4_a_bz();".
// 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_2205_4_a_bz();".
// 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 := [28, 152, 154, 12, -23, -2, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0], [-64, -86, 8, 23, 0, -1], [-144, 60, 18, -23, 0, 1], [-164, -638, -298, 89, 26, -5], [-428, -476, 8, 49, 0, -1], [264, 800, 240, -155, -26, 9]];
    Rf_basisdens := [1, 26, 26, 26, 26, 26];
    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_2205_a();"
function MakeCharacter_2205_a()
    N := 2205;
    order := 1;
    char_gens := [1226, 442, 1081];
    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_2205_a_Hecke(Kf)
    return MakeCharacter_2205_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, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [-5, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [7, -5, 5, 1, 5, 2], [-27, -2, -4, 8, 5, 0], [1, -16, -10, 4, -2, -1], [-52, 6, 10, -4, -3, 3], [56, -3, 11, 9, -8, 6], [-21, -39, -7, -13, 1, 8], [-68, -11, -29, 17, 0, -10], [-8, -33, -11, -9, 28, 4], [86, 11, -7, -3, -15, 37], [-74, 0, 8, -16, -34, 2], [81, 50, -14, 32, -9, -2], [146, -73, -35, 19, 60, -2], [162, 49, -33, 47, 59, -11], [-84, -132, -48, 4, 10, -24], [330, -51, 31, -35, 12, -12], [-26, 116, -60, 92, 0, 14], [-414, -64, -60, -46, 85, 11], [237, 67, 25, 65, -55, 10], [70, -32, 80, -154, -41, -69], [-378, 74, -62, -80, -79, -33], [-63, -134, -72, -14, 84, 77], [330, -26, -14, -182, 76, -108], [-267, -110, 46, -56, -157, 70], [606, 148, 12, -152, 54, -268], [-75, -105, -93, -59, 19, 28], [44, 139, 101, 127, -138, 52], [-318, 219, 193, -145, 26, 74], [-196, 57, 79, 3, -209, 19], [-724, -280, -236, -68, 128, 96], [-856, -239, -201, 183, -5, 3], [-208, -228, 136, -176, -158, -124], [-215, -297, -199, 9, 187, 256], [-482, 390, 138, -222, -350, -130], [-1796, 41, 287, -51, -166, -126], [905, -2, 342, -188, -277, 142], [-191, -504, -306, -230, 297, -216], [434, 512, -96, -188, -42, -344], [-600, -29, 169, -293, 14, -242], [-1293, 555, -19, -51, -273, -234], [-416, 188, 40, 328, 200, -204], [194, -259, -189, 365, 172, 298], [-568, 241, 487, -31, -32, -398], [237, -743, -245, 547, 95, 244], [-309, 898, 594, -128, -189, -412], [1545, 164, 556, -436, 32, -195], [-148, 713, 571, -555, -578, -402], [1504, -386, -190, 382, -240, 144], [-2151, -81, -451, 249, 203, 200], [-2052, 749, 211, 551, -51, 355], [428, -699, 315, 351, 277, 133], [-3300, 178, 314, 40, -421, 139], [1570, -594, 418, -174, -134, 296], [-1822, -1127, 351, -219, -12, 74], [-3228, 20, 652, 136, 84, 92], [888, -745, -575, 215, 490, -10], [-195, -815, -459, 567, 227, 362], [-2819, 764, -72, -292, -36, -127], [-1787, 1424, 122, 62, -41, -178], [-1563, -1012, 136, 672, -26, 799], [-710, 1026, 510, 2, 318, 12], [171, 350, 48, 374, 416, 27], [-1054, -288, -512, -180, -234, 434], [550, 1274, 222, 494, -286, 294], [-3716, -625, -1143, 843, 224, -168], [3320, -2417, -403, 599, -206, -86], [114, -8, 200, -560, 2, 754], [-5387, 1870, 68, -190, -138, -169], [2536, 1160, 1492, -1160, 4, -464], [73, 1016, -620, 50, -139, -560], [-1400, 352, 288, -260, -164, 1254], [4038, 420, 812, 136, -686, 718], [2196, 938, 626, -210, 422, -390], [1401, -707, -223, 299, 819, -1256], [-3647, 516, -338, -954, -315, 376], [3919, -169, -1309, 965, 307, 318], [2224, -914, -1190, -448, -227, 129], [586, -495, -1513, 595, 953, -289], [-3215, -929, -829, 729, -323, 966], [2033, 1903, 517, 97, -621, 1240], [-1064, 1960, -296, 278, 559, -537], [-7402, 851, 285, 1227, 168, 656], [-2750, 2744, 1524, 208, -362, -812], [-4317, -169, -233, -539, -341, -942], [-550, 391, -475, -737, 620, -1724], [-2256, -2070, -2182, 1282, 1324, 1030], [-2744, 54, 502, 1122, -676, 1820], [381, 450, 730, 134, -26, 1675], [998, 555, 5, 643, -662, 718], [776, 1491, -231, -1373, -352, -1354], [-3027, 541, -1329, -601, 507, 16], [4015, 387, 405, 217, 1465, -716], [-4025, 2468, 1036, 586, -817, 1020], [1650, 1213, 43, -1063, -708, -1774], [-1968, 2108, -396, 1966, 335, -537], [-6278, -2250, 194, -260, 451, -1673], [-10897, 781, -123, -1597, 1199, 562], [-3200, -108, 684, -520, -1912, 662], [10404, 256, 204, -2416, -1192, -1290], [1604, -178, 990, -1480, 477, 619], [-12200, -888, 224, -556, -1362, 1040], [-2234, 2006, 910, -2062, -730, -174], [6115, -1734, 4, -254, 688, -1505], [-810, 1398, 214, 36, 915, 2127], [-2335, 332, 902, 1360, 690, 835], [-5053, -4183, 215, 203, -1445, 586], [3420, 2264, -1536, -1138, -1033, -1089], [-2165, 3636, 1148, -2014, 939, -1564], [1378, -1964, 1780, 52, -600, 2684], [4696, -2387, -1629, 2905, 112, 2128], [-5084, 3719, 889, -971, -1671, -1275], [5219, 2505, -1093, -365, -201, -2154], [7468, 1858, 214, -714, -42, -2216], [-165, -3202, -1234, 674, 2346, -1451], [-4508, -134, -102, -530, -42, -46], [-4714, 1152, 284, -988, 768, -1884], [-8595, -1821, -711, 1845, 1383, 162], [5360, 3704, 540, 4, 1078, 416], [2080, 922, -2062, -250, 1136, -656], [-3605, -1920, -2918, 2054, 267, -1080], [-6192, 2150, 1390, -1094, -2800, 1132], [-12438, -1382, -2658, 900, 521, 677], [-3041, -2009, 555, 305, -755, 1440], [2673, -905, -2041, -883, -757, -824], [1362, 3399, -55, -641, -302, -1298], [3154, 4262, -322, 494, -1952, 18], [7175, -4608, -594, 1802, 393, 3342], [-9795, -149, -215, 1077, -1385, 1074], [938, -3219, 1695, 185, -1930, 770], [-819, 5043, -1195, 3165, 475, -1520], [-852, -2408, 1572, 252, 2914, 240], [-9324, -3149, 1789, -179, -1027, 1663], [2100, 2090, 542, 768, 2531, 707], [-277, 282, 848, -1156, -2527, 2570], [-4675, -200, 3072, -2232, -2544, -583], [-5211, 1884, -1370, 958, -2903, 880], [-17067, 5009, 2137, -1001, -2421, -646], [-23472, -1115, -581, 1667, 363, 931], [-14593, 6091, -1641, -375, -1377, -2938], [-2190, -3047, 3231, -435, -2068, -92], [5256, -2319, -2789, 701, 3222, 2440], [-7376, 2787, -87, -1069, 80, 604], [-5542, -4821, -4907, 1451, 5162, -862], [-14618, -1824, 1060, -20, -2154, -1938], [10640, 374, -3102, -3732, 2439, -3845], [2074, -5282, 970, -2040, -1907, -55], [22794, -3421, -1547, -3225, -604, -4396], [-10474, -2008, -388, -1940, 3504, 1636], [2422, 434, 834, 336, -1989, 3649], [-5100, -3774, -830, 2150, 1900, 580], [14970, -1530, 926, 2174, 1388, 1946], [9064, -2153, -207, 4703, -654, 740], [-11008, -3764, -816, 3940, 1908, 1192], [13255, -7251, -2697, -2713, -249, -42], [5810, -1091, 4103, -2289, -593, -21], [-8981, -5634, 852, -3526, -3782, 2253], [10692, -934, -118, -502, 5642, -696], [-2290, 5809, 187, -1803, -4756, 430], [-7578, -1639, -5089, 805, 2962, -672], [9342, -808, -2264, 2480, 3472, -2482], [17450, -1087, 1967, -1493, -1857, -623], [19166, -44, 1780, -388, 2450, 2564], [9607, 610, -54, 6308, -883, -626], [17502, 3286, 2806, 222, -3468, 2582], [16745, -4200, -4390, 3734, -241, 182], [-7109, -4021, -873, 1397, -451, 1530], [-12380, 2580, 2288, -156, -44, 4114], [-13478, 9418, 4906, -2834, -878, -1100], [-5886, -7550, 1590, -3122, 1518, -514], [-23459, 929, -753, -4049, 1349, -2002], [7844, 7457, 1891, 1369, -1658, -3604], [17530, -8490, -1126, 5170, 2796, 486], [11314, -8584, -2012, -778, 1115, -759], [-4809, 1981, -1557, 4067, 1741, 1548], [-10633, 1465, 3717, 1971, -2511, 3248], [23378, 6470, -2, -2046, 2506, -372], [3832, 1984, -2500, 3056, 2050, 768], [21964, -5864, -1100, -2072, -1710, -3874], [3490, 6462, -2350, -1664, -3597, -6405], [-5654, 5398, 982, -950, -1056, 1496], [11276, -8688, -1856, 762, 805, -443], [10152, 2200, -2172, 4496, 3086, 66], [4146, -4545, 1633, -1849, -132, 6798], [4794, -7799, 1083, -2187, 1136, 3850], [-11915, -6190, -4902, 4970, 5012, 1237], [-115, 79, -2533, 901, 2919, -1942], [-25376, -1838, 926, 2930, 1786, -4782], [-2388, -2932, -156, 3094, -1227, 3077], [-58, 5784, 1788, -2688, -234, 5048], [26673, 3149, 1199, -561, 4043, -780], [28136, -5963, -273, 3617, 6882, -1486], [24880, 3074, 4374, 2074, -552, 840], [-7301, 1828, -2970, 4708, -2464, 1279], [-5465, 2515, 3167, 1057, 679, -5670], [-14890, 4069, -3317, 1057, 2466, -3292], [-2993, 4444, 5686, 5168, -4634, 2313], [-41829, 11208, 748, -1554, -189, -3924], [-17756, 7472, 6448, -3204, -4434, 1636], [8502, 508, -2212, 1316, -264, 5974], [910, -10392, -10444, 2728, 5660, 896], [5336, 1018, 158, -3980, -705, 2743], [-40356, -5100, 84, -1078, 4493, 3479], [-13869, -928, -1166, 426, 4009, -7786], [20306, 4011, 5565, 1671, -438, -3178], [-604, -8320, -7336, 7780, 2708, 7782], [-9348, -508, -240, -5796, -3520, 1208], [2854, 3484, 964, -4722, -4897, 5271], [20966, 2891, -235, 735, 270, -6020], [14154, -3971, 1475, 837, -1394, -1308], [-5674, 3403, 2741, -8005, -5078, -822], [-3611, 1468, -4124, -400, 4902, -181], [2378, -10702, -1066, 4006, 1710, 6016], [7510, 3540, 1720, 1358, -1557, 1889], [11132, -10049, -9439, 6247, -378, 1472], [15666, 2505, -8085, -4017, -557, 2527], [-6618, 3076, -1176, -2820, -3382, 6512], [-10212, 5005, -1797, -271, 236, -3888], [-3950, 8760, 3152, -6996, -3306, -1026], [-26042, 4230, -5502, 218, 450, -1000], [5135, -4477, 19, 5705, 2543, -3598], [12378, -7150, -8778, 618, 3924, 1402], [-3779, 4384, 7524, 5116, -7054, 6931], [12774, -11912, 6096, 5380, -2558, 4638], [-25695, -4446, -1652, 3294, -5470, 2003], [-23211, 53, 4263, 271, -3689, -924], [4637, 10288, 6856, -3278, -911, 704], [-1726, -7652, 560, 7744, -3230, 9698], [15788, 1372, 1556, -9716, -6758, -504], [-17728, 15102, 9778, -1624, -4895, 1003], [20838, -716, 9384, -164, 3768, 974], [15187, -12891, -7259, 1587, 5387, -858], [-33749, 986, -3854, -6922, 2098, -2163], [-32757, -5076, 2748, -2622, -161, -2216], [-18698, 12163, 1745, -3707, -1419, -11727], [-28148, 16316, 16, 676, -5128, -250], [-17583, 3663, 12037, -6479, -4901, -4752], [-37710, 5523, 6597, -11745, 1836, -6084], [6016, 9210, 5306, -4374, 2112, 2650], [-16454, -1256, 608, 6322, -3687, 6345], [25973, 352, 8148, 3594, -8647, 1840], [13956, 3060, -1336, -5416, -3842, -5300], [-14393, -2906, -9456, 3582, 10792, -1533], [-35798, -642, -806, 9450, -4296, 6570], [-12780, 7148, 7172, 2524, -4740, 2468], [484, 2336, 3632, 3382, -6529, 3117], [-29753, -6835, 3343, 2403, -1479, -890], [30370, 3388, -6640, -892, 2510, -2984], [-17290, -7664, 180, 7136, -3510, 11282], [24020, 5936, 7712, -4722, -2293, 963], [19370, -14701, -8399, -4229, 6172, -2080], [19078, -5338, 94, 8644, 5467, -4271], [25342, -1474, 4166, 5406, 6016, -676], [-17017, 7767, 7737, 4701, -5831, 11988], [-47048, -10172, -8912, 1380, 9456, -1306], [-24932, 5962, -3438, -6296, 5079, 3081], [-22487, -7706, 6896, 11468, -5709, 14006], [-52849, -4908, -5066, 1484, -7088, 6823], [-6558, 1712, 1604, 132, 4068, 946], [11708, -1411, -1845, -5167, -4230, -4914], [-12052, -16021, 3881, 1687, -2580, -572], [-13461, -16430, 2508, 1876, 1013, 5182], [26192, -12668, -15552, 12042, 6151, 6531], [-31412, 17527, 1257, -3787, -10787, -2487], [31055, 12167, 2783, -1867, 4111, -6650], [-27308, -10566, -1322, 13216, 2407, 1795], [-3950, 12909, 2047, -1723, 644, -11140], [-65938, -2336, -6932, -1436, -2204, -1168], [-35928, -81, 741, 2955, -522, 9774], [34098, -1077, -4639, 8847, 5572, 4042], [-7247, 10052, 6810, -1740, -8688, -5939], [-1226, 5750, 14626, 98, -7598, 4784], [3808, -48, -6956, -2626, -8413, -2741], [14627, -2882, 4238, 364, 4259, 12528], [-27408, -15176, -3020, 6384, 3160, 1378], [-22012, 14382, -5398, 2954, 4674, -11556], [-8973, 6815, 7331, 2665, -2943, -2342], [-19932, 14020, 19596, -4954, -9015, -4189], [-13201, 7748, -5272, -9518, 2287, -2272], [29985, -9527, 5455, -15497, -7675, -3434], [-39144, 10360, 13380, -2964, -6854, -6594], [-20298, 23805, 4291, -4867, -178, 324], [-41183, -7106, 5298, -1618, 1748, -13547], [-18187, 8759, 1649, 1785, 1143, 1712], [26438, 7154, -11054, -10170, -2108, 2228], [11566, -11760, 4260, 14616, -6910, 3342], [748, -6801, -3783, 10999, 3876, -2562], [46010, 6363, -8575, -11111, 5317, -14495], [17713, -11071, -16807, 13451, 3681, 7226], [-53933, -11046, -958, -242, 5710, 8377], [-10814, 11061, 11803, -14911, 646, -8628], [81258, -13579, -2469, 3011, 6241, 4247], [-14038, 21676, 8416, 2060, -11018, 1638], [41852, -21325, -4263, 7223, -1594, 10458], [-11618, 1975, -2727, -369, 6908, 636], [10949, 40, 7046, -13430, 3389, -6224], [-3438, 9602, -7538, -5072, -2297, 3575], [-59561, -4474, 14522, -6050, -7636, -9949], [-40887, 2392, 4718, -10784, 2180, -11219], [-33828, 5663, 4601, 2747, 1472, 12912], [22071, -18639, -6497, 9923, 11091, -8010], [-8652, 33370, 20210, 954, -12680, 5458], [-28885, -4823, -1253, -5993, 2709, -10450], [4360, 21737, 13591, 109, 1122, 9676], [-64870, -15086, -7458, -998, 15154, 11090], [-20624, 5006, 12862, -4894, 1990, -7200], [33282, 1866, 8382, -6874, -5306, 4628], [40390, 5915, -9415, -5241, -1800, -5822], [23032, -9226, 8054, -858, 8412, 11212], [-32981, -18065, 9763, -5503, 181, 4848], [17072, -16548, 352, -5676, -1216, -7616], [-38870, -12654, -8246, 6510, -3402, 942], [6178, -9306, -12274, 10790, 20482, 828], [-76098, -8894, -13438, 14048, -8583, 9919], [45328, -5926, 318, 3208, 13579, 6689], [-52969, 13369, 2695, -8469, -1065, -838], [-15555, -5060, -6874, 17340, 684, 6729], [-35141, -5163, 15253, -249, -15039, 5566], [-28096, 6634, -11498, 1988, 8325, -10857], [19106, 4449, -11629, 6041, 16252, 8560], [-21126, -5447, -11993, 18385, 8846, -4172], [-42470, 21247, -2591, -5781, 288, -3760], [1914, 13136, 2356, 3780, 742, -14672], [-97926, -1913, 1757, 3625, 6155, 4387], [-24775, -20589, -14683, 405, 17779, -854], [-46106, -6504, 4012, 110, 1079, 10951], [20978, -15845, -5259, -77, 9922, -9706], [-10730, -13815, 7967, -3475, 7034, -7004], [-19884, -13988, -15576, -6320, -1242, 5672], [41982, -11733, -8163, 8255, 16514, 816], [12186, -9817, -13511, 1371, -5670, 6690], [18573, 6198, 16370, 9334, -5188, 9209], [22610, -15004, -5084, 10504, -3758, 9116], [-27531, 11866, -1794, -6182, -17792, -2259], [-17291, -11811, 14069, -2965, -3717, -528], [5682, -24976, -1924, 12906, 12269, 6987], [16672, 6788, 5172, -23626, 6515, -13001], [-12065, 12138, 13078, 6484, -9871, 62], [2532, -8103, -7993, 6849, 9374, 3854], [2522, 8125, -3905, -9715, -8830, 8780], [30722, -35567, -18977, -535, 13120, 1746], [23237, 15321, -13733, -16721, 5709, -14526], [79468, -8109, 7281, 2699, 112, 6516], [71080, -20334, -19810, -14358, -160, -9966], [-2634, -26091, -1733, 7833, -7780, 1694], [19892, 34774, -9350, 3634, -1600, -4082], [-32218, -35953, -6207, -8309, 7000, -2992], [32235, -22142, 5268, -9476, 2429, 22], [-54150, 24321, -2961, -10701, -3579, -8181], [-28348, 5960, 11048, 10200, 6726, 2944], [9613, 20007, 8051, -1911, -12123, -6194], [-39527, 2334, 10106, 6940, 3643, 11602], [-77723, -11107, 597, 10175, -5291, -454], [-75446, 11764, -13104, -12058, 9885, -15709], [-76450, -10818, 18058, -3370, -1756, -5806], [-45892, 13991, -519, -10943, 7407, -10505], [-45862, 6916, -13400, -232, 11740, -13244], [11536, 19241, 9307, 3177, -3716, 16790], [101772, 8340, -2948, 9256, 4824, -7962], [-30214, 3249, -3837, 7115, -289, 9359], [60742, 6371, -523, 15595, -12866, 1726], [-24317, -21917, -3903, 7297, 20449, 12100], [32782, -12488, 11240, 2090, 12737, 9073], [-65866, 35182, 6910, -16406, -17600, 2208], [14713, 37592, 20622, -590, -10695, 6844], [-91634, 6912, 5276, -14044, 332, -9370], [-26509, -21225, 2715, 7929, 10685, 24218], [-97839, 8797, 8507, -8401, -21, -16376], [-7746, -20774, 5462, -14516, 16623, -13357], [76754, 15879, -4891, -5153, 3728, -10224], [-263, 30995, -6661, 7397, -1487, -4554], [32518, 26958, 21074, -2078, -18054, -9276], [19654, 23338, 25110, -4130, -150, 9170], [68118, 7106, 14046, -1804, -2419, 12117], [-1245, -28767, -17817, -9953, 23621, -18752], [23981, 28192, -13598, -13016, -136, -21075], [-17312, -2323, -4373, 3615, -12085, -10011], [50787, 15324, 18870, -16488, -3214, -13099], [-29470, -3868, 180, 352, 9334, -10222], [11028, 10425, 18187, 15953, -1066, 3672], [93418, -13917, 1217, -15573, -1796, -260], [-13840, -26633, -3167, -1141, -12844, -11608], [-107674, -14601, 1145, 12977, -1169, 25753], [-50985, 36166, 29978, -8252, -10069, -17828], [85429, 18433, 12031, -15281, -16063, 9106], [81731, 24300, 9334, 15206, -3403, -5698], [-6216, 35858, 15774, -4262, -112, -7392], [-9937, -8286, 2898, 8452, 15273, -1254], [8143, 3103, 13023, -9827, -18009, -18130], [-4421, -14780, -5118, 21662, 16225, -3414], [-71033, -12157, -5679, 13297, -11363, 4972], [68138, -13806, -9026, -5052, 1873, 7473], [19271, 8341, -10945, -4837, 9485, -17764], [23484, 42184, 23288, 9320, -5924, -816], [-38656, 19798, 306, 2982, -9746, 21870], [-45446, 29193, 15555, -8505, -16077, 2535], [50067, -8435, -23129, 7171, -2323, -4100], [15300, 11382, -21034, -17338, 6712, -8578], [31756, 20038, 21606, -4946, -20734, -9148], [34566, 11983, 781, -2001, -3518, 13096], [-4316, -16799, -34801, 20385, 378, 1952], [44005, 20724, -1074, -16672, -8614, 7907], [-12732, 8786, -10310, 3698, 20404, 7934], [-2410, -34136, 18216, -4888, -2140, 12314], [14212, 11239, -4583, -5193, -12426, -5890], [151279, -8227, 6705, 4527, -3395, -1786], [14278, -45196, -12296, -3478, -733, -3485], [130490, 8372, 2788, -1634, -1635, 5077], [-27487, -18934, -29180, 5166, 12702, 1103], [51102, 9306, 9374, -9190, -5792, 3572], [24152, 1051, -23951, -18909, 21638, -21326], [-17630, -32496, 2836, -17148, 16282, -3608], [-24052, -25345, 3689, 19875, 2558, 13092], [-135508, 11632, -5396, 11232, -4860, 6350], [-67341, 22247, 19581, -9007, -4593, -5846], [-73292, 11022, -10910, 3226, 13098, -2406], [-20052, -34554, -5038, 4020, -1881, 18183], [108919, -6314, -15574, -9124, -6389, -5820], [-45337, 22281, -2583, -10133, -13491, 18700], [-1614, 25992, 10556, -16368, -27532, 10460], [-25794, 20702, -12646, -11566, -8942, -10000], [35706, -27262, -11018, -10792, 9119, 6783], [124715, -10708, -4266, 11128, -11534, -15763], [35525, 2940, 14114, -4966, 1295, 3818], [74502, -7589, -1259, 17835, -1348, -10042], [22872, -20290, 466, -12586, 20972, -10944], [-72074, -8391, -11121, -23701, 6699, 6545], [23832, 13128, 1224, -424, -3410, -5642]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_2205_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_2205_4_a_bz();".
// 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_2205_4_a_bz(:prec:=6)
    chi := MakeCharacter_2205_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_2205_4_a_bz();".
// 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_2205_4_a_bz( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_2205_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![-28, 24, 134, 28, -29, -2, 1]>,<11,R![-9225436100, -145959100, 14188145, 121780, -7174, -16, 1]>,<13,R![12513937372, 142488452, -18677143, -335452, 5774, 168, 1]>,<17,R![-3807091762, 1617286496, 56343501, -258596, -15392, 4, 1]>],Snew);
    return Vf;
end function;