
// Make newform 43.8.a.b in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_43_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_43_8_a_b();".
// 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_43_8_a_b();".
// 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 := [1551032970660, 2098464001560, -481872751923, -349352939351, 1754605765, 11160446785, 193428526, -124677082, -1518614, 598742, 3765, -1279, -3, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-8577673914048078368597032100995151576652, 11700211150804525769117415217256616592284, 2848608966659910630806249671235576164301, -82714028618438574902769612076620476522, -188523210247301180573718184132559420329, -2888829201925713307885514699909321072, 3123782290750141165224584116401763702, 17369960127436577248810344724568316, -18274537871897921730748731778193890, -19958809290909131950834736227596, 43862779143599504444638103397325, -8824957003163581128923882930, -37067748216477627507880951097], [80415072838101207822336497542706077690620, 48064799726629005291385214900703202426164, -35715095975552186480810775470506398124577, -5835448902401378857536433463918115495550, 1524010461526012671138758047002558328573, 119056858190946237429490759019074536080, -20139079551474772420695951582015782446, -719804417434332761155324012203188844, 105769272392877638573688904761177322, 1676956685288974787039426199380508, -237686733830652456821240679341953, -1337230315893986401319183245558, 191590755258224372380382007533], [-5538879635959330306218657447612471645444, 48064799726629005291385214900703202426164, -35280985104471072651878678728131051915809, -5835448902401378857536433463918115495550, 1524010461526012671138758047002558328573, 119056858190946237429490759019074536080, -20139079551474772420695951582015782446, -719804417434332761155324012203188844, 105769272392877638573688904761177322, 1676956685288974787039426199380508, -237686733830652456821240679341953, -1337230315893986401319183245558, 191590755258224372380382007533], [280577990332649437337365093780561726502292, 371369155643928932156431777415265593264124, -98641097955135611784114276249442995306043, -29233627053939810350021442147531234691754, 4123850390830985586541205525831848844495, 525415430235896052832349158646271144304, -53673595867605654919738431125128120346, -3125848793975508793208298901260816996, 277836110491847036427194357390083502, 7413029775881980608295684111654452, -614886357847863779573600534809499, -6105015878674681774245408152210, 487982563054357232794705117663], [64448009490660149528748523636375452960492, 12339691446440321979920453723345456950020, -42764132636474151422575640218576506604709, -3626535373787601827318726701576660597814, 1814387939100513901841289970090838183473, 86699180940427292434726263638860361296, -23059233636897520955657676902682410086, -539713669242519784827660954509953820, 118132636737884963094046844952162962, 1253389232387199468546987196961292, -261593884750772328773104776022021, -982194329650686472924511282190, 209018642508274696653159244129], [-10546049398806805833155508099995978561580, -8529847978020689305124023975420311036804, 4609190572474045175612001192429089050837, 878734437763276248056317769729733435302, -198432771700395471132447922417840288337, -17290688295734251421795589104348871472, 2634879383615760241491488121944024678, 103988109155544631123672934807115612, -13844982965588441780961310089336242, -243287489856443495876973730936620, 31070124206596915822610458074965, 195703268281163002221991229150, -24992578471150783154244183649], [136934476445703302559538119252708706152324, 265086251682926946732831603687950680178316, -99625850885489863855892767308783034044223, -23811079312520454994041307407807759345586, 4634925905507830736664114689492853546899, 448239028964783083313631226323771963536, -63709353561034188524773938134625738098, -2651539138199561122789526845346392084, 340391203173506000944472364388743574, 6139070126618706157432036665451908, -771163209292372336855015668373247, -4895759513885580038512061652186, 624073470526447525104225874691], [-201898052003173506599208301528043623205196, -734721197832335236724016864164384883732516, 252960123723465646964950514703514688268557, 61466345871855583865233183871725056624230, -12117421841743255008028914683954781312121, -1164770620610660882259110780657310074320, 167142691165901658636277911709867954966, 6921784496361642657836972056400031740, -893457042271314843456805196767173794, -16074511117287716653602185879255148, 2024328240914077567286215321195885, 12849452791818105188947166689278, -1638316175852586681734205763369], [38520235380823128842225623160585171910012, 34850882501581800494432786219136357256500, -19908033325787211541501949226173867067265, -3774683877399590707189064176810747092766, 861979215858014172542021796390661397885, 75594516124130659846873307571020623952, -11418321160218438112884882118445272622, -459182427466778914671755701469788780, 59856148512062987936606693376334762, 1083058938649188283080181886878044, -134003197555938894320843208608033, -877749607755402966241489032534, 107525739150652196629996703789], [961446947620897672481404144000874197886076, 943286547900792438485136494470510320761652, -363158212438006736037324252619897288454081, -80621199895977542562883806592860426239198, 15872256396686296260879896477386394387005, 1522326816864909069347777619140909816656, -214280686763265632305542463165417519918, -9039113943224855218990647641754193388, 1136349849580780799392340259574191530, 21005504458099649473343262437258844, -2563722272169630947949722338721761, -16814992262068201618788342276630, 2069003527948144278650072680045], [163492579846930852703297358371618877587868, 429924660555079285717592772216335707799316, -178977666795837493145636361662018168478073, -42331188268516850028549827028791815594958, 8379316476116621200738993002222781213685, 828417689196912330589781218182889582096, -114204735008813809511399329448925036542, -4991315231080282667493816805386009996, 605824970572077132243164161510062938, 11724277216827980027875735228649916, -1364368378293181126693041976305113, -9478472343580770759804427738502, 1098499500962555551979565862501]];
    Rf_basisdens := [1, 1, 108527717770278457233024185593836552192, 434110871081113828932096742375346208768, 434110871081113828932096742375346208768, 434110871081113828932096742375346208768, 108527717770278457233024185593836552192, 9043976480856538102752015466153046016, 217055435540556914466048371187673104384, 434110871081113828932096742375346208768, 27131929442569614308256046398459138048, 434110871081113828932096742375346208768, 217055435540556914466048371187673104384];
    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_43_a();"
