
// Make newform 354.6.a.i in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_354_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_354_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_354_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 := [6279664243680, -3720609623076, -156444406614, 1554240404, 93277609, -152272, -17732, 0, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0], [-11018649223780601340260160, 2812334227771541448543442, 159617109746534403693282, 687275948056748919781, -51962185507949140911, -457847921556604998, 3427298800323263, 34359867950801], [-63008708021328146106184740, -25351147263972518444143062, -1010580638031545315476102, -2052986798692591539011, 342667369114587819791, 2715138572817323143, -22925387385554253, -213080717119766], [-40994355136964891412995940, -2092655704737397057298322, -394180630611175552345132, -9233087863201015175891, 121007091560755332506, 3382114184691115738, -6798393085467258, -241173404580701], [8913845298144052102086080, -12437140292707217870372146, -526722639138656562098046, -167611146836501499873, 172964568397079736153, 1064444569459333609, -11496777086524839, -86456910449438], [18919097225926752618904320, 5464785054938800208966166, -254126879321207440569574, -11638632472838981936447, 70669592665446123887, 3434623525975861456, -3440941111655301, -230696835595757], [114985354857148133724920520, 1031438218577234831783526, -574515111577747804697014, -19523425739807739471437, 140257866397284578027, 6763564348167357631, -5901048474325521, -480161363957732]];
    Rf_basisdens := [1, 1, 40881373416015628755500, 122644120248046886266500, 122644120248046886266500, 40881373416015628755500, 61322060124023443133250, 122644120248046886266500];
    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_354_a();"
