
// Make newform 230.6.a.i in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_230_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_230_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_230_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 := [-13033476, 408388, 338133, 593, -1156, -3, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [-39620612346, -1629413963, 342922345, 3301386, -432595, 473], [-10563544722, 628918249, 25766089, -948996, 10559, -457], [-1833585626, -693152085, 6350829, 948996, -10559, 457], [-1814631102, 1479281155, 46230502, -7593858, -84553, 8222]];
    Rf_basisdens := [1, 1, 192701508, 96350754, 32116918, 96350754];
    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_230_a();"
function MakeCharacter_230_a()
    N := 230;
    order := 1;
    char_gens := [47, 51];
    v := [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_230_a_Hecke(Kf)
    return MakeCharacter_230_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 := 6;
    raw_aps := [[4, 0, 0, 0, 0, 0], [2, 1, 0, 0, 0, 0], [-25, 0, 0, 0, 0, 0], [17, 2, -1, 0, 0, 0], [50, 7, 0, 0, -2, 1], [82, 16, 0, -2, 3, 5], [-125, 7, 5, -8, -5, -27], [446, 14, 8, -21, -9, -3], [-529, 0, 0, 0, 0, 0], [569, -22, 1, 10, -33, 23], [5167, 24, 23, 35, 2, 12], [4675, -272, -45, -4, 11, 48], [5585, -75, -19, 35, 5, -183], [2782, 146, 4, -111, 28, 43], [3016, -352, -114, 65, 60, -56], [-1179, -384, -153, -51, -51, -3], [1375, -314, 203, -203, 1, -93], [4388, -191, -92, 104, 220, -43], [-3397, -1682, -167, -50, 71, -158], [3609, -1611, 309, 202, -145, 190], [120, -178, 174, -64, 60, -143], [12518, -2410, -244, 49, -16, 217], [9277, 1478, 237, 103, -11, 1029], [5806, 128, 294, -453, -136, -1231], [11718, 3583, -142, -546, 2, -1045], [-23215, 38, 451, -215, -639, 743], [-14310, 1353, -218, 1395, -112, -700], [-32661, -1598, -983, 1390, 569, 562], [-2062, -2878, 110, 411, -363, 1641], [-74853, 2466, -105, -456, 429, -1284], [-14016, -1746, 1366, -525, -214, 290], [-68614, -3000, -58, 570, -116, -3275], [13428, 4332, 1230, 1104, -585, 960], [86835, -4108, -753, -1173, -379, 1016], [-44082, -9264, 1752, -582, -207, -1536], [-32692, -6027, -600, 129, -48, -3399], [-36083, -1348, 229, -2374, 47, -264], [121984, -2890, -1226, 1937, 29, -1434], [-314588, -2284, -912, -742, 516, -2126], [-11322, 15383, 704, 653, 598, -1552], [14262, -6722, 826, -3432, -432, 3759], [-60484, 1470, 528, 2721, 1599, 3177], [-241356, -9402, -3024, 5316, 2016, 1932], [253614, 6326, 2844, 574, 1222, -2481], [-149090, -6141, 580, 863, 630, 6661], [27516, -3120, 34, -2663, 2368, -4929], [-381449, -7342, 4795, -471, -1781, -2177], [224138, -14544, -1626, -3500, 2762, 352], [34914, -11434, -2836, 5867, 5110, -4471], [-110022, 21902, 834, -4355, -4334, 5709], [223706, 20302, 3684, -2992, -2062, -3177], [917653, -4458, 133, -1305, -1441, 152], [-326334, -5902, 708, 5592, 866, 4046], [-170780, -14596, -204, -5164, 6309, 2830], [-375410, 8310, 2344, -4568, 310, 6999], [780703, 37481, 5181, 4087, 697, 9582], [974195, 24786, -2725, 1068, -503, 7309], [844459, -33242, 3723, -5191, -1666, -8895], [27496, -10098, 422, -2338, -4870, 18387], [1133628, -31100, -10652, 7029, 4488, 7527], [201487, -9650, 1611, 763, -2205, -18181], [289119, -67344, -7467, -771, -657, -8565], [-166612, -38549, -128, 1333, 6656, -464], [803442, -6790, 6206, 5798, -6494, 4943], [-177931, 14860, -11729, 9929, 7672, 21449], [49814, -24654, -3496, 2130, 13171, -7058], [549049, -23132, 1605, -2983, -4549, 8802], [917614, -18994, 5038, 22813, 4191, 6395], [-49118, 105109, -1726, 15647, -630, -10280], [230169, 14904, -13583, 18948, -1405, 2531], [-274038, -57636, -8712, -10812, -6486, 16743], [1297906, 27404, 6996, -29195, 2818, 5667], [-1293569, 88340, 2083, -13891, -6799, -3075], [-685634, -32980, 11296, -15470, -7158, 14786], [1542998, -24817, 9206, -9777, 2784, -8934], [-128807, 1054, 1391, -22464, -8491, -14278], [562620, -11243, 1030, 6699, 7842, -37122], [-191580, 96059, -2790, 11605, -2180, -2379], [956626, -22820, -15580, 26110, 17494, -10758], [758985, -142742, -8863, -5276, -4064, -1497], [-672640, -65958, 9890, 16605, 16438, 22891], [156498, -121862, -3682, -4189, 3561, 23377], [-138322, -97594, 8044, -8347, 2606, 4131], [510447, -7660, -4419, 49877, 13896, -737], [-1162012, -1460, -1676, -18920, 2129, -44705], [1154130, 144814, -16880, 26763, -207, 32694], [-892305, -75362, -5579, 45779, 7606, -9601], [814559, 73788, -5223, -22621, 14899, -18463], [-1685598, 107724, -6402, -6465, -9972, 42162], [1473638, -64618, -23962, 13772, 2044, -55054], [-3074959, -167462, -7923, 22193, 5435, 37725], [1030684, -141134, 1484, 48770, 14274, 43780], [-1319148, -9722, -10834, 5929, 13558, 83064], [-2167949, 98162, -10893, -21825, 3647, -72634], [3164939, -25270, 1955, -29201, -24631, -19376], [-1247835, 233252, 3269, -735, -16494, -16095], [2009122, 7378, 27338, -16989, -6406, -37012], [-1124722, 210136, 5928, 21238, 5628, 21224], [3314654, 66552, 25584, -51975, -8730, -43431], [-66462, 263422, -46942, -14269, 852, 27880], [7050226, 103490, -212, 49257, 1033, 1606], [-5685369, -158272, 40223, 28212, 7719, 44046], [-450997, 106308, 4115, -11249, -21135, -56857], [628670, -34668, 4856, -61494, -3980, 99874], [1878934, 148821, 3374, -16651, 24716, -94458], [-19798, -84850, 46004, -13804, 14896, -13363], [1612704, 105649, 11938, -14252, -1414, 8884], [711236, -122844, -26806, 93002, 59972, 146586], [2181110, -180763, 43450, 2023, 10434, -25768], [3863423, -241338, -27933, -1528, -10610, -58885], [6954160, 444784, 17496, -62580, -18440, 23524], [1976034, 32396, 42912, -17364, 2588, -146842], [-7890717, -153191, 33523, -75129, 2529, -99564], [2517790, 117036, -61342, 89288, 17579, 61758], [4176618, -104304, 20584, -12305, 24208, 52431], [-4307456, 213540, -11996, -9861, -34702, 82613], [2372909, -12748, -6283, 124793, -3959, 69467], [104414, -164334, 1328, 2495, 44198, -14976], [-49034, 290652, -58988, 76126, -15005, 2517], [-888846, 240824, -3982, -50998, -27446, 146870], [2843656, 106823, 72790, 117163, -4674, 29222], [506294, 110030, -5824, -65568, -5436, -126093], [-1698645, 207624, -28347, 54591, 447, -73137], [-4807910, -359306, 43628, 11221, 29947, 21210], [-3734260, 255020, -33772, 58074, -2658, -43134], [-6435724, -290518, 13384, 5617, -40755, 24947], [-1135564, 89219, -17992, -63412, -39332, -121495], [1250373, -40550, 26965, 2555, 970, -73285], [6172253, 234389, -9547, 19904, 16897, -92485], [6631369, 498624, -57397, 124517, -24019, 29715], [8278593, -391594, -98931, 137031, 80219, 197522], [-1111762, -517268, 5850, 11056, -17415, -298], [-1740584, -203852, 57954, -11825, -76230, -44905], [824549, -101480, 2281, -84768, -53943, 76512], [-2079915, 27246, -118887, 178038, 45132, 142593], [-3721144, 296652, -57294, -117464, -22894, 134596], [-10482568, -176564, 78732, -84337, -50434, 200637], [5633817, -298714, -98895, 17147, -20985, -218819], [-5050979, -260266, -33819, 122724, 93881, 33734], [-1933393, -1645, 64309, 51718, -117351, 73457], [8132501, 403038, -28179, -68779, -4331, 211994], [-6335146, 667524, 113180, 27430, 11280, -70918], [9682068, -507274, 155682, -1533, -12664, -144820], [241211, -37518, -36613, -122467, -4387, 265431], [-5998273, 788152, 12349, 28279, -10537, 13999], [-8943468, -387466, 50198, 10913, -25748, -160333], [-3916412, -726930, 52310, 3412, -15897, -29596], [8125168, -730430, -18826, -55188, -78370, -187645], [7038037, -338142, 33137, 158819, -35443, 114636], [-11505902, -461410, -93048, 267369, 109976, 8420], [15743512, -696255, -114490, 77555, 53948, 274896], [991604, -10858, 39718, -84990, -33980, -37694], [-278274, -337698, -47786, -136126, -22137, -68426], [1035906, -7420, -128752, -48585, 1404, -119910], [389871, 135490, 31181, -10450, -41091, 207490], [5149394, -762802, 116140, 52091, -90226, 184431], [-3792770, -142206, -98536, 158831, 131408, -5703], [9433521, -459884, -128243, 40460, 110551, 163613], [2084746, -808174, 40786, 150685, 73455, -255919], [-5825738, -473397, -187052, -175787, -5720, -2430], [-256514, -179814, 164524, 178911, -53503, -168514], [-13143288, 695709, 215874, 78111, 7614, 67632], [-7388772, -712450, 44790, 41957, -40014, -296264], [-18263898, -48961, -56590, 138477, -24372, -169386], [1580475, 213026, 66227, -168218, -83512, -304538], [7218479, 555529, 57003, 116604, -97121, 120979], [4589937, -15579, -132443, -6018, 85895, -45373], [-11849712, -1312276, 113526, 164028, -7234, 104048], [-5399458, -841202, 27502, -208783, -106904, 267203], [-14588976, 690359, -90202, 148633, 194264, 327721], [18707130, 307194, 49668, 126639, -138264, 378831], [6922555, -903666, -74389, -16484, -35979, -24067], [967958, 1287660, -154978, 161170, 64992, 316550], [4029279, -661867, -84435, 207672, 111539, 130307], [-5763540, -200203, 34608, 138413, 165588, 158323], [16864042, -284256, -379538, 124441, 190054, -125157], [-888938, 1088368, -56286, -377946, -89096, -72437], [-858063, 545570, 20837, -221452, -140315, -473221], [-17889813, 728903, 72693, 50959, -12023, -113064], [-12455348, 924104, -69098, -151284, 7879, -58208], [10674634, -786874, 9532, 69011, 133724, -360606], [-13622744, -47659, -216066, 63796, -7052, -82155], [12450930, -273644, 54512, 245522, 178587, 98311], [8220882, -39878, -8228, -313460, 24368, 570334], [402921, -36535, 131501, 151046, 11521, -275575], [-25051336, 1407404, -179378, 135334, 218907, 205538], [-4979520, -677858, 132362, -24184, -127923, 126472], [1638573, -375730, 113823, -71806, -158559, -340442], [-320507, -1261647, 126209, -344285, -7575, -176329], [-40798457, 528527, 10275, 47994, 30965, -411703], [28935164, -747006, 128058, -30984, -193200, 377355], [2791578, 692660, 46166, -192686, 107366, 2626], [-10519850, 1117524, 364634, 18028, 89778, 358046], [-22111485, 70638, 384885, -105385, -101039, 435257], [23414908, 354518, 203172, 48986, -115374, -373814], [16286711, -1258542, 72443, -109524, -163346, -15914], [10636392, 518296, -64720, 206745, 73616, 322805], [8982774, -120256, -203928, -193582, 128784, 711232], [-40814710, 240308, 157456, -164384, 30480, -211558], [-3641598, -1538900, -220940, -84711, -15234, 151062], [-14200918, 1666199, -96716, -274253, -183408, 230540], [561498, -124778, -21346, -190034, -141125, 752298], [20067866, -331241, 227896, -301317, -409110, 113265], [18684444, 2185544, -54504, -357069, 116438, -18349], [19377896, -956604, -94708, -225126, -301388, -158222], [18599564, 94270, -137658, 445392, -122834, 3265], [-14331162, 1703268, 219364, -351561, -350026, -173791], [5983980, 2172059, 296918, -117954, -239790, 569784], [11172637, -516130, -58611, 304032, -227518, -453175], [9943802, 2814166, 55174, -276908, -61228, -579341], [-27396376, 1182448, 33010, 294816, -193146, -195243], [9280074, 1184372, 607262, -474165, 186, 18324], [-7404816, 1022322, -311930, 259431, -267559, 325343], [-26481524, -94552, 322236, -77220, 186686, 89318], [-33422797, 2665716, 230795, -117325, -123571, 32967], [-4575698, -382596, 13034, 50281, -521898, -168613], [-12608742, 793994, -365580, 159635, 334056, 31552], [35262859, -868536, -160325, -89088, -158491, 194495], [-12282443, 2040616, -573307, 232985, 277668, 665497], [4228468, -751774, 230274, 311814, 190970, -538363], [-24920389, 2453570, -126889, -312558, -154743, -178275], [-15032848, 1019112, 523962, -121033, -217892, 667997], [-15721057, -122393, -93789, -472577, 150363, 520001], [15787951, -243022, 24013, 13462, -144840, -422134], [-30633726, -3749436, 185388, 481043, 147592, 206906], [22179873, 138134, -352923, 213416, -77889, 197947], [-28149402, 1584938, 317738, -75637, -158675, -190081], [11100363, 2326384, -81629, -190613, -21190, 212758], [-76652882, 4740, -418786, -110874, 28495, -133862], [7858137, 568944, -153351, 528119, 253867, 635663], [58164960, -2640066, -482294, 185084, 372003, 124096], [-35249270, 1311775, -20352, -120240, 15670, -760385], [13590522, 674292, 540178, -459622, -406422, 887104], [27951547, -486751, 96957, -179682, -6223, 912227], [70327265, -943488, 139197, 438283, 262793, -159509], [25617666, 2627594, 82520, -296607, 200196, 185439], [-11706344, 2977578, 331022, 87060, 12730, 169012], [-20959520, -1523880, 778888, 74265, -260896, 98597], [69519137, -1016574, 291389, -256053, -174527, 58204], [40270809, 3417643, -131099, -463332, -342489, -809964], [-4096483, -1251728, 351465, -135189, -68087, 492247], [-55222111, -1384464, -546975, 149015, 279073, -420178], [84619110, -1530970, 233076, 616413, 574910, -398854], [-39484358, -2603764, -370382, 612685, 156096, -154678], [45307560, -2889658, 96794, -455690, -374194, -1101392], [31489672, -1037028, 379888, -859052, -465281, -819063], [-7537580, -847200, -577654, -184555, -308452, -102912], [-10797932, -1901836, -421392, 826370, 499947, 142474], [-39620648, -1168877, -625536, 795253, -160494, 274826], [32827107, 1586227, -172697, 14386, 426983, -711821], [-7967254, 340584, 60948, -100730, 519674, -60032], [40627230, -1560692, 544504, 126538, -150262, -298646], [49334525, 342740, -154259, 233509, -678744, -599587], [86799356, -159580, -50032, -203809, 252994, 499769], [29114070, -1481248, 306224, -101244, 212292, -344292], [64398813, -1371844, -305287, 215149, 561683, 496198], [-45460984, 2063787, 713256, -1105322, -628708, -543155], [-22944072, -871394, -188872, -1036066, -20904, 1430830], [57040518, -2693848, -371488, 380292, 455391, 984873], [-59188000, 470678, -107830, -997570, -433382, -413857], [17474049, 3223439, 138261, 299844, -202291, -213469], [64018345, 2360344, -119485, -336148, -383265, 484180], [-27367135, 1316654, 363095, -1633941, -546585, -574323], [22882357, -1031140, 73009, -486372, -2165, 77194], [26190308, 2491508, -260414, -649474, -589810, -648318], [3633200, 4597831, 442426, 75772, 26264, 926365], [-49140960, 820629, 76896, -111432, -25128, 1158201], [130746724, 1421498, 97056, -161043, 92996, -119167], [35439761, -1226140, -71893, 413280, -529767, -236658], [-63453836, 1359584, 134442, 372972, -132709, 640073], [-7190393, 428246, -659441, 986668, 14829, 279965], [-45557987, -4201044, 475709, 165437, 135503, 424947], [66105349, 2932706, 300169, 289186, 289050, -121084], [-33176936, 908402, 286642, 609281, 617594, 792759], [2006778, -3738770, -555580, 439508, 658440, -954431], [23738738, 718658, 754220, -531421, -224180, 1229876], [100714890, -1319925, 82446, -473973, -390630, -231378], [-28924461, -139314, -477407, 426337, 291775, 380055], [-7562096, 3442232, 470998, -71802, -650798, -352214], [-29833054, 1818252, -412126, -48438, 824893, 2689276], [-30205178, 3578072, 593304, -1462051, -531600, -1766414], [39172852, 1180448, 216892, 280052, 362624, -825930], [-3941348, -4720601, 526550, -872092, -66228, -376571], [-50014980, -3278412, -469946, 112240, -681650, 662880], [68431628, 1605590, 351032, 39294, 857385, -1337238], [-83971813, 1336243, 535167, -1092726, -499715, -1186235], [-85820635, -189552, 923079, -474139, -159023, 253445], [-29564568, -3514694, -10040, -1168285, 128194, -1184623], [5946966, -3795659, -244774, -359541, -20026, -813472], [-38457140, -3940397, -545110, 1400091, 597248, -1470358], [-7165938, -3422036, -574988, 453676, 72872, 1178800], [30879291, 64646, 529271, 866975, 140761, 1207805], [39470820, 3675556, 299002, 290614, 753812, 669358], [66207880, -3090806, -824146, 362603, -188289, -253955], [-367044, 3748897, 227174, 607345, -883676, -495687], [-56336954, -5198293, -459240, 2052939, 400340, 572894], [54829082, 2705488, -208946, 281532, 556428, -2476512], [-78925130, -366919, 156504, -392545, -453810, -1295027], [-63170613, 5561296, 962023, 44251, 72287, -57668], [-110386520, 3251009, 700822, -869174, -657174, 582920], [53036971, 6849534, 822959, -673520, 248172, -746974], [79428255, -1861480, 146759, -356468, 78545, -479288], [-186994284, 1994934, -172988, -227358, 784400, -104608], [-2081908, 7648268, 399118, -235627, -235294, 1522950], [-31124310, -1207324, 910194, -1437274, -464517, -2329112], [4407226, 989150, 972028, -1431536, -669282, 78767], [29393100, -1244517, -283680, 747409, 1038476, 1982596], [-205486584, -140848, -49026, 389886, -117925, -81502], [-53936304, 8138380, 110716, 963514, -508330, 524524], [-99042398, 4384871, 2716, 636665, -307870, -420384], [-8312896, -5602432, -558230, 351795, 849304, -636098], [-83645446, -732534, -286486, -1751159, 81309, 1055621], [2056948, -10797228, 50254, 184044, 701492, 221894], [-4484506, 4818869, -22696, 2385514, 247820, 370660], [117302595, 5968370, -1119859, -80556, -51156, -1361190], [-2400070, 5557324, -812186, 313209, 309210, 58779], [-9826435, 4307200, 324417, -229059, 917893, 802042], [-70902273, -3386284, 358187, 496329, -4056, 689130], [99658545, -281212, 1019307, -129867, -398191, -1233913], [-104947212, -2182103, 1545664, -1199786, -510862, 270088], [58359688, -3251011, -866462, 1283334, 1038424, 3429883], [102607579, 1156283, 430531, 1383181, -219159, 394166], [-45213394, -9822860, -402750, -360565, -14194, -1379772], [185701938, 1005888, 458926, 2149164, 387128, -93676], [-127869993, 2797043, -61291, -501826, 591199, -1723615], [91483296, -3928826, 145058, -1223550, -443188, 1291250], [17983994, -1971160, 233522, 112266, -909039, -159702], [134304796, 2057162, 42706, -1554007, -376783, 1501506], [206129836, 642126, 4666, -609505, 598161, -731879], [-174159121, -1159150, -1355951, 1004665, -548373, 992117], [13667329, -3909080, -337947, -30874, 401369, 1525173], [-22625178, 9826209, 175752, 1048707, 716094, 1380033], [46243495, 5209646, 593659, -81357, -156515, 2323474], [-151781024, 4109002, -800914, -11635, -1267371, 1908466], [-238654230, -823266, -703556, -1736933, -265184, -1768857], [34579930, -8327574, -546128, -797005, 376107, -2294840], [-274000856, 2437843, -499914, -740929, 475490, -1930218], [-131452068, -5877766, 124400, 780469, -473284, -981407], [265504620, -432021, -769160, 539608, -470294, -446892], [29384689, -6876267, -61225, -346603, -975601, 1743474], [-60252132, -15555714, 11746, -130734, 744938, -675787], [6467726, -2671819, 40990, -1156014, -84998, -241847], [-35648174, -11316098, -235972, 2019774, 486194, 2934188], [-29398340, -1209588, 1748720, -2343834, -297986, -2131352], [-150261565, 6525900, -1757707, 167959, 615855, 179267], [-59112163, -1937756, -552987, -1961433, -620609, -171701], [-48765885, -11207744, -241621, 1751190, -134167, 341303], [100339204, 10991810, -295424, -863518, -494161, -1071018], [-139674374, 4256886, 1582522, -790608, -1450540, -3734164], [-52232553, 3578246, 123857, -901907, -1025557, 4031599], [-10857737, 4199730, 610547, -1365031, -1327657, -993630], [-39509982, -6018974, -1839952, 2662898, 911136, -2417825], [115975225, 958732, -607729, 294113, 262167, 342337], [193223869, -6832357, -617483, 320262, 1017085, 1316947], [42592540, 11140220, 1100278, 982896, 190870, 1202854], [67442266, -545722, 573468, 172740, -338164, 1473506], [139819158, 11176662, 324450, -2147262, 591978, 1291128], [78379156, -4085540, 819500, 625480, -1625969, -131376], [137399784, 8737926, 1671438, -1064412, -857838, 2099385], [-94783662, 2418978, -1875270, 1659132, 338688, 3745266], [155556873, 317416, 1101299, -977959, -826017, 2780605], [-107170753, 8260396, 541143, 1764984, -332303, -1027721], [97381574, 17091470, 243004, -1155935, -638352, -560128], [188398226, -13429757, -1785570, 2064453, 1268116, 3658282], [557172, -5775185, -1095766, 1561604, 69918, 357208], [169979444, 7464114, -26946, -126306, 901614, -222957], [30395660, 6940963, -70302, -56387, -782328, -3838075], [-72800489, 2199602, 2295805, -1861038, -159785, -301682], [13572620, -2665362, -925422, -585248, -164842, 195022], [-147066217, 665148, 473435, 798251, 19439, 1305804], [82394583, -4171806, 1316767, 418527, -33415, -548911], [27658730, -12560718, -402436, 2720363, 1207562, 770364], [-133943278, 11660517, 720512, -3661857, -2627996, -1942046], [-179116240, -9435188, -281648, -1259200, -215000, 255764], [-4821422, -1584036, 1780952, -1667250, -1020467, -2363567], [-54097127, 5631614, 1025289, -760743, 561389, -4369456], [210249484, 3531544, -876538, 796243, -671978, -1772223], [-218736785, -14081063, 690093, 1218656, 1035311, 2871285], [163779032, 3436082, -32510, -1458254, -1011042, -2030866], [31783988, 3135996, -1012602, -2152936, 1318192, 852881], [106422516, -3858635, 1907158, -911093, -147154, -4893572], [-46965830, 9296041, 703262, -3198264, -1346758, 1371161], [45561728, 15191226, 482616, 681378, -688824, 373260], [-43360296, 6044542, -1155206, 3729126, 1065618, 1902645], [-138180778, 2628710, 692336, -2737317, -946044, -3534627], [-37641882, -14904120, -556788, 228975, -697080, -289644], [-76330325, 6657828, -609409, 5693505, 773338, -1344764], [-72615086, 1036154, 1561720, 473952, 29407, 1640920], [88075785, 5857902, -327923, 2932653, 501641, -1959103], [226304407, -12656676, 1882435, -1251831, -687688, -1618537], [-37040786, -11301208, 600508, -361020, 1264348, -592886], [-150257148, -10731818, -1026890, 575704, 1652495, -3027908], [211903079, 9345110, 557743, -423513, -1706087, 3337432], [3845152, 14550932, -1946864, 823498, -45468, 885794], [35251688, 2961192, -3163258, 956889, 754228, 2132245], [-200215049, -10202496, -1831015, 1593323, 1015724, 731709], [-128017128, -6375660, 1121422, -2074423, -1302264, -1107239], [159836462, 2028912, 111890, 566345, 1088060, -1733349], [-103395010, -2721300, -595362, 940290, 1644435, 3018504], [279319403, 2069688, 990113, -2800025, -801645, 3956627], [83707169, -13960452, -955635, 1044458, 641161, 2453543], [-88015356, -7889014, 2053058, -332416, -1461104, -2976367], [226584033, -20289766, -197625, -989544, -919423, 2717702], [-263213179, 16182348, 980567, 2724933, -614708, -2470691], [-12847503, -7088690, -1095431, 1493902, 1927817, -1067615], [-139434467, -1288333, -697091, -315398, -823437, 409484], [-361924175, -1499164, -2651411, 3126512, 1839767, -1529340], [-211227028, -4620622, 154756, -1553093, -359415, 351542], [-100793310, 3103478, 2730876, -1841533, -565566, -2109803], [-93467492, -9756544, -1750440, 4977240, 747248, 3132128], [-10059246, 10140586, -1121404, 1217412, 822422, 3993143], [41341546, -6449105, 464012, -2300627, 139210, 244785], [35465938, 2902226, -235740, -2543541, 242348, 8020355], [78966798, 4672469, 1993194, -896593, 1819488, -457454], [-113204089, 9503298, 2429127, -185922, -954954, 1104198], [98480182, 4377116, 536070, 194553, -838834, 5212088], [354150038, 7190610, -141802, -567064, -1014943, -2918256], [-45595716, 12911120, 549276, -1509136, 1660230, 1701316], [-137935803, -3922515, -3131175, 1759187, 89191, 3006218], [57329588, -846906, -2716294, 2887307, 2996453, -6893109], [101692018, -959985, -987818, 3377934, 31982, -2767321], [-76655084, -3072636, 2342984, -2532273, -1514960, -492611], [21392110, 3945428, 1024002, 1760912, 2205396, 1282180], [100029000, -10050080, -1937996, -3787068, 151146, 282864], [-46836490, 2939760, -12108, 823440, 1484700, -2402973], [-142823774, 5869630, 4291004, -2695726, -752520, 2014381], [-63004186, -5930410, 1967908, 142053, 1453108, 3818929], [243966943, -4736942, 513353, 2302737, 1890296, -2171623], [41332826, 1694432, -2740006, 665420, 974998, 205235], [332208873, -21787957, -2433667, -221920, 1449883, 2637542]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_230_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_230_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_230_6_a_i(:prec:=6)
    chi := MakeCharacter_230_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_230_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_230_6_a_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_230_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<3,R![-12520800, -900468, 307311, 9561, -1066, -15, 1]>],Snew);
    return Vf;
end function;