function MakeCharacter_43_a()
    N := 43;
    order := 1;
    char_gens := [3];
    v := [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_43_a_Hecke(Kf)
    return MakeCharacter_43_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 := 8;
    raw_aps := [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [7, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [76, 1, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0], [100, 16, 0, 3, 0, 0, 0, 0, 0, -1, 1, 0, 0], [98, 76, -5, 13, -10, 1, 1, -4, -2, -5, 1, -1, -3], [1019, 91, -2, -13, -24, -3, -6, -6, -5, -6, -1, -8, 5], [8577, -103, -1, -66, -1, -2, -10, 31, -13, 7, 9, 3, 34], [8053, 220, -15, -124, -2, 10, 7, 2, -8, -12, 13, -25, -32], [12566, -1632, 47, 340, -31, 26, 56, -39, -16, -1, -9, 11, -6], [22390, -1721, -27, 219, -154, -94, -113, -14, 115, -49, 38, -115, -30], [-7972, 336, -150, 660, -153, 98, -59, 63, -106, -122, -27, -98, -106], [14148, -1591, 89, -512, 240, -94, -111, 8, -35, 64, -45, 141, 210], [-30743, 194, 292, -1289, 1224, 3, -396, -462, 496, -237, -106, -214, -235], [-79507, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-29082, -9150, -647, -4263, 681, -175, -166, -337, 582, -643, 428, -611, -59], [313769, -21398, -370, -5216, 1777, -98, -409, -847, -334, 853, 392, 104, 442], [181420, -11483, 896, -16331, 2891, -441, 227, 161, 1809, 393, -609, -1184, -529], [478863, 1669, 695, -9909, 2386, 748, 729, -902, -1677, 1544, -295, 1813, 500], [-159168, 20354, 2685, -325, -1082, 751, 287, 852, -308, -2143, -1089, 629, -1829], [376973, 9083, -1259, 10660, -3652, 560, -1363, -552, 177, -2995, -776, -981, -3992], [622856, 32614, -5360, 7045, -4292, 24, -4816, -2272, -1046, -5131, -2305, -2300, -928], [489690, 167934, -1334, 22003, -8801, 1657, 1201, 497, 3560, 650, -4646, -3066, 4425], [1752808, 24511, 295, 47500, 8051, 1650, -3422, -861, 7413, 1560, -3080, 819, -2426], [723159, -71443, 3113, 4977, -3768, 5584, 5105, -3840, -3797, -3656, -3539, 55, 4480], [730205, 229431, -4412, -60498, 8561, 1406, -3067, -11279, -2883, -2454, -479, -4558, -10304], [-355741, -131578, -6824, 12918, -18353, 3544, -5361, 1579, -4738, -12095, 9210, 2378, 1456], [-1175270, 391209, 1247, 13133, 20462, 8661, 6329, -7768, 8369, 6912, -12372, -8641, -2999], [-1851138, 70151, -3366, 2903, -13237, 5811, 6289, 11061, -6177, -783, -6091, -6710, -1153], [1678105, 268831, -1186, 14051, 278, -12293, -7444, -6744, 15303, 13138, 4823, 8080, 755], [1290196, -85060, 7386, 67932, -16048, -2702, 2122, -3916, -4056, 13822, -10822, 210, 1906], [1287580, 196527, -26108, -4521, 33638, 1019, -7110, -11428, -42375, -11769, -29752, -18220, -3077], [5696937, 556322, -16864, 23348, 31674, 14676, -10830, -13950, 29486, 7659, -29789, -35420, 23956], [2899466, 155482, 30668, -187510, -29148, 21424, 28784, -32652, 3794, 11404, -6212, 16984, -18596], [-5426190, -465567, 2957, 383452, -159363, 1620, -9098, 10669, -73129, 8144, 870, -895, 12184], [7768023, -407884, 6282, -206040, 15324, -192, -3398, -21940, 109678, 645, 9057, -8620, -30772], [-8729384, -861450, 37852, 132913, 17182, 4186, 11922, -36182, 21038, 3365, -44445, -6636, 3306], [2558670, 81493, 58426, -307806, -56704, -32850, 11222, 9800, 57295, 94099, 1977, 9118, 20486], [9776354, -1223521, 46268, 142631, 246272, -7470, -9104, -9584, 13481, 15550, 33748, 11192, 6832], [-2078004, 1087213, 51651, 106800, -15565, -10826, -38474, 7595, 47355, -6794, -31750, -31509, -20198], [12166694, -64888, 5802, 457530, -17470, -29802, 71424, -29726, 144520, 24114, 34268, 45062, -24642], [-321055, 273802, 4337, 169005, -149882, -12460, 37543, 80798, -160362, -26767, 78206, 32459, 9142], [-28922550, 671281, 38396, -70863, 26773, 17725, 26837, 29115, -12219, 31655, -31415, 34492, -17755], [-1333468, 2088512, -62180, -335708, 268202, -16150, -58810, 1998, 38556, -658, -62954, 31212, 5758], [-11562589, -2298787, -140018, 154284, 28613, 20782, -86225, -42775, -88633, -22174, 43111, -46836, -24384], [2925848, 1818869, -18692, -329541, -441655, -66371, -79815, -2985, -178523, -27497, 44125, -1704, 20701], [-29769651, -1964843, -27773, 483974, -4896, -84312, -93153, -46884, 33211, 31755, 31364, -37415, -53248], [-59478284, -664937, -64787, 389732, -186006, -26724, 27059, -93058, -31931, -79188, -77885, -106361, 14960], [-78635579, 687065, 1745, -705321, -151166, 82072, 44439, 37078, 149607, -13778, 31449, 41575, -183244], [24081306, 3033969, 98372, -1354536, -299678, -15426, 17906, -193302, 259463, 168981, 56579, 62388, 87644], [8629539, 1807803, 175096, 292811, 395772, 193279, 3860, 13782, 65963, 68382, -39353, 87978, -64593], [36474924, -505400, -108056, 401834, -373516, 90852, -49308, 72508, -31820, -4980, -67220, -45260, -3868], [-27522290, 2205718, 72718, -492035, -661447, 21287, 81479, 86127, 52284, 156938, -121886, -40638, -26009], [33150279, 4695873, 65133, 334478, -131828, 120904, 267525, 210376, -411017, 98497, 155996, 203663, 163576], [-68950592, 473902, -97463, -1642019, -1032280, -1279, -14875, 113874, -463620, -161275, -126977, 134457, 126013], [136932446, 379056, -4610, -1486935, 156660, -151690, -261962, -74964, -202876, -166411, 41039, 18962, -234022], [-15874485, 1770147, 125067, -2466634, -282474, 123350, 89293, -197970, 169849, 282653, -30630, -85503, 44826], [117082263, -8315887, -92054, 1232803, 319450, -95321, -39896, 40368, -24847, -335150, 130851, -44, -209013], [-12647736, -5435313, 147579, 54835, 825728, 123001, 498243, 231454, 30403, 288054, 259152, 266027, -82019], [29780569, 3039714, 445089, -701741, -257116, 60150, 300617, 443564, -204234, -13781, 64936, 151611, 117306], [-25829903, 5367440, -364149, -2822645, 13948, 217821, -176845, -155154, -397170, -731394, 88, -135853, -186299], [-114626030, -2827, 80577, -2931350, -268609, 58388, -87836, -27729, -7549, 121686, -226466, -98855, 412628], [71480404, -7503033, -202888, 1534037, -638887, 220581, 277113, 180403, -52821, 400983, -93159, -33864, -18671], [-70891934, 14628745, -953, -2645532, -586549, -190404, 434002, 375007, 132055, 25822, 399728, 469519, -546796], [-153476700, 5990314, 283785, 4902827, 594750, 153449, 124611, -78152, 113736, -132121, 1131, -42179, -96407], [72036774, -28346360, -267994, -649001, -1145226, -204834, 54080, -184378, -239200, -300161, 118007, -263134, -240770], [153737763, -3748719, -78702, -2212149, 1190350, 407285, 98788, 230264, 442805, -184300, -535121, -223232, 358833], [-109861171, -13138993, -306907, -317537, -1014084, 26540, -726331, -817616, 603733, -317588, 355637, -342045, -108696], [145864037, 5194386, 764447, 2691321, -1387784, 161679, 239243, -358162, 326432, 716632, -547348, 101099, -156737], [89169930, 17360033, 306046, 6818771, -1063416, -60536, 533818, 811492, -968221, -70052, -18790, 221658, -46182], [17022249, -8517936, -878740, -3481273, -868930, 529796, 161522, 407170, 104866, -585116, -356878, 151914, -45312], [310650985, -773789, 307130, -5600653, 1390942, -664107, -299380, 102744, 1754019, 579168, 611411, 486768, -589111], [-22893788, 18938666, 236190, 4182054, -819051, -689856, 3395, -466787, -916864, -331128, 523767, 54478, -775316], [-49507292, 29825802, -501871, 1327807, -1875903, -203723, -259234, -383661, 263874, -455483, 16568, 100669, -761743], [115797112, -48545887, 1016790, -2838434, 1095608, 97324, -246326, -624724, 2124031, -130673, 559419, 378038, -573500], [137074464, -18750984, 1102429, -8808657, 1708886, 240097, 609507, -464924, 1147166, 119365, 425425, 166137, 581949], [194758853, 2937681, -491879, 6560084, -989690, -391208, 13691, -96214, -1500697, -57461, 873264, 569799, 732596], [-70288663, 10995359, 557027, 4611350, -781622, 1297644, 232001, -303258, -270783, 489663, -1146538, -587643, 532772], [273059720, 6284453, -594606, 4514861, 2992771, 284387, 610025, -370835, 2530457, -107891, -1002287, -449918, -4105], [-467229193, -12996272, -133997, -7476915, 1593070, -300427, -139767, 266076, -1606338, -847630, 243702, 499435, 57669], [-13296375, -16585309, -995537, -8209161, -2494684, -682140, 49339, -439388, -2038751, 71868, -70305, 32317, 466460], [-694095701, 16382317, -382867, -4528799, 3235596, 514278, -787843, -2080556, 1637627, -821460, -1182437, 255335, -804238], [-352987659, -9949284, -80779, 4203888, -1820198, -448594, 412543, -459474, 358588, 1522886, 1161759, 299007, -895350], [-434643160, 52192521, -858770, 12241957, 2541832, -570421, 468370, 1197002, -838185, 539993, 988938, 1205586, 1671587], [245208605, 16172775, 886625, 1826565, -1866050, -603978, 18935, -222718, -3061651, -771734, 222227, 1232663, -862766], [-507615324, -26532794, 897634, 14223636, -2210269, 425984, 201201, -16897, 2278608, 400358, 83835, 253694, -1702748], [-540724274, -47230171, -495162, -15115555, 3205115, 165095, 124413, 1398509, 731689, -24955, 734681, -1011882, -487469], [-186739621, 45639073, -493219, -16611575, -2463102, 1021704, 1323159, 213162, -94413, 153432, -445709, -421781, 747088], [278420949, -99966771, -953457, 4086261, 973380, -1218526, -1685069, 519168, 1425755, 892870, 752967, -115007, -1382698], [-45356258, 42016167, -816188, 12957003, -6174953, -871965, -435205, 364701, -1568205, -199347, 740343, 1332976, -1014945], [-420552478, -69187542, -497626, -2537139, -2386502, 1813934, 49888, 843486, 47050, -1987603, -170163, -1590678, 330198], [65634459, 72524056, 2305012, 4402854, -4589022, -752058, 114726, -864858, 922772, 1723587, -1427107, -275140, -578458], [440275142, 76459156, 2608773, -4070846, 591581, -108116, 1529754, 474993, 1249672, 1957945, 293621, 1784449, 1114580], [-78216426, -56470663, -746608, 26935138, -803616, 196970, -347784, -671716, -1703597, -2348981, 1016499, 471948, -170706], [-409663969, -66205768, -360735, -4904971, 3331128, -485288, -1788247, -1535928, 2655640, -1101959, -746508, -2483361, -100290], [-249387997, -69115184, 434924, -145689, -3505358, -2330356, -145738, -97886, 1957840, 3130858, 235208, 558768, 2262876], [1143552774, -3448740, 597400, -1186326, 3787990, -564748, -225610, 983950, 2783336, -2195668, -82578, -2448496, -939824], [1434146287, -72549570, -2380018, 16639288, 4879231, -747170, -1862587, -944017, -1396438, -1387133, -57808, -449968, -2519810], [-539192823, -20319069, -399171, 15336563, 4069124, -975794, -349519, 1804360, 3447677, 2076496, -1055593, -76789, 2389038], [1631798944, -78351605, -244947, -24475783, -46694, -36230, 1864419, -281414, -1129115, 1937991, 346530, 906683, 688918], [-542316787, 86969828, -2454912, 882926, 4502017, 116680, -2571299, -36415, -1403768, -2910403, 4319528, -634222, 1126228], [339182336, -19008149, -1694955, -22255290, -13532691, 1791624, -3161814, -839103, -1172799, -3589138, -1530140, -3469335, 1040124], [574203189, 69564603, -2672288, 12033477, 134278, 1215869, -2469046, -808832, -4568797, -1684384, -5750919, -1357798, -1720223], [-711609904, 62770508, -2662389, -14373445, -2373584, 1188653, -701357, 1077254, 716058, -1503649, 4431619, 3211975, -3537891], [-212246609, -72121268, 1247496, -6665376, 7997979, -3261276, -424449, 356115, 9121476, -478683, 1252950, 298026, 54468], [-137158466, -22264489, 311485, -24442493, 5760304, 1062402, 1574961, -567408, 8005393, 1826251, 3751588, -470345, -544906], [-911127236, 98496572, -4133564, 12859071, 6473792, 1560294, -2957264, -1632848, 11437144, -1341813, -1848717, -6857828, -1125742], [2753343907, 116044107, -1878759, -30085882, -1155714, -1861982, -1280037, -2123866, -3456763, -2529809, -3703998, -3783169, 4053134], [-684271542, 100162520, -6125134, -32103453, -8080082, 589188, -1610388, 1574642, 3431172, -1962447, 4098779, -1754518, 1592272], [1444674202, -27096387, -5516178, 31817525, 7524064, -1036905, -2354930, 1739038, -5277665, -1928133, 1644316, -2444430, 1997351], [-2199076161, 37259431, 1637579, 36665132, -2529646, -3311890, 1231137, -5133526, -3351407, -937803, 1625542, -296211, -3454134], [866234373, 58315063, 1759089, -6759040, 3042340, -928798, 3062585, -2110556, 7688741, 1551047, -1228296, -1537553, 4019006], [-1217614700, 38883723, 204556, -8987649, -3308599, 378521, -845875, 1255459, -14693157, -6254775, 4003879, 747896, 511153], [455935045, 113522991, 4813424, 6812222, 11064503, 2405440, 4105391, 5089603, 1719033, 6401200, -2932845, 5060598, 2251942], [-2226325082, -121306106, 3807426, 11915544, 3959736, -270912, 1596006, 40380, -541878, 763358, -2740820, 3253962, 903624], [-478453432, -11210358, -4251486, 26355386, 584338, -1976064, -6661948, -260638, 5632926, 620198, -1885866, -4487526, -3156924], [999759210, 183875000, 3305402, -34118881, -3760060, 1527990, 2452026, -398948, -3130476, -282861, 1339557, 1979142, -2344610], [1190316010, 233719659, 1542018, 3321, -10204137, -3126557, 3434665, 4541189, -7064177, 1027331, -5253409, 29234, -233153], [2199348040, 8795716, 2265072, -31529172, -11226098, 5249694, 549414, 2354618, 4605980, -5222430, -479930, -3343316, -1836522], [1853656826, -48416581, -860106, 73955626, -24324722, -1635608, 1561256, -2573302, 6062845, -1502453, -1767887, -3304718, -1421136], [3147276654, 83498816, 2588819, 11044013, -3005946, 2099343, 6668817, -484488, -8049922, 4540617, 4356397, 2022571, 6081787], [2626118113, 44265086, 675708, 48601644, -9995925, -242280, 2382623, 6712343, -3945930, 1600777, 2048242, -2757090, 7339560], [493978437, -70050943, -1396545, 60094881, -9501678, -119264, 30321, -1676630, -7970033, -5108424, 5946117, 7045277, -1056128], [3560488079, -129100992, 217539, 9000550, -4947634, -8078682, -8010175, 5978594, -2318464, 437040, 4853351, 1730193, -5297102], [2598131364, -25295214, -10270545, 11600873, -8581434, 2389241, -3346715, 2409276, 8878984, -9516517, -5017827, -6027045, -4270479], [1207855644, -123879022, 3736318, -2277267, -1535194, 5547062, -1619948, 5345082, -4035702, -6614237, -11105437, -5321686, -2272634], [-522154950, -358681757, 332608, 40120601, -16034379, 2033917, 1016981, -5805825, 4343955, -2981423, 4102907, 3587732, -7916287], [-2565329545, 138798125, -926836, -28781287, 21537194, 6006603, -477338, -4613924, 5398661, 3331774, -10564379, -10537522, 3588427], [5298549088, -254662317, 4151411, -59956380, -10109380, 4181460, 2893707, -1903100, -2307541, 289212, -12414021, -900753, 426508], [2837245159, 154661141, -3922233, -76203942, -14065662, -5334520, -1251555, -8828914, 14904767, -669079, 6773260, 2736373, 2167016], [-1766011548, 112096701, -2136081, -109412408, -5879110, 4780044, 901897, 925582, 6088785, -11983448, 6782409, 1829523, -9703836], [-1959202970, 271589565, -10437, 8088740, 17997622, 4995440, -7051323, -3833758, 19904495, -4424370, -3009945, -6363095, -2374084], [4701348214, -57292506, 12034154, -73832884, -15534602, -529618, 4459336, 13562690, 4162762, 10125812, 4415102, 4712354, 7865374], [-1196340037, 290409555, 10024467, -3089361, 25333158, -209238, 4777597, 2285926, 15704217, 10790442, -2420231, -250575, 9840438], [-7973201178, -76196465, -365561, -74661124, 22517412, -670338, -3283765, 10535300, 1776223, 2674974, -90389, 8617591, 5728790], [2925946372, -47547272, -3164258, 73722320, -45390260, 7861122, -1912478, 1500712, -18773748, -1510662, -6389634, -1148338, 9016174], [-3578373186, 211349988, 5716763, 73051813, -19263075, 6491409, 1966200, -5106681, 8704058, 5038805, -17683438, -5444887, -2107847], [364705409, 101665500, 2326638, -38853667, 37923378, 217130, 6631032, -7226054, -9476142, 7506974, 784080, -2224988, 1280782], [2089255098, 255855623, -16299130, -52981399, 4211387, -6501193, -7548723, -5450707, 17730559, -7304233, 12834023, 4757310, -2316729], [4526585534, -121929643, 18054246, 73407901, 34070369, 6699577, 12322151, 13606243, 1157049, 22473133, 7196573, 11736014, 12829629], [290602408, -272824876, -8935029, -69066525, -33852239, -2883803, -18451916, -11492997, -4799894, -24255839, 6385990, -9794503, -1684667], [1351782893, 45220382, 5778047, -6835655, -3639918, 5040830, 12182177, 11047942, 24097990, 6446605, 8728010, 2918721, 13556064], [-2582720501, 96549831, -4190172, -45419843, 33900780, 2966191, 3843360, -15329026, -5236557, -8385860, -4895883, -3158014, -5515753], [193912744, -739887208, -901515, -121522331, -22653928, 9222747, 5794985, -1366666, -6562506, -3991159, -12937611, 727881, -3993237], [-1568612194, 328790334, 19890564, 32334480, -27580848, 2161424, 21733068, 9329440, 8457566, 10269944, 479340, 15821152, 5055472], [3087903003, -45287630, 8017678, 20073682, -43371218, -6867710, 12476688, 2474074, 5207708, 14633575, 5298307, 7550664, 10792662], [1587604198, 131874776, -3925824, 91922841, 21347560, -5914172, -7442960, 19316808, -10394852, -2504249, 10124773, 9157196, -12353372], [-2920763281, -149974120, 1437480, 9051530, -35103227, -2426482, -12523467, -6685459, -5240440, -6470015, -19338622, -10939718, -7240222], [-4356554654, 535722035, 12305474, 121061414, 65924232, 518656, -4026246, -9424192, -13453899, -6841553, -2366309, 1302462, -7999134], [1422536173, 49888338, -10003577, 6803006, 35231424, 8977646, -14815025, 10835316, -18539790, -8415898, -12160097, -1934635, 6829180], [11579475562, -353559898, -28505146, -44456536, 39144718, 3810032, -14237260, 4760542, -4323934, -24275626, -5747818, -13205762, 2734284], [-6692281983, 501806276, -13470160, 219208832, -10639825, 599746, 60107, -1476909, -9863148, 5842197, 13442748, 3070210, 3090494], [2679118925, 543165100, 4498971, 76317143, 894142, -12148627, 2469365, -1057160, 15508594, 1725674, 8326582, 15527367, 4455077], [575342130, -310300892, -7043797, 48066447, -684338, -1446127, -5583539, -22223208, 19359850, 2393773, -7799441, -27643497, 5071221], [-144914716, 615736092, 328566, -82156326, -2902132, 9741202, 13609474, -16015672, 1027524, 5138422, -11297926, -21724710, -797018], [-2276964338, 16374829, 17166615, 135687002, 94752193, -7863408, 5696472, 7103133, 17591919, 18607324, 5297276, 4589127, -14879448], [6603567569, -590609723, 1317617, 86645599, -56078716, 4011344, 13873393, 29972680, -52187705, 10969778, -5253969, 19749375, 21090580], [3242629536, 618013993, 9309046, -18205493, -37673612, 4423719, 1759378, -20145278, 2238103, 8140823, -4479668, -1126946, -13511089], [-9884166899, -226394891, 14885995, 112443754, 12376872, -8895526, -9903193, -28682632, -3412033, 14823695, 203198, 100213, 11840506], [-7105110623, 949613503, 4330683, 60967905, 41912400, 5035480, 3237499, -10371472, -8856851, 14646514, 18532125, 5588153, 14638288], [6869838503, -1129246103, -5344628, 70622351, -13186140, -286325, 11127772, 3554506, 5757245, -12608744, -3913963, -179550, -17467401], [-314880562, 260963395, -6378081, 140273374, 30578191, 5249870, 4803098, -15830597, -52760131, 1449296, -4094768, 5760051, 14818130], [6761897061, 267269901, 6282117, 141212407, -47977676, 16781522, 3141625, 4624784, 15370231, -5327014, -5523815, -5687081, 18782490], [4209485038, 1313765419, 4026823, -93624657, -34838386, -2440615, -8774411, -20735220, 21097575, 6141752, 9240592, 16039859, 10015021], [4859390982, 24274948, 12445459, -96416997, 55600644, 12014611, 2014019, -31359582, 39249458, 14298571, 14375237, 1778051, -20390869], [6709900952, -674072204, 27477533, -139025399, -937233, -1875637, 13638652, 22408845, -34492026, 21916847, 16785442, 5769487, -11794949], [2501400916, -989702834, 16766414, -345654323, 16368712, -6557444, 8822806, -21793272, 6126238, 38241301, -5785699, 23384622, -15700024], [2164315177, -271534713, -17204889, 53795749, -71100100, -14148108, -33519777, -10428120, -32728047, -41891264, 58235, -269355, -2566788], [9443875905, 338672758, 8101366, -35427995, 52754272, -534704, -708730, -21797196, 81579452, 12757390, 3324144, -20203668, -32523444]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_43_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_43_8_a_b();".
// 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_43_8_a_b(:prec:=13)
    chi := MakeCharacter_43_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 8));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(997) - 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_43_8_a_b();".
// 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_43_8_a_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_43_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,8,sign)));
    Vf := Kernel([<2,R![-689040691200, 2060918673408, 470565043072, -252864488128, -46963036352, 7540604768, 974729640, -91843236, -6529604, 492122, 17350, -1165, -16, 1]>],Snew);
    return Vf;
end function;