
// Make newform 224.6.a.i in Magma, downloaded from the LMFDB on 13 January 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_224_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_224_6_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_224_6_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 := [-13998, 7973, -272, -229, 0, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0], [0, 2, 0, 0, 0], [-3528, -20218, -8772, -64, 56], [114075, -8210, -5652, -32, 28], [206833, -46908, -8352, 200, 36]];
    Rf_basisdens := [1, 1, 633, 633, 211];
    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_224_a();"
function MakeCharacter_224_a()
    N := 224;
    order := 1;
    char_gens := [127, 197, 129];
    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_224_a_Hecke(Kf)
    return MakeCharacter_224_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 := 6;
    raw_aps := [[0, 0, 0, 0, 0], [-2, 1, 0, 0, 0], [7, 0, 0, -1, 0], [49, 0, 0, 0, 0], [23, 9, -1, -2, 1], [7, 6, -1, -6, 1], [-82, -24, -2, -4, -4], [-718, 57, -1, -3, -5], [98, 117, -1, 8, 10], [956, 96, 10, 36, -10], [-2096, 48, -20, 30, -10], [3936, 114, -6, 38, 0], [4680, -450, -28, 4, -2], [4403, -249, 39, -32, 3], [3216, -354, -48, 28, 48], [10818, 546, -22, -124, -32], [-14864, -537, -59, 41, 5], [13639, 540, -22, -83, -38], [-5213, -615, -3, 402, 93], [18500, -522, 44, -522, -50], [27236, 372, 4, 140, -58], [19286, 204, -58, 406, -56], [-29328, 945, 8, -678, -68], [37748, 2094, -32, 46, 140], [-17458, 822, -270, 910, -54], [1873, 2742, 175, 76, -235], [47016, 1332, -10, 768, -68], [-30787, 1197, 277, 474, 143], [46808, -1326, 320, 144, 190], [9148, 2859, 129, -2422, 60], [125544, -5379, -153, 1076, 132], [-23208, -8031, -280, -634, 448], [-151118, 1476, -652, -1532, -308], [-167822, -2421, -281, -1083, 455], [-116654, -10284, -10, -1490, 430], [52082, -2709, -491, -64, 314], [-128697, 6666, -363, 3100, 495], [-7383, -11517, -137, -44, -595], [-68976, -13158, -536, -1844, -352], [-199625, 10134, 877, -1220, -697], [-10177, -12675, 1473, -730, 429], [-132603, 3852, 344, -983, -224], [237878, 1890, -1242, -2452, 66], [62544, 16437, 407, -2226, 1252], [-215694, 11058, -556, 3538, 970], [-297000, -2496, -328, 5474, -542], [387331, 7161, 407, -604, 1243], [-114344, -18054, 2292, 9050, 678], [-313102, 19185, -2777, 7709, -565], [429211, 12582, 685, -3148, -1045], [207818, -20028, 72, 3956, 1980], [470640, -21729, -875, -1512, 1088], [438830, 20826, -1812, -4028, 1860], [-673652, -8385, 904, 442, -220], [16938, 36276, -146, 12586, 1598], [-617808, 33894, 2492, -7626, 1018], [5643, -34206, -77, 15294, -823], [48660, -27702, -1020, -4770, -2538], [340094, -36552, -2454, 7666, -1842], [-19682, 41112, -2612, 6964, -256], [-17234, 5403, -722, -8538, 2030], [292285, -20034, -5467, -146, 3319], [-501804, 57369, 2698, 6336, -1630], [-666896, -62364, 4714, -794, -142], [341968, 19434, 592, -6036, -3826], [-305746, 26562, 1006, 5852, -4300], [1386655, -32505, 275, 7452, -4685], [1177880, 36489, 3847, -6006, 4592], [-1300469, -4725, -2615, 20222, 6125], [863665, 53844, 5830, 17259, -6070], [-1077938, -63582, -992, 16938, -4798], [-329598, 66525, -2261, -9328, -3046], [293432, 25050, 434, -37360, 7648], [206978, 108804, -3146, 7710, 8942], [820075, 95415, -3583, -16834, 805], [1561932, 61482, 3442, 28042, -610], [-1362668, -28242, -2500, 14044, 10270], [1301261, -19044, -1728, 21421, 4644], [-977668, 65031, -339, 3646, 1056], [1539736, -7248, 3120, 17430, 8004], [-1486738, 43245, 4272, -55400, 5520], [-103530, -19284, -8414, -21626, -7630], [685924, -64707, 1159, 25336, 4916], [-474354, -64032, -2848, -21526, -3098], [-772248, 76146, 934, 31648, -7744], [241089, 47307, -4157, 858, 10187], [-2197282, -21492, 5048, -20, 1120], [2740872, 91857, 7479, -25814, -5640], [163989, 77268, -2406, -13677, 22206], [3649378, -15546, 1514, -41544, -13286], [496390, 90129, -10003, -17961, -7091], [533536, 38964, -4718, 53032, -3700], [-3211078, 251661, 4971, -46116, 5310], [-245107, 24867, 9261, 59620, 4701], [2254087, 44571, -15339, 34660, -4353], [-3452504, 97314, 8838, -45740, 11892], [416505, -27528, -12570, 19263, -12066], [845132, -11088, 14858, 43484, -9302], [-1378780, 171615, -6985, 31271, 19747], [3814382, -156276, 8456, 50416, 7456], [2935629, 212067, 8643, 52740, -13431], [-350238, -86334, 11964, -60686, -10206], [-2481344, 188085, 2355, 36343, 12627], [1981360, 23739, -3075, -33958, -10656], [-5773737, 891, 16577, -44918, 1045], [5847162, 365406, -4296, 17430, -12846], [-10975710, 182907, 10509, 6087, 5853], [-7132086, 182112, -4842, -30222, -1362], [-2227536, -138036, -8328, -8228, -19668], [7297644, -28206, 4920, 5498, -3048], [4665960, -81288, -2462, -31606, -11218], [1362008, 341784, 4916, 61430, 8680], [-1181756, -289659, -24793, -13562, 15976], [-2624874, -281145, 11252, -4824, -7724], [276604, -267684, -12856, -1560, 17860], [6131164, 356895, -8199, 63738, -252], [-1896716, -373239, 11497, 116113, 10253], [2917428, 311808, 36104, 112962, 6430], [-1563596, -364572, 21216, -50070, 17568], [-719179, -65193, 6871, 148916, 2081], [3934897, 385614, -3575, -54406, -20641], [457290, -85956, 1032, -93368, 11448], [5370965, 411792, -17722, 50947, 2566], [-8757467, 224517, 3479, -16736, -38855], [2687684, -61323, 3052, 126006, -32548], [5335456, -93324, 19894, 115384, 28046], [492280, 144270, 42938, 44106, -33116], [12334860, -202434, 21926, -116666, 11002], [-6841084, 389070, -9936, 25220, 10500], [8609163, 331956, -784, -184589, -17768], [6161289, 867363, 9967, 151180, 6101], [-4757706, 119025, -23801, 135816, -35002], [-5681704, 202089, 5671, -31100, -49444], [10071936, -125772, -6712, 70350, 88], [-14213600, 313002, 6954, -8198, 14184], [-1669830, -151818, -22952, -218680, 6548], [-18289149, 495348, -9298, 5157, -50], [3208606, 187161, 25399, 117361, -49909], [-5317857, -791706, -1031, 6480, -55429], [3989448, -505935, 19967, -201094, 2680], [13203782, -675465, -2546, -72306, -37306], [-9304574, 366504, -1992, -3064, 45468], [601760, -736818, 2924, 113274, 37678], [-3948215, -106383, 37667, 200508, 6361], [-199897, -282492, 73816, 145611, 13340], [8593148, -169452, 57224, -227670, -38906], [-455761, 436590, 52487, -211114, 15901], [-8340216, 286452, -47978, 111776, -50950], [1474756, -541101, 21998, 45204, -31598], [2584254, 79398, 17238, -84824, 53502], [-7349788, -222354, -4256, -91064, -19798], [-3398218, -90918, -41896, 175046, -13610], [2665403, -932109, -24021, -254522, -29943], [-1942176, -224634, 9664, -87324, -44176], [17599981, -275517, -3939, 89912, -29871], [-4642576, -300573, -22603, 265376, 59200], [-13913068, -903810, 41068, 146090, -13966], [-10670266, -167628, 37452, -37138, 43890], [-2555380, -70632, 37258, 228630, -19372], [13810841, -766482, 37973, -37814, 27847], [-14622147, -672129, 50715, -258408, 18933], [-8016806, -68076, 62064, -69956, -5196], [-12948826, -113607, -42893, -103192, 75182], [6672612, -186633, 22003, 88079, 12803], [11144990, 426648, -86100, 10560, 3684], [13910316, 551100, 45728, -88374, -98714], [-7474882, 112056, 24778, -30950, -87676], [9836655, -1049736, 31846, -186759, 17462], [3036720, -1436199, -11549, -17266, -4972], [17384759, 470874, 58973, 186928, -33941], [-15943923, -47649, -104335, 300180, 55357], [22392637, 360744, -115728, -6659, 15324], [13971712, -712938, 74784, -361686, 246], [5352422, -1045068, -89932, -175712, -25892], [9032812, -662298, 53108, 86036, 91948], [4575204, -476118, 19526, -54580, 36166], [-17489723, 1593105, 38165, -136698, -13781], [19459504, 758136, 35364, -155498, 112032], [15975060, -384384, -70170, 325618, -27198], [22662717, 1587006, -1777, 50276, 45601], [-17664532, 318225, -57461, -278528, 16388], [-2540660, -131955, -25231, 240693, -141743], [5686752, 805398, -2136, -191884, 84666], [-2170848, -567000, 2922, -313286, -79668], [36107540, -58329, 61281, -136432, 88020], [-10667593, 40086, -127917, -136802, -46683], [-2470942, 1223670, 13506, -82024, 110772], [12082698, 1363209, -24199, -7609, 180841], [13471770, 428700, -76948, -294284, 77860], [6953260, -1152168, -31038, 375136, -37656], [-40222894, -310890, 86942, 299236, 19372], [-15879459, -35751, -48695, 543038, 36947], [-24323653, -1412697, 38845, 45580, -6925], [39921199, 1121634, 21365, -1068, -36065], [-14897965, -434085, 152453, -300384, -43145], [-18954580, -498426, 22650, -190060, -33498], [12619064, 1209045, -48977, -117074, 106220], [-63264868, -192660, -57978, 261868, 17358], [19425226, -97638, 156932, -130174, -58370], [23617276, 2125542, -185380, 71090, 178], [-25940514, 1268994, -39336, -142206, -96042], [12103612, 2765232, 33634, 295464, 71840], [26574471, -538044, 72608, -327281, 36376], [-22446266, -1118850, 27024, 367378, -165174], [29572816, 2227083, -91443, -528111, 47781], [22380309, -1245210, 97383, 338148, 131625], [-12649992, 327012, 127954, -301076, 24392], [-61394799, -1247715, 21289, -269576, -2335], [1982412, -1503849, -88371, 614066, 116460], [34935228, 2198067, -14322, 188768, -126810], [-20559372, 966183, 31549, -105866, 114704], [16128783, -1221336, -85366, 315249, 220054], [-1343830, -624981, 64169, 102068, 21790], [-37451318, -2297133, -37912, -144488, 89320], [40791340, 1296498, -140174, 102260, 129680], [-23516260, 2773494, 60862, 163082, 164612], [20634494, 1435062, -50122, -126044, 158698], [27350326, 1012374, -101244, -22164, 71148], [34191368, -2350140, -14716, -47168, -38720], [-24509052, -1044768, 296932, -32310, -152032], [13552872, -1599120, 111738, 57088, 56790], [24030872, -2822070, -95662, -243140, -194108], [23889138, -2335452, -30164, 348072, 241928], [-3941096, 2047851, 230377, -280936, -93112], [-29084626, -1907787, -109811, -226441, 201581], [-10851884, 746844, -22116, -332674, 77700], [-4709860, -21630, 186966, 587600, 36594], [-13994572, -544221, -17487, 1165616, -86004], [-27679864, 1446510, -153152, 41538, 77462], [49826415, 1966797, -10215, -333388, 68259], [-31264032, 2801796, 90350, -115000, 190366], [-10421478, 1206129, 122828, -46672, -254300], [-61082034, -44682, -93662, -286760, 54086], [47302410, 2425452, 110296, 591084, -37708], [60264802, -918573, -101206, -46866, -136238], [25083588, -4852506, 71300, -600814, 1186], [-36401006, 2981592, 2708, -81934, -61382], [-41881762, 1677360, -12680, -97564, -381148], [-24648635, 1054095, 2687, -675158, 895], [16612988, 490536, 187912, 110500, 42296], [-61322059, -1584759, -16299, -26596, -131607], [1420000, 644199, 84721, 487969, 315125], [-1964700, 464982, 340244, -128610, -173066], [-4214066, -1521642, -37672, 1023862, 160978], [-14594734, 444978, -46310, 1353136, -87592], [76213084, 137772, 64158, 217116, 223068], [-34684900, -66816, 153342, -190458, 162774], [11419772, 2261253, -108800, -1000678, -45664], [83907055, -694467, -102755, 225428, 123131], [-8730086, 407592, -6718, 103202, 102376], [-5627894, -2682372, -24094, 241258, -67406], [75944202, 1919250, -43278, 223636, 22836], [-14447140, -80124, -137508, 711692, -276384], [-20071656, 408054, 95058, 529440, 125166], [15606395, -4748448, -41844, 1388835, -46536], [-12970129, -270831, -21789, -443116, 254991], [-9855772, 3906708, -243504, -137038, -139056], [-27353246, 510423, -52393, 131237, -17873], [21148247, -3489876, 88332, 181511, -337656], [35972160, -3044460, -192912, 1530434, -70320], [1027736, -23217, 166585, 135132, 188372], [47892605, 1034325, 243203, -559582, -78269], [47037867, -461232, 237740, -817589, 295480], [10184299, -2870760, 309168, -565017, -22908], [-24563234, 2263230, -123012, 366112, -202248], [36688932, 260661, 289907, -633101, -108893], [4545698, -3709704, -131586, -428222, 278850], [32608768, -1498098, -204150, -747688, -59586], [-36625931, 888909, -769, 1288644, 253213], [-16139420, 2087046, 91934, -2018174, 234928], [-14360557, -4504494, -254679, -755388, 157179], [10278133, -1764711, 31423, -283786, 115007], [-50306484, -5691534, 369736, -215282, 12524], [-2340616, 332973, -589109, -69760, -115912], [13332630, 2891016, -298018, 52118, 75262], [-60832052, -558408, -312572, -941888, 221948], [-84961509, -2275023, -80615, 450836, -390601], [18034926, -5003430, -6938, 865684, -36052], [4096620, 6970479, -143111, 518390, 12392], [49915948, -1492287, -107422, 1136204, 128038], [11651476, -3353322, 106178, 380068, 456904], [-10148384, -5287542, 500912, -1331886, -83114], [-41760100, 3045306, 131694, 990174, -83790], [-104241715, 3759198, -43463, 1396250, 252299], [11193714, -5772633, -324358, -317918, 214318], [-15960332, -124713, -270367, 298816, -169724], [-93602422, 5194956, 456200, 23356, 218236], [-22240734, 6642606, 183956, 1133926, 182758], [-15520036, -1344774, 83198, 1683150, -209054], [53722010, 1539834, -168380, -703322, 128402], [72676046, 1347558, -41964, 1166378, -196434], [-131856248, 1916853, 13900, -1431398, 104036], [-97517892, 2729193, 171711, -936654, 312612], [23461142, -4185609, -58116, 119676, 385944], [-86024438, -2982324, 183384, -204548, 339384], [-34931935, -1979400, -358212, -122899, 151512], [-22954272, -1405806, -107228, 1100998, 12458], [-169501997, 2138358, 111487, 380842, -49195], [-87311544, 4260159, 56114, -321588, -131090], [-112563846, -85503, -271078, -1677886, 214234], [-31192976, -196440, -150882, -78588, -443586], [-10331716, 2387598, -438390, -2364258, -184908], [12076002, -6126222, -237218, 1264880, -545230], [-6459747, 7296573, 408641, -691312, -297467], [50273815, -578955, 478295, -2003122, 147865], [46346278, 311088, -72760, -365124, 460240], [-56368921, 6502527, 311623, -93472, 19271], [2313355, 3220368, -496456, 750667, -295688], [31891890, 3551547, 294093, 813468, -376794], [28965830, 5785092, -174006, 154110, 463002], [84230552, 4983414, -556442, -331384, 91256], [-33610568, 4391094, 148618, 935586, -266212], [-74765318, -3650268, -82628, 811964, -619516], [21584769, 5290677, -564525, 69514, 350991], [87059148, -4058940, -73028, -727980, -538792], [33014124, 47922, 133726, -1461496, 346490], [-135005416, -8313975, 527305, 962657, -524431], [-43885710, -4856802, 313490, 629384, 246058], [76559722, -730458, 260508, 488502, -763158], [-12452554, -4926780, 80332, 2453336, -356884], [121471974, -10481079, 47072, 513540, 538444], [100193894, -4446120, 357140, -2130624, -455372], [66005205, 4255290, 76087, 1156168, -330235], [10046790, -1181940, -536810, 1481206, -560248], [-107339368, 1864773, 40247, 652238, 46276], [165655114, 2027688, -605354, -1158504, 4868], [100508277, 3434775, -442319, -1522122, 86735], [-272796674, -2590761, 97416, 1115896, -53772], [80972556, -1595469, 235529, -912100, -457664], [-35543488, -6120564, 180966, -188264, -405354], [188379514, -467298, 274288, 505578, 217106], [51834788, 2910456, -438632, 1278558, -30820], [46976264, 1323750, 247454, -528014, -181646], [-8572544, 1848201, 31305, 1096109, -352299], [91031541, -1722027, 37625, 2896750, -100253], [-233785776, -2238537, -364777, -1945153, 67783], [29691652, -7965534, -330878, -2482742, -602272], [-21343434, 6965634, 82828, -1053130, -376162], [57355448, -893436, -264390, -2236674, -78384], [34853544, 12111492, 347270, 1289880, 231436], [106044110, -5792190, 374754, -2263272, -464784], [167733272, 4996275, 553969, 1416286, -830476], [-134189823, -1533048, 187588, 27209, 362492], [-166032496, -1972632, -478576, -629412, 431380], [37699064, -3189636, -447598, 910500, 669034], [71864041, 6370773, -495755, -2951168, -243559], [213814337, -842112, 307366, -2809789, 83570], [-23139041, 884439, -816327, -824226, -21063], [-131440524, 3577914, 499364, -1125278, -597926], [63566991, -4394316, 437860, 231019, 511700], [-6424694, -6602163, 6518, -1254630, -1042190], [-40756086, 709008, 204516, -1306724, -506412], [-174593886, -3051270, 40266, -779860, 544224], [25544248, 87792, -175498, 4768252, -622040], [85004474, -3486270, -684180, 3128114, -533454], [-142402168, -349542, -324716, -808990, 185876], [-41926020, 12802824, -229284, 2112822, -307254], [206186668, 4461111, -974115, -1924271, 135369], [-144686274, -15688224, 332172, 1161292, 200928], [56471478, 1854189, 721643, -3922204, -6446], [32184094, 12415680, -144592, -378444, -483212], [170737824, 3024780, -172478, -154590, -232324], [-35820000, 5555865, -470693, 1804028, 588308], [-122852775, 8558739, 144551, 1332578, 373555], [34703574, 10232085, 62315, 55981, -643889], [116308564, -15158751, -54433, 1636098, 343756], [100003163, 709938, 159987, 1471886, 285801], [-22537090, -445095, -1064649, -3487740, -270150], [277869952, -2558631, 373135, -2717574, 371504], [98156179, -2749545, -905003, -1403084, -254893], [-166619066, -6513909, -606685, 751049, 639559], [-256451922, 2853864, -286446, -152718, 409644], [51711586, -13531368, 342502, 304858, 425378], [-57379996, -6292428, 844498, 100422, -139882], [38678742, -8397024, -222604, -1787264, 1079224], [50750242, -6704187, -522023, 1029163, 625949], [-210738584, -2249841, 544697, -1928820, 606004], [56688066, 991638, 849682, -2239508, -1219108], [-79332094, 7329762, 366378, -1146166, -195006], [-20723204, -11403504, 431586, -3689576, 406038], [204062869, -3144576, 529932, -489779, -570564], [-8164512, -20450103, 251687, 1542538, -181280], [-64826160, -10918758, -584236, -912722, 271306], [32222150, -4171968, -511372, -134644, 969688], [87795316, -911727, -311855, 2735889, -561139], [-40261872, -8362494, 103726, 1874984, 748304], [124941726, -6890760, -104050, -105318, 738988], [-103806077, 16612824, -133488, 544175, -74484], [-10639951, -12615297, 555913, 1116532, 131345], [50300644, -8048976, -1005624, -936594, 56994], [-146467616, -4334859, -402201, -3667114, -410532], [-162964157, 12480936, -163958, 1023753, -369070], [305285841, -6624951, 545131, -1759692, -978103], [-364245690, -4002831, 129232, -441892, -235372], [-183226242, 998199, 271365, -4919884, 334914], [-107108910, -8486676, -1105440, 1523064, 669384], [162239412, 9723708, 95148, -1061758, -175866], [-213732280, -4961064, -238860, 2786918, -953028], [-59090615, 9723273, -90347, 3523070, 738023], [-312893220, -8247516, 698622, 1579396, -137298], [95464561, -3974310, 877437, -1680786, 1034283], [-168747926, 11581152, 908812, 394516, 135956], [135212274, 11525946, 12158, 485024, -1015550], [-130652384, -4069020, -303042, 3352600, 307098], [106908027, -7119390, -742235, 545096, 1308503], [-455355692, 2386980, 28494, -4541704, 719760], [106510682, 8779296, -729012, 701268, -50160], [167297176, 7286349, 275087, -2728786, 1412284], [-25942234, -9243363, -94802, -1734010, -1146406], [-9824380, 170181, 236573, 4974057, -655403], [149703822, 4067466, 506854, 6291932, -656104], [268095536, 11423568, 399042, 2774304, 198366], [102235535, 9083007, 978493, -2829622, -373171], [117430295, 7053027, -308531, 504452, -446881], [168622770, 7662132, 443004, 3197984, -1442904], [69331869, -4852152, 689544, -2938939, 877476], [-88831910, -22196244, 428802, -2849478, 960744], [235536752, -6639282, -464192, 162924, -453016], [316494414, -1705158, 61886, -1007242, -362174], [180386900, 4125942, -427246, -221628, 532432], [162587484, -19654362, -293770, -1759430, -282248], [107801379, -14524932, 764832, -578177, -1173180], [-104436414, -19471884, 561986, 2234782, -10892], [212819548, 12511599, -476150, -2803088, -700426], [54997316, 9138522, 1248386, 2468046, 1432192], [-15035729, 8746260, 311266, 168713, -984850], [-533655951, -2660175, -1060931, -981108, -114379], [227516982, 4404744, -265016, -2328104, 58436], [64171392, 16411767, -1179038, 3402128, -216838], [-14137608, -13330362, -19002, -981834, -1926882]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_224_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_224_6_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_224_6_a_i(:prec:=5)
    chi := MakeCharacter_224_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 6));
    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_224_6_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_224_6_a_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_224_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<3,R![-208800, 107952, -7592, -876, 10, 1]>],Snew);
    return Vf;
end function;