function MakeCharacter_354_a()
    N := 354;
    order := 1;
    char_gens := [119, 61];
    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_354_a_Hecke(Kf)
    return MakeCharacter_354_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, 0, 0], [9, 0, 0, 0, 0, 0, 0, 0], [12, -1, 0, 0, 0, 0, 0, 0], [23, -1, -1, 0, 0, 0, 0, 0], [112, 1, 0, 0, -1, 0, 0, 0], [218, -1, 0, -1, 0, 0, 0, 0], [233, 4, 1, 1, 1, 1, 1, 1], [393, -3, 1, 1, 2, -1, -2, -1], [473, 9, 3, 3, 0, -4, 1, -2], [41, 14, 7, 5, 6, 6, -3, 8], [70, -5, 1, -3, 7, -6, -1, 3], [1597, 33, 5, -5, 5, -1, 2, 3], [2506, 84, 37, -10, -15, -3, 1, 4], [3067, 77, 8, 1, -5, 2, -9, -1], [2534, 91, 51, 10, -2, -10, -11, -1], [1652, 113, 56, 14, 18, -10, -2, 10], [3481, 0, 0, 0, 0, 0, 0, 0], [11926, 193, -69, -47, 39, 43, 18, 6], [3633, 206, -152, 23, -18, -41, -19, -28], [1909, -209, -118, -16, -54, -30, 43, -23], [8703, 268, -69, -4, -11, 11, 6, -5], [-6105, 94, -86, 28, 48, 36, -50, 73], [520, -610, -75, 46, -43, 41, -39, -16], [3557, -545, 97, 41, 112, 6, -26, -12], [25325, -9, 530, 6, 15, 7, 42, -74], [-37433, -667, 286, 127, 123, 18, -62, 193], [30830, 15, 70, 32, 160, 65, 70, -93], [9909, 58, -93, -84, -215, -199, 91, -117], [9325, -620, 225, -101, -120, -58, -46, -80], [-18681, 123, 42, 140, -37, 28, -23, 111], [-12555, 463, -686, -206, 19, -85, 4, 64], [39207, 2056, -218, 7, -172, -153, 132, -172], [20857, 803, 164, 1, -487, 23, -54, -106], [30228, 1031, -188, 103, 377, 372, -176, 54], [6764, -369, 719, -109, 618, 35, 183, 58], [-42966, 1151, -849, -3, -319, 18, -241, 129], [-22662, -332, 106, 123, -433, -97, 402, -205], [-91186, 628, 121, 529, 393, -672, 10, -117], [-57868, 1914, 959, 74, -92, 246, -126, 417], [21616, -3286, 119, -378, -605, 412, 178, -327], [-51421, 263, -78, 215, 653, -13, -234, -36], [-78840, -1108, 47, -71, -567, 319, 165, 116], [24269, 888, -874, -433, -636, -492, 100, -859], [-138564, -1813, 1372, -182, 115, -611, -354, -39], [-168545, -925, 1010, -79, 744, -158, 442, 329], [61229, 2954, 1101, -336, -749, -217, -176, -555], [-129987, -1545, 115, 560, 204, 471, 272, 145], [27486, 5207, -2088, -542, -449, 425, 1016, -71], [-156747, 746, 227, -109, -1573, 311, 123, -533], [97194, 3252, 755, -787, -1858, 58, 716, -1001], [-217770, -5836, -2234, -42, 1216, 798, 322, -374], [-203259, -1014, 1606, -814, -89, 597, -225, -122], [-214263, 4999, -1088, 201, -597, -766, -436, -9], [-578342, -1805, 1936, 925, -605, -311, 27, 261], [-462692, 9155, 1204, 532, 227, -1301, -128, -197], [-222438, 2343, 355, -1554, 425, 1815, 1102, 158], [-444967, 258, 774, -714, 646, 965, 153, 428], [163541, 4532, -740, 34, -228, 216, 330, -891], [9244, 7830, -350, 748, -466, -372, -1153, -746], [-565136, 9815, 1762, -220, -1247, 429, 454, 407], [-139173, 1549, -3359, 210, 1078, -451, 1002, 187], [-669446, -5560, -6019, -524, -564, 1104, 695, -437], [390471, 634, 5480, -2323, -2636, -407, 738, -744], [-559172, 5346, 5413, 369, -606, -1368, -319, -2183], [-91668, 1411, -5429, 1562, -1326, 334, -1862, 293], [-544310, -4431, 1728, -756, 1902, 392, -802, -1290], [165957, 232, -7570, 2003, -1408, 1109, 748, 692], [623698, 5965, 3083, -2064, -4070, -1496, 2180, -1751], [-775937, 12041, 455, 577, 3160, 1229, -405, -17], [377628, -731, 794, 281, -1924, -742, -990, 338], [-1290426, -3184, -9143, 115, 6109, 1198, -983, 2567], [-792509, -1202, 9912, -493, 1149, 1677, 3284, 898], [338880, -28037, -12594, -504, 3186, 1425, -31, 2431], [1012010, 7046, -14887, -555, -1279, 4599, 1326, 1118], [1435915, 4897, 5530, -1086, -3741, -1089, -544, -682], [-379589, 11613, 9344, -1790, -332, -3018, 895, -2563], [-1470229, 2623, -8164, 3727, 5192, -416, 664, 3845], [729146, -554, 1894, 3555, 5359, -1665, -2242, 2371], [-49875, 5262, 10653, 1508, -2205, 693, -3873, -1575], [1855536, 17470, 11432, 2542, -2944, -732, -72, -1146], [694338, 34815, 4728, -3634, -2373, -209, 1348, -3941], [2149530, 12493, -2566, -3027, 3706, -182, 1088, 468], [725218, -3813, -187, 706, -1576, 1064, -821, -4693], [1968021, 17515, 8011, 6990, -1916, -2165, -920, -351], [2871262, -2244, -4541, -922, -1437, -2273, -1668, -3504], [-1278123, -8776, 9107, 6819, 4717, -2937, -179, 3019], [1466247, 323, 18590, -4873, -3381, 7, 3344, 790], [2013525, 294, 4363, 2274, -415, 567, 1532, 2481], [1498444, -10440, 20529, 516, 4446, 4840, -2163, 2261], [1503826, -54309, -411, -2289, 1237, 4124, -852, 3779], [1293231, -13689, 8056, 2833, 4733, -3954, 18, -6817], [-40490, 23177, -8767, 5325, 1729, -1683, -1429, 2282], [2536440, -28466, 17069, -4952, -2481, -1869, 3206, -1004], [-513595, 34713, -19691, 553, -1570, 662, -3312, 5256], [1273531, -11745, -3398, 1926, 2997, -5053, -1932, -1922], [1441096, -22229, 4745, 796, 2476, 6608, -2159, 2089], [3114042, 2873, 9649, -1460, 4480, 3763, 486, 242], [3419418, -31509, 25969, -6382, -7144, -3014, -353, -2325], [420845, -27381, -11782, 3544, -16127, -1897, -1404, 72], [1972522, -14549, -7016, -2013, -7560, 1932, -2142, -3736], [1467802, 7171, -4117, 8030, 2724, 10214, -1816, -3803], [1671259, -45049, -23856, 6157, 404, 5092, -2228, 8209], [-1602894, 10490, -27784, -5156, 6224, 697, 534, 8385], [855044, -48121, 7303, 6272, 4898, -4367, -9072, 5768], [-2401663, 32592, 25154, 4761, 2632, -11997, -3033, -2474], [1966913, 46387, 13530, -3555, 13853, 7622, 3631, 4015], [42924, 35415, -27690, 1918, -4445, -14208, 3096, -9950], [2031322, -125115, -10479, -9278, -14572, -5004, 1051, -1983], [-1006973, -25512, 26550, 805, 7343, 4819, -644, -50], [-1708348, 21089, -18847, -1310, -12704, -2042, 1536, 1799], [-1795401, 116338, 30804, 456, 9440, 360, -1902, 495], [-2128035, -44890, -30726, 2049, -14375, -6033, 6868, -2506], [2428781, 22652, -25145, -6485, -5103, 9947, 4565, 3565], [-3598531, 73713, -7076, -4108, -14603, 3205, -3956, 3284], [-4298575, -33540, 18706, 3084, 8142, -7720, -5312, -3433], [1161217, -70494, 9658, -3965, 15238, -2762, 2934, 1605], [-5556302, 23801, -37455, -7132, 14912, -4982, -4316, -1297], [-4882419, -63979, -11824, 14943, 7848, 5156, -8302, 5933], [284409, -6744, -12455, 7017, 804, -5586, 7983, -6702], [-3138283, 93643, 2139, 5753, 30060, -5792, 527, 966], [-4321726, 18250, -15709, -9195, -261, -4621, 59, 1418], [264524, 27740, -24668, 10024, 12214, 10188, -1478, -854], [-113657, -124707, -63330, -611, 7992, 6554, 1198, 177], [-3894182, -14543, -14598, -10098, 4285, 5406, 2976, 266], [-4359159, 106905, 21914, 1429, 8107, 3884, 6982, -3257], [501176, 75336, 74897, 8504, 5639, 5912, -6274, 12087], [-3017504, -123452, -16490, 5800, -1518, -4024, -2922, -368], [-7143363, -64575, -34251, -16545, -21974, 2672, -8835, 9084], [-3805654, 44683, 9808, 7080, -27779, -5237, -4140, -15109], [2620492, -39086, -2006, -7348, -6446, 2324, 3549, -8266], [-6745615, -81599, -25753, -6356, -15932, 1043, -6138, 14433], [-4879282, -22553, -18721, -7275, -3931, -5553, -2865, -7934], [-2509998, -88067, 100070, -1924, 18198, 13123, 15688, -6547], [4183140, -25516, 96511, 8271, -20855, 1235, 3176, 8074], [767821, 11840, 9164, 7739, 38222, 12686, -3008, 5363], [3572484, 71149, -21205, -5452, 9028, 1588, -17438, 16971], [-2948009, -13174, -6406, 18597, 21892, -5599, -4788, 20002], [961547, 201570, -40674, -313, 8970, -8909, 186, -16280], [587489, -66715, 73322, 14419, 8097, 2150, 7604, 4687], [2386693, 89672, -15969, 18132, 20547, 8341, -9643, 16271], [270975, -33729, 131134, 6183, 17245, 14928, -2368, 16829], [4999556, 22578, -70049, 1452, 9225, 13706, 11500, 21487], [-3507806, -143647, -39756, -3616, -3276, 3307, -12087, 2841], [2943448, -81031, -23996, -35649, -9407, -10269, 5795, -9127], [9756288, -46172, 6901, 10541, 29047, 11123, 8977, 14134], [9929869, 239852, -69808, -9925, 3022, -3628, -1202, -14117], [6457106, -146220, -98485, 11047, 15731, 20731, -10116, 372], [13318464, -64475, -76994, -9733, 1757, -15449, -15165, -13149], [-1180497, -66932, -78032, -9717, -56168, -205, 16680, -10424], [7691245, -120059, -85103, -18945, -17102, 14060, -3467, -10172], [6792180, -222956, -53136, -10646, -44118, -1092, 7986, -8978], [7725916, -242620, 37278, 5462, 12416, -21766, 1888, -17944], [4450986, -57044, -150060, -4690, 7736, -4142, 4496, -18536], [4325507, 56766, -16822, 11403, 15372, -25914, 23780, -1759], [-6775416, -40305, 132970, 14597, 1735, 1538, 2212, -686], [6999108, -168755, -36985, 25712, -29173, 5517, -3146, 21002], [5880742, 183447, -37134, -34112, 3454, 9439, 6822, -2819], [13849312, -254143, 2192, -10657, -31849, 22065, 17903, -9213], [18564045, 66663, -17402, -10250, 26373, -14001, 14762, -19022], [4336441, 303307, 14206, -10296, -64487, -8774, -17771, -2865], [10680873, -122525, 119975, 28503, 28022, -11120, -29428, -132], [9579736, -72133, 120996, -10416, -7439, 11591, 29204, -13265], [-5240336, 107083, 33071, 87, 32435, 20488, 33812, 15059], [302093, -15676, 44671, 31098, 4403, 27137, 13121, 10983], [690893, -242385, -49530, -9280, -27913, -12858, -24793, -10421], [7899613, -191746, 111664, 22513, 9584, -3396, -5288, 3303], [-8843300, -44033, -7869, -17903, -52015, 2820, 2198, -6653], [-2141084, 197798, 28707, -39013, -56339, -7243, -27717, -11506], [10142098, -138610, -79656, -22474, -13860, 27046, 20058, 4194], [-10457177, -56125, 127648, 21821, 40315, -37292, 2570, -1983], [4192362, 5457, 157966, -25497, -24851, -11107, 117, -6537], [-3063325, 87948, -89152, -22043, -22359, 7095, -20530, -3342], [1313242, -294056, 99617, -16803, -9234, 35836, 46867, -9337], [-3381959, -365367, -2124, 3456, 9081, 12583, -15908, -5964], [-13991242, -100413, -5368, 30128, 43315, -13271, -8628, 16385], [-3248495, 95801, 24048, -69571, -26567, 20113, 4736, -28764], [-4148924, 429103, 31152, 7601, 49065, 16976, -21164, -13058], [-11192009, 106707, 152778, -21989, -35593, 25460, -1606, -12781], [950948, -62679, 100215, -28066, -73916, -788, -780, 2729], [-3441844, 402786, 49932, -23192, 142, -37102, 3534, -5676], [-3349816, 172186, 45624, 28428, -18428, -5980, -25884, -19176], [7868506, -115426, -102136, -30984, 45364, 22452, 37028, 350], [1553394, -168077, -27282, -3377, 79596, 7188, 30028, 34258], [-16078530, 5536, -46466, 54558, 39666, 906, 2506, 18252], [-7800557, -268593, -14474, -1960, -18630, 23972, -36097, 11025], [-14517194, 228854, 161971, -6711, 34481, -41292, 12877, -15789], [7650025, -367625, 194498, -47363, -6536, -4370, 6516, 18799], [8205101, 372643, -191794, -38799, -22823, -8286, 5808, -16511], [20789751, -203283, 38946, 15240, 24009, 51627, -9226, -3368], [-6690017, 67525, 18805, -21779, -66688, 31104, 10029, 21726], [14407689, -102371, -40950, 4048, 29855, -34471, -26350, 26624], [20088432, -67317, 150828, -78648, -92195, 23770, 130, -9334], [2539445, -324503, -198944, 1689, 38715, 9510, 4378, 60291], [3399593, -679502, 1549, -41247, -69498, 12252, -11367, -11332], [-8134684, 134998, 87668, 72802, 57448, -10910, 22432, 26266], [-361239, 22412, 40577, -38016, 69629, 46857, 31869, 33977], [-2148924, -496310, -187559, 31121, -79095, -5771, -20330, 42614], [8925304, -53128, 282759, -1951, -40536, -528, 45256, -10993], [1370329, -140325, -179037, 36803, -9986, -26888, -12992, 62904], [-14725271, -496581, 105157, 34585, 37088, -48136, 17443, -868], [-5059943, 277091, 383332, 17823, -19582, -76590, 24814, -44847], [-14591883, -410761, -64366, -66226, 14523, -1847, 24682, 34490], [13494032, -392592, -178245, -28859, -36255, 22517, -31410, 14768], [-9318738, 114873, 41871, 25248, -50018, 32370, -10602, 57611], [-17846122, 61152, -77234, -39374, -97100, -33552, -5704, -27468], [-8004232, 456102, -353929, -82024, 32767, 29152, 27522, -1271], [177072, -389481, -55480, -58830, -27380, -2159, 59413, -61995], [-2064602, -357906, -108895, 41802, 25487, 15002, 37923, 34673], [-4633743, -338914, -126557, -10406, -44459, -24975, -17055, 35371], [12346865, -606661, 239378, 83191, -353, -10142, -2004, -5803], [2168434, -265543, 26233, 24502, 36774, 65280, -39254, 91595], [10333556, 388381, 44222, 48916, 79916, -20620, -59316, -16314], [-10908900, 990998, 28385, -16108, -6465, 4479, 35914, 568], [13580792, -422996, 202008, -33854, -100738, -20442, 10676, 41302], [-3570543, -159343, 12788, -11650, 34266, 1082, -3271, -64309], [-14166124, -453965, -154041, 2150, 67574, 56292, 11512, -14809], [13146289, -399640, -174146, -26708, -25592, 74792, 10170, -42721], [29193744, 206144, -26097, -17520, 26979, -31415, -36425, -5480], [-7544909, -293009, -166463, -57901, -88330, 63010, 13049, -16928], [-5798724, 356085, -48520, 6690, 40142, 56636, -40474, 11848], [-5245390, -607873, -41806, 46651, 126572, 18456, 8040, 17330], [-1883930, 386235, -3486, -13626, -16016, -11395, 17981, -72163], [6846009, 112174, -103652, -59009, -175196, 18081, -14772, 15010], [-12184835, 394362, -40079, 42436, 125039, 135299, -102, 39837], [-10559474, 34653, 248662, 42746, 3927, -68925, -18376, 52789], [-32023686, 526844, 67539, 17225, -21012, 7906, 12356, 36407], [-15621079, -678547, 747, -19391, -27914, -1248, -31387, 42492], [-41672180, 134768, 104186, -27210, 130486, 41304, 18850, -56602], [-15697266, 424311, -393620, -58894, -65608, 18883, 55488, -11273], [49998285, 345972, 112905, 11446, 79557, -23049, 46977, -106065], [-19904482, -1103088, -103523, 28165, -93636, -2276, 7826, 65683], [-15279437, -577633, -232652, -71409, -50333, 3900, -18111, -96591], [4381318, 128327, 58401, 77469, -128193, -91096, 5566, -59189], [17866491, 42837, -104466, 77764, -11843, -59004, -40297, 79567], [5676471, 196670, -162100, 15047, -119036, -35133, 116370, -26308], [5130285, 325092, 146446, 26122, 56275, 157287, -67041, 44944], [38246533, 372323, 284624, -6706, -66639, 36793, -29806, -10410], [-23556518, 738393, -66171, -139440, -209216, -17849, 24700, -47562], [-9759239, -496594, 143656, -2299, -9038, 47828, -37118, -1553], [-5721512, -101983, 215799, -98352, 3937, -32199, 43116, 38210], [27476048, 19483, 150660, 41957, 72613, 52075, 38709, -76931], [-10165893, 21537, -114400, 73809, 46369, 23206, -57896, 100089], [10656475, -487616, -14954, 92860, 89180, -73954, -1226, -56769], [16283858, 595786, 48334, -57434, 5050, -55238, 82846, 1976], [31403421, 174570, -162923, 36735, 131541, 40225, 130847, 57301], [-8223482, -244775, 221287, 85274, 193187, 2211, -27914, 64722], [-7071616, -994039, 675590, 32712, 66730, 94031, 1419, 71145], [60480051, -563791, -155172, -7737, 110961, 73489, 50878, 17752], [4140265, 474540, -347433, 50388, 41817, 15017, 8130, 58477], [-8714095, 490815, -411752, -113474, 93002, -50860, -9219, 57081], [75246152, 40814, -114615, -9679, -13975, -75073, -46706, -23852], [44079936, -668678, 175277, 58657, 20739, -48180, -25981, 48531], [46311872, 390205, 84131, -48134, 130704, -21922, -56067, -623], [6428981, 256103, 128272, -7609, 12763, 29262, -93847, 50653], [-7781142, -518995, -594810, -90056, 21336, 33994, 59318, -71882], [14928658, -846577, 81432, -154597, -98859, -68927, 34767, -14467], [-22976828, -1321224, 626712, 18102, 126656, 22204, -32397, 71408], [59507175, 227926, -147478, -48595, 130502, 24231, -47588, -28182], [244283, -155807, -554878, 22928, 29083, 81470, -32333, 46085], [4322933, -260741, -180483, -88248, -228398, -138319, 222, -90207], [-59405170, -766633, -140320, 16386, 24474, 75263, -72777, -26959], [53692672, 945507, -83034, 2305, 84417, 68805, -19801, 159361], [5051352, -1014194, -29190, -60958, -88118, 66400, 28720, -1440], [-622270, 51886, -154194, -102494, 121310, 57662, 31380, 54604], [-3003835, 127352, -554122, 28405, -41344, 37534, -52054, 197777], [-61027931, -209471, 30356, 51775, -42147, -11486, 28874, 25887], [-64152536, 495568, -340287, 13910, 166600, 49728, 2741, 70061], [25200359, -1027404, -213670, 138339, 282404, 13455, -96654, 54688], [-9132689, 1100673, -12762, -49090, -86141, -126531, 30578, -26808], [-61824376, 736475, -59574, 52576, 46474, -85856, -126318, -57398], [25746853, -734643, -26388, 116275, 18322, 43326, 37590, 41217], [12040476, -144604, 234073, 48035, 187125, 262532, -72070, 47721], [-45095200, 247091, 13279, 99766, 83532, -3014, -131978, 105049], [-3149825, -465232, -22066, -232460, 7004, 148472, 53058, -11583], [51119156, 433977, -423824, -13358, 17065, -89829, 3659, 28993], [-59922116, 44157, 139453, 2991, -229551, 40912, -82566, -11655], [9506735, -1101247, 234021, 113257, -105148, -115518, 83636, -25214], [-36485194, 206750, 474510, 100260, 6892, -98122, 54751, -12762], [-25016293, -226823, -44590, 86668, 321595, -9645, -61650, 136612], [104350658, 24327, -341686, -5743, -61909, 177059, 18331, 60189], [-67833519, -1659311, 118090, -138126, 30846, 114654, 2369, 76149], [7200076, -426467, 325550, -101116, 84418, 80941, 120256, 41749], [5401608, 1617694, -593550, -51380, -63388, -72278, -41108, -69372], [85057793, -698042, 104300, -68427, -422061, 53857, 63412, -30962], [92190161, -802034, 470196, -53263, -13876, -30265, -11299, 10708], [60475450, 507273, -519889, 216398, -60606, -168184, -106629, -2487], [-51666441, 488817, 176984, 62832, -221441, -205153, 5460, -178406], [-9206500, 131172, 82317, -192480, -227236, -106362, -29325, -65381], [-54501500, -696939, 536020, -63416, -100124, 9103, 85013, -30965], [-45789590, -1700840, -282616, 35360, -98952, 5332, 63256, -32620], [17491957, 1466160, -91788, 36280, 128786, 94139, 135285, 47912], [89006290, 847560, -464546, -29680, -40936, -23266, -18406, -78286], [-17014145, 414743, -484005, -52427, -125768, 140908, -55711, -7830], [149335223, 180883, 7526, 6771, -66487, 84999, -82836, -117404], [11285492, 180218, -434830, -92186, 164778, 180662, 37465, -53272], [-17581721, 1524648, -438260, -80198, -118072, 125251, 136975, -58190], [28015493, -216323, -397321, 189300, -51678, 62374, -3182, -5756], [-61975844, 337273, 1271446, 175108, -82818, -101520, -4468, 28042], [15645925, -52622, -65383, 168271, 225983, -88964, -186971, 267376], [-12809063, -1835098, -442692, 259195, -94234, 10829, -48149, 142182], [-97264646, -263872, 570397, -96351, 104815, 194665, -91675, 21034], [22801955, 267088, -64276, -36442, 29050, 124245, 85201, -75384], [-46499714, 877219, 270356, -146820, 69248, -142563, -6687, -145277], [12501368, -22135, 370360, 29540, -248051, 75921, 28410, -71889], [96669029, -255724, -245964, 75975, 109970, 208521, -152750, -9310], [-50182013, 953543, 174854, 9440, 83495, 79657, 40216, 76190], [-854962, -288235, 687702, -166983, 17173, -206403, 84733, 2391], [-23724026, 968934, 36395, 59225, 299772, 892, -216308, 82713], [26578708, -927043, -523735, -297512, -97560, 140022, 202217, -164753], [-42871747, -1128563, -600870, -266211, -301772, 127500, 215236, -265283], [-44036039, -505363, 151978, 122084, 110098, 40740, 73473, -131461], [-35497858, 367910, 270683, -56720, -59356, -83114, -102139, 45803], [53163009, -1819063, 243390, -38581, 157557, 123005, 62692, 131138], [-55521215, -202329, 555395, -304114, 55844, 187725, 20771, -80027], [-99251912, -169342, -451339, -159445, -24226, -12532, 169325, 5981], [-130999831, 1128145, 122454, 29534, 133587, 122017, 56494, 213904], [5480372, -1252421, 22409, 447572, 81882, -194850, -170707, 51647], [-47174591, 1316581, -240664, 81910, 51920, -283268, -77479, -124991], [-112449553, 1138332, -558646, 191779, 373698, 107241, -37104, 159036], [-65304107, -239957, -660092, -139549, 193647, 28677, 78640, 12460], [42481024, 518044, -1038708, -48382, -310464, 432, 8946, -68800], [17612738, 1880880, 922698, 338220, 166712, -204100, 56764, 16078], [52038679, -83242, 557457, -22417, -121040, -48106, 18283, -220544], [-94645284, 1302674, 909772, 114684, -98888, 12356, -236548, -12452], [-137093963, 273802, -359818, 106563, 74686, 29464, -199768, 20823], [-16932894, 73834, -157116, -320910, -175852, -132820, -334, -92704], [19949435, 360725, 503216, -35133, 89163, 17978, -117321, -81541], [-112171008, -610710, -167082, -337838, -263080, 149816, 125892, -227350], [-69394650, 447906, -42624, 89014, -230792, -267474, -86574, 58924], [-161959914, -654961, 720739, 35270, -64986, 41765, -83828, 62306], [99183015, -1244683, -112285, 51023, -385977, 51647, 197136, 103215], [-92125781, 2299690, -1292578, -34021, 90386, 258745, 121462, 132178], [-52334152, 107305, 262924, -205320, -70076, -300713, 156800, -257227], [47552010, 1292579, -566342, 113779, -97735, -227113, 300779, -165119], [78859906, 421123, -14797, -30496, 125984, -171010, 155838, 34893], [135444825, -770129, -313605, -285637, -434486, 103808, 46728, -249696], [3117792, 642178, 211599, -78965, -54931, 233935, -84057, -63392], [-92273564, -580488, -29364, 84606, 457370, -160516, 154502, 90032], [189871085, 2089578, -805589, -22860, -236285, -77561, 13848, 37625], [5951395, 459241, -558852, 233008, 22443, -226885, -21228, -55508], [-115509556, 387108, -7398, -138430, -442342, -223258, -59544, -19274], [-21393856, 183105, -67450, 141687, 25257, -72829, 232671, -137597], [214771285, -34981, -311066, -99701, -129131, -69240, -66660, -199147], [-48945558, -1061909, 543340, -35018, 146386, 73375, -290224, 100095], [146962181, 1790351, -772670, -316141, 258285, 275598, -36250, 40583], [124173605, 1313957, -1232748, 110957, -387323, -225913, -208114, 38732], [143388140, -394685, -256322, -96493, 216712, 46256, 12778, 220380], [-115575860, 44600, 833120, 200498, -387048, -88102, 5694, -166382], [116100479, 13034, 73398, 155495, -264702, 145168, 73012, 358515], [-54444395, -1599455, 1188122, 134954, 374051, -42206, -284919, 232387], [123893487, 2039410, 290443, 20562, -398835, -82780, -16104, 48354], [-12169144, 967623, -1850775, 42285, -19082, 27700, 254683, -126511], [26219343, -682994, -855359, 174811, 380990, 250762, 34937, 128832], [-144314564, -509639, -251715, 36463, -8293, -290728, 19309, -64137], [55729932, -985212, -1086487, 138899, -183059, -194003, -219279, -106332], [-82665693, 779602, -999904, -233505, -508160, -30559, -99086, -38448], [133611550, 2151076, -1257588, 84390, -310434, -124940, -154064, 54974], [81762455, 2993817, -351573, 238515, 199728, 290540, 37242, 262030], [-30603363, -1438465, 421191, 273109, -163330, -137048, 90727, -80688], [-71140787, -1983645, 294432, 38928, -138938, -260684, 164933, 186105], [-64652496, -626229, 988236, 129155, 289146, -132532, 34436, -58602], [8737673, 1121494, -916575, 103713, -301207, 195709, -200425, 18737], [-98421081, 1319118, 729452, 129181, 283889, -382253, -20106, -120012], [127452287, 2386421, -624384, 46431, -83091, -83543, -354636, 50724], [150181010, 143560, 597323, 246929, 22275, -19236, 132912, -63387], [-154916571, 1862564, 1397941, 46490, -341741, 20315, 23488, -28925], [-27845543, 2913807, -627060, 88849, 461361, 155460, -103078, 182287], [-118977020, -269197, 74210, 421890, -143169, 200685, -139654, 101849], [16488894, 3547242, -147356, -76592, 553888, -159172, 66306, 1108], [149008175, 1429329, 792857, 58281, -405558, -47248, -39660, -220820], [-107072209, 2662591, 822666, 187651, 416247, -145182, -180261, 187473], [9188843, 1698736, -1667960, 35925, -42296, -332448, -19628, -5115], [-14801428, 931642, -1443359, 106676, 169302, -123818, 93013, 42063], [344158648, -141321, 698574, -76534, 402812, 76857, -39488, 291529], [47592302, 1517298, 232961, -26605, -8165, -299131, -38085, -23190], [254480888, 379615, -709897, 147374, 75318, 275257, 125269, 289962], [-77224607, -2281129, 505179, 143727, -231448, -92552, -4075, -211034], [16132423, -299396, -870529, 390350, 575661, 393997, -461722, 212589], [45362448, -1862916, 1138680, -90566, 56106, 286798, 78668, -66266], [46305199, -990682, 398628, 497223, 497914, -18299, -88213, 133228], [37915757, -2732775, -329370, -536573, -290254, -288040, 40566, -145719], [-142482065, 1535795, 262407, -277855, -383330, 536394, 162708, -31468], [-78993760, -315714, -1521509, 364618, -506445, 346859, -218756, -37354], [-249345942, 1210003, 40572, 271907, 64961, -236063, -427779, 6477], [339933369, -2245903, -20968, -131154, -110907, -224315, 206626, -86644], [155904947, -4309598, 171068, -114321, -336240, 140138, 22464, -162989], [95533285, 1377592, 847612, -94766, 382114, 239844, -186048, 75525], [217076890, -4771692, 1281037, -181789, -304629, -35781, -3217, 127196], [11370277, -1009477, 703441, -400485, -520228, 308497, 284196, 45965], [108150467, 1997420, 223916, 80237, -261468, -265350, 397348, 80087], [-44823807, -1353241, 871208, -57820, -183481, -497681, -29396, 197056], [51018164, 924213, 1090773, 113291, -316940, 226091, 4921, -1960], [14917910, -5005036, -2030259, -362740, -299311, 157454, 653, 56841], [-1459299, 1918115, -1019942, 158659, -678127, -330766, 10022, -368011], [95480696, 930665, 1627145, -432222, 380020, -4792, 255957, 48773], [-27242408, -2529134, 996090, 92216, -65786, -274160, 26346, 9280], [110480833, -2405748, -1942825, -180816, -1101, 90305, 338270, 41713], [130267134, -1426794, 742928, 515088, 319672, -544808, -94710, -36316], [98956385, 2467523, -464629, 157849, 221554, 398009, 75654, 85779], [-66017064, 3161957, 4192, -26184, 335324, 149270, -348378, -8390], [38465824, -2552660, 538278, -370928, -524016, -54956, 163901, -550062], [28972414, -698948, 678024, -425336, -160614, 108510, 129898, 75628], [39413836, 953703, 862974, 68550, -640639, -108489, -57446, -106433], [19581186, -534392, 1007673, -96800, -211135, 589199, -112207, 142102], [22644040, 831506, 1048369, 318882, -500494, -409738, -42953, 9203], [-103705200, 555287, 340676, 259534, -164226, -66721, -381883, -134553], [-18481553, -1474783, 279674, -294051, -243598, -6384, 18894, 28015], [-127605442, 1895097, 398610, -665784, -146387, -188747, 350492, -68627], [103980735, 2014097, -1133510, -439183, -165853, -18690, -161153, -52083], [-22778082, -540133, 1678, -184175, 627631, 267313, 386399, 48551], [-146654477, 6756127, 195979, -371342, 284196, 33563, 134006, -167009], [-22640969, 2298878, -1654385, 139277, -636556, 498650, 265857, -219262], [-239018253, 2319449, -2019435, 212151, 512444, 138736, -114995, 31674], [68944698, -258045, 2119876, -249195, -193683, -197252, -106698, 34088], [19132773, -484169, 2097736, 391333, 435271, 419958, -41987, 295661], [-138496249, 809825, -590120, 11345, -442264, -164254, 447950, -392541], [-79172984, -1045790, -370668, 192458, 858026, 511354, 23780, 68962], [8517740, 1350657, 1120881, 224063, -77497, 84958, -135253, -16191], [-26822811, -2624803, 127990, -97780, 468841, -7840, -203637, -2331], [-177711598, -3571877, 161301, 504288, -4611, -53113, -147200, 100696], [-70386476, 2207930, -2019601, -238641, 599413, -78082, 27281, 7543], [-159338454, 57876, -1481304, -164066, 1184172, 452296, -251007, 299930], [-477163254, 794001, 976281, -57877, -67685, 164305, 74735, -170158], [253055840, -1841108, -1613534, -527044, -215604, 518106, 76862, -20272], [72538662, 1245899, -217772, 312320, 772567, 65747, -443570, -77291], [-24728959, -2659893, 1128224, 123577, -645438, 231168, 194156, -240205], [-26913085, -780125, -1256079, -436463, -982094, -631480, 23169, -826042], [143825474, -225072, -2786355, -155042, -410581, 18997, -203515, -248872], [223682237, 2775472, 491383, 442592, 250721, -122145, -398580, 151667], [-1489457, -848562, -1295804, 192536, -152341, -183871, -107823, 576866]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_354_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_354_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_354_6_a_i(:prec:=8)
    chi := MakeCharacter_354_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_354_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_354_6_a_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_354_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<5,R![-56366121500208, 6201083334516, -27962911782, -5213410628, 47291689, 1332208, -13700, -96, 1]>],Snew);
    return Vf;
end function;