
// Make newform 245.6.a.k in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_245_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_245_6_a_k();".
// 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_245_6_a_k();".
// 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 := [1012704, 463952, -317696, -25016, 15166, 537, -225, -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, 1, 0, 0, 0, 0, 0, 0], [-57, -1, 1, 0, 0, 0, 0, 0], [915528, 386020, -304774, 16161, 8738, -762, -52, 5], [9588768, -3802392, -2509532, 524526, 75255, -12151, -457, 67], [-6403080, -1822564, 736382, 142287, -12866, -2374, 60, 11], [6429000, 848492, -2289738, 206319, 68407, -6815, -415, 42], [-6041832, -1811180, 2279274, -195855, -68407, 6815, 415, -42]];
    Rf_basisdens := [1, 1, 1, 10464, 20928, 10464, 10464, 10464];
    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_245_a();"
function MakeCharacter_245_a()
    N := 245;
    order := 1;
    char_gens := [197, 101];
    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_245_a_Hecke(Kf)
    return MakeCharacter_245_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 := [[0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0], [-25, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [13, 5, 0, 0, -1, 1, 1, -1], [-255, 15, -8, 1, -1, 0, 0, 2], [-268, 94, 8, 5, -2, -3, -1, -3], [241, -39, 1, 10, -7, -3, 2, -2], [591, 9, 4, 32, -5, 6, 4, -4], [1294, 145, -27, -134, -13, 3, -2, -12], [-554, -222, -15, -16, -12, 4, -3, -13], [763, 483, 14, 132, 7, -7, -7, 25], [2129, 422, 35, -39, -12, 15, -8, -56], [7676, 480, -34, 165, 20, -14, -4, -12], [-1551, 323, -77, -229, 19, -6, 31, 41], [-5031, 113, -126, -43, 37, 54, 28, -118], [-6658, 1150, 583, -494, -20, 4, 35, -19], [1016, -2015, -294, 97, -19, -6, -56, -42], [7110, -2024, 35, -130, -14, -75, -18, 10], [23258, -190, -219, -778, -28, -52, 33, 39], [-6126, -1636, 854, -279, -8, 59, 23, -143], [7496, -4032, -427, 1500, 102, 24, 33, -33], [-8550, 2308, -547, 606, -78, 45, -48, -72], [11076, 1897, 720, 1236, 113, -29, -103, -171], [22886, 1692, -1002, 3476, -40, -64, 118, 250], [13760, 451, 165, 138, 5, 49, 360, 358], [-37480, 3348, -1195, 2727, -158, 200, 9, -25], [25270, -4180, 347, 2396, -194, -45, 24, -128], [35388, -2631, 484, -555, -199, -14, -86, -484], [7622, 3678, -424, 1945, 270, 197, -329, 245], [-4263, 4343, 9, 1169, -629, -48, 351, 673], [-18221, 6863, -152, 5880, -171, -27, 281, -481], [14696, -5092, -2506, 1364, -392, -384, -10, -294], [21612, -5756, 1964, 1920, -300, 306, 490, 70], [-21546, -16921, 1494, -4355, -293, -152, -2, -908], [199824, 1112, 4611, -8882, 498, 500, -133, 261], [216963, 6405, 1074, 330, 81, 333, 121, -635], [64332, -5518, 4297, -251, -956, -23, 180, 996], [-97905, 30315, 317, -1621, 567, -125, -564, 452], [-177379, 10973, 5944, -5918, 229, 1, -373, 491], [74345, 24825, -2653, -1206, 437, 319, -462, -1634], [113330, 19289, -1547, -9072, -741, 477, -4, 1142], [-101444, -7588, 1176, 5008, -500, -482, -1710, -1242], [42396, -19050, 5986, 8502, 218, -404, 502, -922], [11013, 4975, 7782, 474, 395, 343, -1453, 1983], [48452, -26984, -8492, -13826, -224, 322, -246, 390], [-39801, 10951, 7623, -15666, 431, -617, 1834, 590], [-137776, 28286, 5595, -29809, -972, 1219, -124, -92], [304872, -72378, 6015, -24811, -876, 217, 618, -1906], [-340956, -31330, -8384, -358, -1170, -104, 40, -948], [-125160, 42190, 1152, 10157, 334, 405, -65, -2323], [-151416, 7016, -4669, -14120, 1306, 1618, -371, -2789], [280455, 63897, -4478, 13960, 533, -2565, -93, 323], [125319, 21455, -651, -24232, -165, -245, -2340, -4852], [27756, 27592, -11604, 3714, -4192, 2086, 2222, 2178], [243388, -55468, 9453, -3553, -46, 458, 391, -1511], [1544, -53481, 7934, 5275, 3787, 418, -412, 6062], [222510, 75058, -6971, -27568, 2756, 2186, 1419, 5853], [903172, -24666, 3900, -11111, 2046, 1637, -293, 2369], [337603, 44409, 1742, 40016, -1683, 379, -817, -1817], [-215890, 120328, 14331, -29689, -142, 365, 2542, 4666], [446075, -24109, -9078, -8552, 3599, -1755, -3735, 5657], [-270976, -20722, -1291, -30246, 4768, -871, -1560, 6752], [161302, -16722, -9361, -34558, -2652, 2224, 1127, 3025], [-485276, -77500, 22590, -13718, -3088, 294, 1904, 4768], [707460, 164386, 3192, -38767, 306, 385, 1659, 2777], [1072765, -50703, -28795, 76316, 1913, -1375, -798, -2946], [180380, 22064, -8806, 10403, 3476, -2155, -2119, 8039], [613894, 150840, -20521, -73850, -5382, -2311, -850, 4122], [562238, -42805, 15565, 100520, -467, 6987, -3138, -2672], [-945282, -50434, 25932, 80943, -1754, 803, 2149, 5943], [131040, 180552, -26787, -6818, 2350, -908, -4835, -1853], [-560295, 20491, -39662, 3976, 5253, -1060, -5096, -3592], [-293910, -160730, -21390, 6404, 938, -3970, -5924, 2800], [456363, -204465, -9591, 2158, 4187, 6303, -1532, -4500], [-1596379, 11203, 4316, 6980, -11215, -694, 8076, 8268], [-203804, 6234, 33080, -34338, 4330, -1168, 1080, -11788], [-198614, 143816, -17878, 60626, 1356, -434, 3444, -2236], [48705, 16238, 11544, 40712, 918, 11914, 5982, 350], [1246388, -148997, -16465, 12189, -5439, 3270, -6511, -14515], [1827891, 55263, 16570, 29504, -5911, -6487, -1609, -2167], [-2025178, 238165, 18554, 6423, -671, 296, 7426, 2772], [869916, -107916, 10910, -70718, 15776, 420, -3286, -21002], [114342, -224426, 58436, 8353, 606, -2683, 4963, 1865], [1767598, 260978, 24574, -59708, -4110, 6518, -1380, 7612], [-1438942, 215938, 39388, 114819, -2978, -4702, -3538, 15154], [-836675, 181410, 33993, 65881, -11452, -2313, 622, -16326], [954562, 121890, -6638, -74546, -7274, 6052, 9134, 11846], [23654, 29020, -6460, 20740, -1244, 13384, 10604, 1916], [655401, -165487, -3291, 99393, 4089, -4029, 3512, 10616], [-785752, 280426, 55137, -92956, 13916, -37, -13806, -18282], [-834282, -80050, -31705, -112750, 7948, 5586, 10957, -13837], [-471288, -213554, -30397, 33415, 3220, -3053, -17412, -10788], [98734, -115042, 76051, -57504, -6124, -2564, -2921, 13337], [2903048, 245184, -32504, -127006, 1688, -3388, 10892, -1828], [-2739756, 83906, -28180, -67954, 518, 1589, 4991, 8993], [-2452566, -153401, -31479, -163716, -4031, 5603, -9134, -732], [-1534207, 467315, -41814, 116452, -9297, 10877, -143, 8225], [2113296, -281534, 68889, 6083, 3444, 9151, 14182, 14946], [-1028200, -459647, -63389, -173024, -5585, -15383, -2930, 25036], [1969174, 23684, -5819, -69408, -25358, 599, 29030, 274], [-28335, -583637, 8440, 114934, -8269, -2205, -16063, 14185], [-1184932, -391206, -18925, 191016, 1000, 7493, -2230, -14114], [-2680405, -217963, 46594, -113276, 1561, 13171, -4861, 1235], [1881978, 644398, -9635, -40136, -15328, 1170, 18523, -1419], [2268388, -490706, 24392, 152930, -12610, 1868, 11612, 42728], [-1555364, 117970, 13187, -71367, -6528, -8319, -4114, 314], [-3775526, -100674, -70434, 137993, 2250, -1931, -22339, -8681], [-4670906, -233798, -22816, -80266, -18770, -5616, -18420, -7676], [-1910382, 843416, -36496, -171794, -360, -6046, 5350, -5014], [889699, -703367, -63160, 17194, 24315, 7664, -8130, -32342], [-1132087, -485613, -41112, 186227, -4221, 12118, -11454, -9496], [-2661078, -656110, 29370, -33558, 13894, 17612, -2162, -23466], [2385683, -484493, -30582, -214848, -7507, -15041, 4777, 335], [3304564, 766848, -62876, 29232, 3624, 3978, -6254, -1394], [-6593605, -200114, -108149, 262735, 12548, -20079, -3618, 6218], [-208946, 821128, 109077, -128457, 13134, 17469, 2640, 9720], [-4970795, -502069, 118228, 12366, 2393, -17870, -21236, 11468], [-83185, -173007, 1576, -116541, 25201, -8560, 21248, 45166], [-1158910, -582242, -102943, 336998, 2400, -16448, 1585, 24903], [-1742148, -333831, 20244, -133865, -26631, 12872, 35356, 16634], [-495678, 425758, 112096, 54540, 8910, -13278, -31834, -22690], [2020373, 364195, 123512, -201493, -9229, 13718, 32514, 17928], [1157002, -1034146, 113702, 51153, 23726, -4028, 31294, 30866], [1544828, -366564, -211534, -169820, 26224, 6670, -18084, 32724], [2108330, -315031, -19828, 19571, -14151, -188, 36376, 30030], [-2260314, -42575, -151037, -15454, 21919, 16695, -21864, 18130], [8790156, 583416, 128786, -145520, -19852, -5838, 7232, 30688], [-8076925, -89485, 141283, -451587, -31005, -2295, 4268, 13028], [6936821, -673801, -175492, -385170, 10391, -4229, -65075, 965], [5972361, -53751, -3924, 28494, -24629, 33071, 17319, -1855], [-5607627, -1560987, -19583, 60293, 29813, 623, 1928, -18112], [8384142, -1299358, -76668, -28730, 15102, -3784, -16552, 29112], [-2968880, -511758, -111196, 328219, -11334, 10415, -3839, -6541], [2274761, 997931, 262318, -188066, 4639, 43915, 11471, -157], [146555, -406347, 50954, 301322, 44217, -3515, 20753, -13211], [-4299369, -70955, -262278, -206877, 26681, -27404, -10546, -35616], [3290000, -585730, -34209, 410526, 31692, 36465, 8690, 16166], [859374, -2065546, -98756, -355704, -9122, 2834, 3970, 9762], [-9686745, 226022, 30326, -363372, -30782, -28534, 10852, -14664], [-9854695, 713485, 41503, 363156, -30895, 9205, 9280, -12424], [-4616138, -1287832, 111452, -214472, -70992, -16576, 28892, -34524], [3697224, 1039234, -81952, -416690, 1294, -13421, 21741, -10029], [3733308, -393208, 263014, -317849, 65516, -16182, -5524, 94420], [-2745814, 64756, 217888, -785816, 16020, 8588, -25900, -65196], [100206, -1450898, 107110, 94376, 21238, -40740, -17378, -60406], [5248803, 1095311, 169506, -313129, -29, -41862, -20152, -8478], [-6030918, -933892, 36656, -715160, -73828, 1632, 4160, 1480], [7828928, -838472, 79192, 241568, -55792, 2360, -10328, 33616], [3137611, 15419, -12995, -457039, 11023, 9621, -57894, -40658], [-4409861, 1852107, 96588, 727445, -47381, 13764, 42056, 15546], [11042847, 661196, 160685, -512577, -70610, -241, 16930, -10902], [-1304356, 151186, 182839, -281219, -53416, 8109, -42058, -3278], [-16937696, -700842, -73644, 71288, 2738, 15929, 4747, 23749], [13164092, -138156, -86256, -368655, 32588, -51188, -98980, -65292], [-970382, -1366542, -163482, 325340, 1842, 3760, 22658, 26422], [3558884, 507404, -395277, 411438, -9274, -32126, -29371, -142941], [213051, -1607246, -83365, 278637, 22600, -40753, -8600, -14328], [-6607074, 839778, 78724, 344612, 27338, 15026, -5910, -22254], [-4818512, 1903854, -60636, -435370, 90630, -28964, 10040, 24460], [-11935716, -275170, -232883, -629118, -15984, 84699, -2826, 32850], [-8543600, -459824, 193928, -412674, -88544, 19130, 69990, 10058], [-3372488, -478450, -149446, 808138, -6354, -763, -419, 72083], [-1939681, 2046383, 434016, -251434, -29523, 27475, 4483, -125427], [-5689350, -1423468, -80062, 109004, -22840, 30380, 36038, 108938], [18706423, 801447, 105469, -45537, -72493, 28513, -9242, -35230], [2194018, 214218, -89601, -304138, 36416, 14426, 11589, 150603], [-10670000, 869456, -159956, -841915, 33576, 57595, -32979, -44821], [20117295, -1368130, 69802, -658536, -20598, -117882, -24412, 50336], [2156915, 3480319, -132752, -1035399, 38111, 24640, 11640, -10262], [9028676, -3936244, 15698, 133014, 14000, -3230, 5640, 1144], [8884724, -1581053, 116593, 113992, 154861, 53827, -67686, -79452], [19585710, -620842, 410405, 295204, 33984, 8948, 4161, -14297], [-6741604, 2545224, -311586, 710377, 58452, -95149, -25737, 3481], [-1141110, 407706, 20287, 421092, 46168, -10360, 43367, 183265], [16979868, -2420555, -205918, -444356, 54145, 11155, -72725, -92861], [5823415, 1531023, -404277, 714970, 26919, -997, -77054, 95774], [-5942802, -1609128, 120408, -592948, -3736, 48404, -41404, 52316], [-9424569, -2348963, -297302, 790188, 16867, -42304, 60752, 54520], [1933732, 1550367, -153416, -204321, 55063, 12146, 43342, -222468], [22821211, 2751487, 42691, -978235, 49383, -73109, 20602, 181638], [-5360863, -1057619, -15405, -15722, -9335, -19361, -55630, -33322], [7077527, -1364647, -78240, -402994, 69577, 64857, 53299, 62819], [-5364502, -1177424, 182436, 460030, 25528, 14758, 89462, 165482], [27045175, -2931487, -138615, -497865, -108695, 21560, 53235, -47875], [1398398, -497873, -120515, -820654, -64255, 60797, 38100, 35826], [4427501, 2000461, -87148, -382978, -37523, 39021, 26491, -101461], [5250, -669492, 114651, 493431, 91598, -89315, -115578, 30946], [10764745, -2812682, -74795, 1779149, -103752, 50383, -36518, -31458], [7288232, -3196352, 205774, 106652, 104348, 77894, -18288, -183240], [11668644, -792856, 218202, -337292, -41492, 8884, 85478, 32930], [16292938, -196904, -350687, -286647, 39206, -111977, -63110, 7214], [10115047, -1065129, -354378, 301242, -60319, 25333, 54639, -123527], [-18382400, 2451237, -197352, -1754353, -5171, 26724, -41244, -171494], [32183582, -732936, -4529, 1111143, 165434, -17663, -121746, -118070], [6479026, -1344512, -662634, 14630, -47812, -47494, 117652, 85348], [-1584619, 205956, 73467, 165927, 58930, 21779, 34060, -41448], [-21695118, -197084, -431764, -1796032, 2236, 56892, 40368, 78040], [297118, -236586, 386866, 609695, -94646, 57303, 15879, -150563], [-10487976, -2492818, -19917, -1224597, 159716, -68801, -66880, -158904], [1438688, -3923209, -235709, 618310, -124475, -90515, 50810, 85700], [3178564, 2096020, -385983, -841826, -212102, 15412, 164137, -127193], [-29532704, -1457944, -374952, -1625775, 75224, 11911, -125299, -45525], [-3579293, 2417860, 516958, -1442844, -27120, -59436, -48870, -26154], [24593138, -43214, -244887, -999166, 4012, -42858, 2003, -2379], [-10710771, -2183975, 113918, -1238565, 152253, -109116, -126246, 56916], [-2455114, 2219098, 443307, 216928, 119136, 53522, -209071, 4839], [12115212, -766030, 16319, -771167, 48040, 50137, -71006, 148198], [-24804551, 1875180, -804368, 712094, 60916, -29946, -187206, -122810], [-2278995, 689541, -342298, -932898, 50587, 46397, 23483, 42829], [-26977446, -4024738, 491268, -571455, 93574, -8431, -181689, -21259], [10726084, 1144509, 86950, -823063, -51055, -148114, -2000, 103942], [16776248, 4551656, 612657, -857521, 143798, -99922, -56017, 74993], [-6531568, 5684460, 235192, -669507, -56444, -173158, 15614, 222706], [22552914, -4295630, -482262, 781046, -26318, 48522, 23548, 231188], [-2052041, -6272431, -305982, 338938, 61925, 24321, 165965, 251233], [41767157, -304655, 369361, -381555, -236071, 66757, -39646, -267930], [30814695, -2988538, 274164, 3107824, -26170, -111942, 15530, 108274], [26715773, -1708541, 635099, -2057091, -163213, -6392, -40767, -166985], [17691177, -2532203, 9796, 1435458, 169885, 122717, 12691, -81525], [-11295196, -4191021, 1102700, -1736893, 102259, -3078, -27014, 194456], [35032692, 213952, 494806, -55182, -121940, 77828, 21410, 19318], [-49850329, 1138046, -435764, 1247570, -177442, -131080, 38892, 140928], [14691229, -860497, 764073, 690043, 88347, -18166, 85237, -380029], [-56477722, 3128354, 149630, -582499, 99386, 167168, -162798, -204114], [-5249024, -1765855, 404812, 1840949, -179647, -127318, 6042, 211932], [-6445186, 5150118, 478076, 2327112, -146690, -12526, 4226, -183086], [-15004066, -1879238, -40894, -2194692, -42358, -41528, 73278, 177490], [-14289143, 1944733, -1108075, 110311, -255195, -18703, 8850, -17786], [-7875562, 2122802, -434915, 2483986, 146716, -59018, -278641, 285137], [-13889141, -3942143, 323298, -1059139, -119931, -92366, 172816, 184326], [1716865, 160845, 393713, -599684, -32027, -117029, -96188, -263396], [833782, 1531570, 968720, 2615170, -91010, 151150, 44510, -322390], [28808713, -8856936, -373093, 802281, -253570, -7739, 114970, 75866], [42498784, -80740, 378568, 803471, 197012, -161866, -147838, 208046], [40921572, 5054406, -295114, 324726, -75698, -109393, 109255, 278505], [-6798692, -1105113, 572783, 3560277, -33907, -48134, 128717, 44505], [-21119171, -1316981, 526178, -1973045, 59727, 21794, -100768, -251934], [23915813, -2932091, -322097, -322442, 162305, -31059, -262800, 282608], [441390, -3101506, -3162, 2639468, 15174, 231832, 175746, 98342], [-58837950, -728096, -383321, 623533, 162962, 21135, -100912, -261656], [47857169, -9896019, -117818, 1714502, 99851, 165893, -54101, 2773], [-36214236, -2879446, 668645, 1388215, 251300, -100401, 48450, -258202], [2541766, 4263021, 691489, -903344, -11209, -19263, 213204, 463142], [33906114, 3934038, 684548, 2419392, 29902, -56986, -91418, -8514], [-14517926, -2299154, -1184748, 1623112, 297122, 24288, 40408, 50904], [1382567, 6977641, -76676, -1107188, -301837, -17778, 179020, 139308], [16051313, -3639715, -1238829, -2483178, -26487, -164733, -319298, -32870], [-2202780, -594124, 1007482, -2384578, 80648, 157802, -172328, -45800], [10644719, 1646945, -889743, -1700649, -102247, 36424, -35157, -115115], [23926650, -3682618, 297870, 2718848, -420206, 113790, 238488, 136180], [62909113, 5713648, 375082, -173472, 91332, 67620, -228682, 19250], [23457987, -1465739, -26970, -2797362, 21731, 22882, 37442, -130986], [32549281, -4872684, -489039, 3067435, 81398, -99309, -180358, 343018], [24943596, -4954098, 1587598, -1510659, -117126, 43881, 20601, -262485], [35043309, -5581655, 590969, 2645688, 411873, 203511, -164928, -236904], [-16290026, 5015427, 431203, 45102, -114975, -47247, 214390, -25088], [19257234, 9676886, -354378, 1380873, -126890, 89744, 253442, -129410], [-52996975, 2345939, 129120, -149086, -216549, -198605, 177577, -236415], [-5993592, -283620, -300564, 4111703, 51428, -10627, -30573, 94557], [7654661, 4526165, 1727573, -2579415, -119691, 31371, -118104, 107400], [-41884826, 2971700, -566911, -3339284, 150746, -87021, -141674, -374238], [-75052626, 6920, -810768, -1108836, 65176, 187148, -8956, 192220], [963892, -4631126, -1858226, -235295, -41370, 281237, 197709, 36943], [-58888058, 2202086, 50610, 1106232, -147206, 268322, 114888, -352396], [62489769, 483165, -231652, -1649894, 72487, 9859, -153157, -455347], [6650064, 1317626, 831088, 1313044, -148582, 292386, -162778, 309622], [-16857905, -290007, -1224742, 18910, 314973, -85051, -491263, -39027], [32747508, 2755868, -980838, 606463, 253568, 125748, 12838, 172458], [-58472079, -5688399, -2011870, 3196650, 295325, 48721, 85445, -156063], [20140784, -5584521, -1185369, -1854636, 120813, -3777, 365972, -8278], [39598314, 9364764, 185247, 2342675, 176982, -23891, 73706, 83230], [-51560052, 12794616, 1859490, 799655, 40940, -168007, -32115, 213891], [372102, 3911490, -192404, -509028, -66122, -200794, 44322, 416390], [25324642, 13108872, 524132, -2229874, -194048, 142182, -138554, 6746], [-1434039, -4883513, 867345, 3253449, 159347, -92624, -208641, 217897], [51424240, -13173606, -2377625, -825549, 140480, 214855, 193300, 141620], [-52051674, 6354553, 76927, -1759702, -430129, -118753, -3236, -599426], [19586429, 8608032, -34995, -2952929, -305958, -21589, 154878, 344638], [-12766445, 2927179, -2767967, 4747838, 278511, -216485, -276616, 80584], [48020735, -10250303, -770416, -604654, -101733, -91310, -45212, 89004], [-10653328, -14212468, 1256318, -279618, 251208, 171150, -103128, 168360], [-85378783, -7899357, -209509, -926861, -94341, -54718, 245479, 568985], [-7661564, -6876393, 290119, -1999746, -44931, 459069, 282126, 471648], [23108376, 16501460, 1752808, -303167, 435164, 96966, -398334, -270850], [-14104978, 13769238, -147934, 2259446, -350778, -82820, 294538, 275118], [-79859898, 7772854, 566102, 4087233, 229186, 147977, 299169, -113389], [-29277147, 1232521, 1718814, 4679834, -165179, -201327, -195719, -126235], [-45596580, 7269320, -1284303, 2674124, -177258, 191962, -459197, -616419], [40422899, -13729607, 143694, -430938, -80779, -245579, 135909, 417433], [-35442638, 4887109, 1354390, 1773417, 358857, 168414, 91568, 325814], [-89812640, -382274, 2287689, 1005110, 190856, 101645, 92296, 874624], [18821436, 7318126, 2134960, -2085185, -103522, 287451, 241361, -146213], [-77037893, -9282845, 917564, 831618, 523593, 67497, -194383, -507289], [34469385, -352319, -384928, 4078287, -44247, -225420, -250612, -131878], [69455392, 10839659, 1189238, -4385067, -146641, 156436, 392866, 219272], [30704756, -2890540, 1892305, 327850, -477230, 261550, 390015, 547545], [77889904, 1854500, 1336584, -1338175, 101700, 240439, 109949, 656467], [50967813, -4409723, 2299080, -3640464, 44495, -262991, -201175, 487191], [-24947380, -13794558, -2630173, 617493, -131168, 330725, 356106, -323218], [27437550, 580460, -1563058, 1768589, -275752, -225745, 35403, -685923], [49738703, -4783809, 1450814, 2426313, -249853, -238412, 309978, 341320], [-111678788, 7581536, 606294, -1036054, -185588, 118368, 308678, -446382], [25093950, 1396802, 1798302, -3126731, -711382, 183240, 762458, 163942], [22738406, -10062010, -781035, 3087010, -183648, -114922, 588423, 718417], [44775278, -3023696, -358318, -3368093, -498380, -133187, 293497, 254743], [-54158306, -3238328, -1289429, -2236373, -682846, 81489, -56006, 31134], [-33624106, 12531827, 250685, -2881944, -28939, 4747, -355106, -26128], [-138873858, 12581034, 2792197, -1027184, 38868, -109288, -132003, -201341], [-4788913, -5724855, 1635664, 2103493, 680705, 35322, -330466, -681512], [-61970911, -5795075, 1065175, -844343, -5503, 552669, 172704, -100552], [-6120572, -11461386, 28196, -5880476, -326242, 103014, -49658, -255858], [11617664, -10252999, -147056, -5029874, -295775, 20569, -146725, 258851], [48042624, -7142864, 693964, -1556137, -454248, -150896, -216052, -1006988], [-104004999, 5380973, 1553109, -2831935, 144941, 363521, 73226, 751046], [12281779, 13065376, 1643650, -908982, -161700, -533502, -42960, 634848], [-32929365, 13527783, -2076892, 5046100, -45619, 85401, -52231, -205049], [15744660, -9348236, 409029, 3413880, 227714, 300052, -221539, -283101], [68478008, -8061634, -10702, 399574, -76238, -329792, -50718, 635514], [-15574240, -5404423, 896473, -7209083, 327715, -64772, -179875, 199277], [-59322146, -21474798, 1098147, 374500, 586552, -35384, -145157, 269917], [23642736, -11347798, 1937832, 2037019, -137014, -91629, -64991, 1197939], [-39003936, -10255103, 1255238, -2555083, -127259, 43302, -348776, -945322], [-87007857, -15928883, 1223584, 2505094, 186039, 632288, -99058, -435270], [4814638, 1358832, -1327734, 4536189, 137268, 387003, -207493, -730123], [-22307015, -7749274, 2929517, -2687903, -588928, -345453, -162922, 388714], [-311609, 4647095, -1880733, -2388906, 52903, -115519, -557548, -284588], [131063094, -1336068, 445571, 6722960, 142190, 177119, -323244, -261036], [-44985988, -12476198, -1788827, -111453, -33596, -143533, 203486, 700762], [-90197528, -7634756, 2581764, 43569, -49356, -197313, -3343, -1265857], [62602572, 16517638, 1087412, 5953368, 422558, -150206, -407558, -149014], [97436842, 9864994, 4733902, -8622228, 197342, -349478, -170564, 825896], [127733904, 3977216, 3696543, 1418074, 222218, 7326, 76557, -778213], [-60183990, 4135166, -395504, 4968687, -981302, -289720, 590092, -375324], [124785519, 2253791, 1840334, 5641316, -585815, 107679, 366165, 586531], [-65353190, 20089700, -137847, 5179488, -184870, -680615, -213392, 923768], [116694260, 12504222, 2722176, -2618812, 422558, 440390, 155042, -1007854], [57380232, -19407862, 542530, 5635020, 612622, -342478, 220264, 54204], [-70017145, 493880, -250873, -3645941, 114534, -14389, 374936, -694692], [23641515, 7407541, 922741, 2420483, -13187, 155460, -260293, 720261], [88890610, 5065518, 54758, 2714122, -444246, -28900, 4666, -1598542], [-138216238, -6408894, -2611848, 603022, 27090, -162328, 500032, 429116], [35222226, -2160019, -5497532, -508281, -241395, -3876, 14520, 137574], [103452500, -8036632, 366201, 6080686, -266378, -162530, -305177, -1222007], [60528698, -23430752, 562838, 9894654, -953108, 4718, -21568, 112744], [53633894, 13224386, 78027, -106668, 462352, 76262, 142613, -179381], [-69229372, -5849639, 3962158, 6048749, 215181, -11042, -63256, 249910], [-27927066, 18441704, 356155, -1539238, 26130, -183551, -505750, -928322], [38008560, 3519140, 663793, 5082936, -168150, -164310, -58725, 465861], [11953379, -11852193, 2720252, 5993500, -237369, 651389, 16939, -766705], [-19638535, -6532231, 3642002, -4897974, 510015, -495549, -28255, 862391], [125867514, -6774888, -1385908, -1534409, 20032, 489529, 459351, 624705], [57791172, -7294381, -5794396, 2729765, -375597, -372152, 484572, -65242], [-49823095, 6611557, 1359463, 5194997, 523049, -584035, -672944, 417928], [234031736, -16793201, 985101, -3850996, 643521, 114979, 326214, 535520], [-39467830, -4893626, -1193594, -9598840, 602946, 186070, 88408, 865236], [30492294, -12931150, -946127, -1284854, -1133428, 163434, 171143, -202367], [-103345424, 18421388, 334994, 5051172, -480568, 136390, 590188, -93556], [181924050, 30448, -940454, 4662583, 849428, 134085, -923143, 373351], [-179728404, -3276222, -3567882, 1568004, -210734, -655579, -346655, -200865], [193325571, -13504369, -901912, 753687, 633903, 386706, -329146, 1030460], [-143378074, -2185692, -1896960, -935486, 350148, -247366, -541538, 459962], [-110445752, -11693516, 3397571, 584267, 573734, 118628, -804701, 194077], [-792363, -23661439, 1901782, -3278648, -33745, 206403, 245045, -319133], [25335264, -7712652, 728398, 1446321, -616192, -161366, -80196, 190756], [188256860, -2826658, -640696, -4103461, -578050, -210925, 58529, -351541], [-52503169, 9746809, 4490152, -5342109, 684457, -266644, -117964, 588634], [55180463, -1067159, -3685215, -3804217, 510345, 162868, 246615, 602321], [231136555, 8619422, 1605911, -7575757, -944444, -59763, -578266, -273366], [-38661213, 26552903, 1963221, 2956356, -305933, -256855, 579238, 922818], [2698751, 10877919, 1967225, 7198992, 734795, 96127, 491620, -256948], [-64656076, 2589772, 1536485, -7871421, -506102, -188986, -167389, -1846307], [55355982, 8760244, -1756844, -2741506, 273132, 190894, 7278, 150746], [118905266, -13098122, 627670, 6787404, -449602, 442534, 202492, 824972], [173447584, 8090314, -5577298, 4089045, -544874, 101069, 462629, -247385], [-98599533, -12297721, -4159843, 4456536, -887837, -540823, -31298, 472554], [-66857638, 23197966, -1494290, 7884258, 199606, -29662, 234104, 1185904], [-116957750, -26602732, -531898, 1333295, 140416, 507705, -677951, -1462633], [-28934114, -22334916, -1119740, -5485808, 968100, -614908, -1100320, 482952], [-54881012, -3476704, 4197554, 3413641, -1120492, -305577, 707735, -309575], [27596416, -14399313, -4292817, 2874292, -1189915, -510297, 663220, 489402], [131414808, 14043698, 2680208, -6581543, 713826, 218513, -588525, -12671], [289491415, -13321365, 2366451, -7185607, -69213, -708365, 311410, 234726], [-60453084, 22030700, 1358678, 2034304, -344680, -60924, 106178, 738910], [-6016709, 31686191, 2957301, -835160, 613443, 530231, -286248, -626312], [108407847, 3764299, -217885, -2562803, 1091955, 9947, 75690, -732866], [3891792, 9469200, -773296, 6741078, 277552, -251632, -841872, 144560], [27574729, 14699397, 694850, -6212868, 308209, 59939, -68597, -493917], [171793200, 17067472, -3038238, 6418551, 617644, -182020, -134370, -628078], [110283932, -21717372, -1112519, 1655999, -532646, 547962, -691261, -2248275], [132045734, -4236312, -2760592, -763580, 210760, 16852, -102980, 778180], [77885562, -17326138, -1322760, -1167652, -589738, 337322, 605414, -877186], [103159726, 28129146, 5732775, -3720392, 168872, 156408, -235217, 319305], [26705524, -8139342, -1676149, 6723953, 275808, 721129, -127938, -2152006], [-303554626, 21557258, 1168284, 9851782, -355458, -374410, -131102, 1148054], [196172608, -14121728, -786694, -2258221, 150308, 2633, 344517, -33093], [46160332, 13800464, -2847683, 15189836, 469118, -590788, 70877, -571621], [11597613, -11997178, -5527030, -607904, 571530, 231998, 43140, -467624], [178254921, 598233, -4249780, 10559594, 440947, 255345, -4347, 1875691], [58277338, 14222261, -2515794, 14420175, 284041, 247208, -1237626, -323344], [-62183644, 8379167, 6862774, -898041, -26413, -207458, 80608, 52466], [-197446056, 18852402, 978258, -2052094, 1257542, -118276, -261898, -545314], [-165482635, -9505693, -1878010, -14231008, -813475, -23050, 850850, 168230], [45740226, 2636614, 3292776, -5041622, -468602, -481544, 241312, 254788], [181988772, -12725525, -97766, 474893, -34409, 296148, -29546, -2255116], [-14010678, 6861662, -7234243, 5954950, 529760, -4512, 70005, 1297355], [168980999, 6406527, -2322568, -86334, -1124513, 145619, -51239, 404865], [-39673084, 31763261, 6115270, -2315502, -41935, 322429, -379395, -637967], [-148834180, 12360304, -2808192, 4171171, -152576, 320470, -230574, -1542162], [-5236607, 3928793, -13, 2715468, 430373, -18575, 753832, 964136], [-138098260, 8672248, 553184, -4499397, 306184, 618365, 308727, -1049551], [166200414, 27911980, -843512, -13333884, 693724, 422744, 205216, -525624], [-38197090, 20763324, -1559971, 7495001, -1268246, -143985, -103498, -1021086], [147411323, 6470659, 2796978, -7539952, 287661, 422065, -389961, 1405649], [15562960, -18071534, 822040, 2878936, 54674, -141690, 353658, -1624030], [-162688260, 12437610, -764060, -8043210, -472286, 1109576, 902236, 867024], [-346624158, 51877046, 5467198, -8772956, 171846, -386488, 725874, 720670], [111628099, -11494475, -3630569, -3785013, 206817, -38976, -686895, 1366359], [-178807362, 19681880, 2413144, -8039296, -287992, 738908, 633980, -2979820], [-319098361, 3552799, -3353185, 2267015, 244887, 350689, -557216, -831192], [122351258, 36232099, -1191468, 9873901, 512579, -761832, -1440324, 72230], [310899435, 313411, 1285956, -9096132, 802843, -136435, -841213, 1077391], [-162841732, 43689054, 4984994, -5638880, -250594, 177603, 720111, -428335], [119964638, -42896442, 1600615, 585224, -821244, -947744, -103961, -1962135], [-28590656, -32086766, -602158, 5096180, -641866, 803954, -592360, -1698340], [3575071, -19282151, -677666, 9380680, -252899, -842009, -29469, 842451], [-62416688, 40491054, 3560693, -12995663, -598688, 683557, -698868, -760548], [-145608929, 6219584, 1072361, 15030759, -1547854, -245645, 310594, 2249690], [-113265547, 9039885, -4087772, -11133914, 66375, 462845, -231775, -520809], [411092168, -6288336, -3605268, -567084, -877936, -359474, 139086, -103910]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_245_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_245_6_a_k();".
// 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_245_6_a_k(:prec:=8)
    chi := MakeCharacter_245_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_245_6_a_k();".
// 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_245_6_a_k( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_245_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<2,R![1012704, 463952, -317696, -25016, 15166, 537, -225, -3, 1]>,<3,R![2571136884, -76563792, -109744365, -2145922, 752739, 5436, -1579, -2, 1]>],Snew);
    return Vf;
end function;