
// Make newform 57.10.a.b in Magma, downloaded from the LMFDB on 27 December 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_57_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_57_10_a_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_57_10_a_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [-725760, 4023504, 626016, 264, -1860, -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], [22805376, 6429864, 42820, -25530, -47, 15], [-620, -4, 1, 0, 0, 0], [10203264, 41842216, 1524772, -152506, -1159, 87], [-18109856, -988696, 119564, -594, -77, 1]];
    Rf_basisdens := [1, 1, 70912, 1, 70912, 8864];
    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_57_a();"
function MakeCharacter_57_a()
    N := 57;
    order := 1;
    char_gens := [20, 40];
    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_57_a_Hecke( : Kf := Kf)
    return MakeCharacter_57_a();
end function;


function ExtendMultiplicatively(weight, aps, character)
    prec := NextPrime(NthPrime(#aps)) - 1; // we will able to figure out a_0 ... a_prec
    primes := PrimesUpTo(prec);
    prime_powers := primes;
    assert #primes eq #aps;
    log_prec := Floor(Log(prec)/Log(2)); // prec < 2^(log_prec+1)
    F := Universe(aps);
    FXY<X, Y> := PolynomialRing(F, 2);
    // 1/(1 - a_p T + p^(weight - 1) * char(p) T^2) = 1 + a_p T + a_{p^2} T^2 + ...
    R<T> := PowerSeriesRing(FXY : Precision := log_prec + 1);
    recursion := Coefficients(1/(1 - X*T + Y*T^2));
    coeffs := [F!0: i in [1..prec]];
    coeffs[1] := 1; //a_1
    for i := 1 to #primes do
        p := primes[i];
        coeffs[p] := aps[i];
        b := p^(weight - 1) * F!character(p);
        r := 2;
        p_power := p * p;
        //deals with powers of p
        while p_power le prec do
            Append(~prime_powers, p_power);
            coeffs[p_power] := Evaluate(recursion[r + 1], [aps[i], b]);
            p_power *:= p;
            r +:= 1;
        end while;    
    end for;
    Sort(~prime_powers);
    for pp in prime_powers do
        for k := 1 to Floor(prec/pp) do
            if GCD(k, pp) eq 1 then
                coeffs[pp*k] := coeffs[pp]*coeffs[k];
            end if;
        end for;
    end for;
    return coeffs;
end function;


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 10;
    raw_aps := [[6, -1, 0, 0, 0, 0], [-81, 0, 0, 0, 0, 0], [179, 29, 0, 0, 1, -1], [1285, 67, -11, 7, -3, 0], [-9383, 231, 115, -11, 11, 14], [15810, -1414, 91, 77, 66, 15], [-2725, -4453, -651, 3, -131, 140], [130321, 0, 0, 0, 0, 0], [943934, -18632, 1299, -411, -566, -475], [2203928, -8054, -2032, 3836, -128, 814], [2694944, -41658, -6445, -5499, 2988, -2481], [1160510, 183750, 23717, -3873, -6036, 1353], [5002716, 276230, 31984, 280, -2514, -8174], [-2897255, 332515, -2053, -13931, 19221, 5310], [17197089, -33671, -14304, 6444, 24831, -24261], [-4335674, 1708252, -58016, -22952, 4352, 23564], [47996082, 1599710, -145976, -40808, -39384, 20782], [-22067407, 266949, 86259, -91359, -2679, 89268], [29477474, -3264858, 338922, -63462, 38316, 14448], [-18264086, -582634, -271280, 115084, 110624, -622], [7570191, -4431037, 133219, -37147, -63909, -140766], [-129268992, 4907450, -102905, -297403, 111150, -107097], [53268736, 7806852, -142904, 82756, -175756, 17072], [18292726, 11544244, -35992, -42772, -276844, 281688], [123224552, -7061562, -1167782, 862746, 281052, -249408], [539517808, 4213744, -1371021, 1366029, 77342, -187451], [371106936, 30710282, 1112253, -1433725, -133212, 163593], [348253618, 26922366, 1496158, -592442, 113630, 398672], [151148608, 36541552, -1249557, 436069, -973584, 541977], [1022355832, 11208738, 240762, -2018142, 593756, 78172], [928159642, 68949916, -1386669, -468143, -1834980, -127647], [1752358671, -23112211, 2674919, -816799, -1669599, 1748204], [3078912723, -115080677, 2875877, -22909, -427443, 1192796], [2227554757, 36542491, 2015603, 6468361, 2702265, 38538], [3303736713, 23141099, -5334612, -8045940, -1114389, 1131741], [209569188, -41021986, 210499, 6091289, 4165038, -5411217], [-117602502, 27517952, 2470246, -3307630, -1713228, -3049566], [2880109312, 115487752, 15581800, -434900, 5245620, 1645236], [7054836472, 132189988, -4372740, -4329024, 4278926, 1935760], [1918642942, -154222192, 9645738, 10398102, 4510424, 487606], [-2494095472, -397709892, -15505798, 6174290, -7671014, -6053222], [-2610169816, -396776184, -7168907, 7101807, -6707142, -1116345], [4281116575, -56359161, -3267932, 10079752, 1601345, -5736679], [959989582, -13476008, -13560196, -16961528, 883338, -4958748], [-9801241912, 219669228, 10498393, -18602537, 12029326, 9537651], [705960745, -270551945, 25514837, 3625135, -5416515, 17483244], [7345624910, -9665778, 2078784, 5088228, -11711916, -9850230], [25467351630, 1014717920, -43756727, 1605575, -16068270, 25381695], [12259520052, 125760528, 30842022, 38325270, -3859674, 15757002], [-4983502797, 948812243, 74490633, -16105789, 1781331, 6281376], [-5834120555, -450065179, 2839317, 21496131, -10353637, -344462], [-10007475669, -87323409, -94392854, 44234098, -3561447, -22012445], [16838553568, 1163110870, 18117332, 13425076, 13833558, -2818794], [31862619455, 475608565, -74710013, -52629659, -19297415, 49581720], [-20300729532, 705723694, -19446206, 32696026, -20634270, -21064412], [1640820449, 568395857, 164020720, -4958012, 1497295, 16604667], [13784737470, -3331277224, 49581546, -34649154, -7199556, 1081710], [-33641342880, -550696888, 13802510, -162965986, -38596848, 894102], [-51241922001, 2350021655, 89729005, -5939473, -76158345, 32063976], [11667821562, -590345096, -76631174, -164928506, 33788976, -15526322], [23457104949, 38411459, 132521735, -11082739, 23876913, 36801558], [-33113521736, -322374018, 135592132, -146632604, 41536454, -32963050], [30014384598, 1308351338, -121607878, 151048274, -69481632, 8546676], [12927568473, -2522451591, 44500932, 116876784, -56563485, -2987097], [4025017850, 333816288, -351281846, 226240938, 112672392, -153734742], [-53793843838, 7343614684, -137266640, 104415484, -166474910, 52171380], [-175692470078, -685186682, -85312934, 9334090, -126130152, -504744], [-49464993472, 9289245138, 170067372, -221064, 51884220, -142869534], [-27100483249, -3343337839, -487024803, -55626549, 114203365, 5875226], [-129342582969, -4150510117, 341164119, -22149115, 44106927, 72982074], [63247663982, 1419003900, 308928512, -238297960, 91936060, 47558428], [213667268947, -5638357237, -563538064, -237992932, -60918571, 41579769], [25392433892, -1088701092, -288746514, 203107422, 33434412, -179943870], [78233742042, -11368571782, -290977979, 24922919, 15470124, 146150517], [-76330476754, -16082443302, 447226532, -316882236, 157358214, -111992166], [272547566926, -4477036990, 923025686, -88085110, -259960342, 207382104], [-32256900801, -644125607, 159703636, -410667980, 12369297, 78414463], [80706873751, -12299303813, 270089027, -881289359, -192080193, 166950342], [120048229514, -4569475072, -272517104, -34968212, -268367066, -68467632], [-34506958814, -1807793444, 437190522, 645889390, -134726676, -69441510], [47835624140, 7581038556, -326994038, 400017058, -290973752, 117436710], [-259141569064, 4446001788, -880761185, -98773371, 516019806, -125158431], [337182187116, 4393403728, -669409008, 695710908, 655405314, -641850912], [97892306932, -1123148150, 517049954, -506820014, 111006756, -350435028], [-12452164546, 7059953472, 678079959, -234149163, 125331840, 380983425], [248702102231, 36460151641, 410153713, -343154033, 151927033, -160200450], [-113429979180, 3672412230, -11234722, -742696258, 747896094, -122143432], [-548414285487, 23156799881, -15882801, 666280733, 364596285, -202849284], [294444851641, -8110461205, 474459120, 716887704, -13621357, -35950295], [89334350127, -28166386543, 64273371, 646036073, -261262665, -149811780], [184531927487, 6564966333, 544217731, -78243419, 112441885, -656403336], [-272250180190, -21138339068, -1176442573, 967564109, 295328398, 6510721], [-398080691580, -13284197170, -772440269, 609230753, -36971082, 520566327], [-384803794028, 15696561824, 2487498072, -284176932, 38663336, 503012860], [437106789267, -30037513279, -279058715, -859895461, -126306489, 71436510], [-311669835562, -13137207236, -121119519, -1788432177, -89729462, 532341467], [-289973393652, -2999396198, 1944686062, -2381704154, 15325836, -326764040], [1474661901426, 3229758216, 1260590606, 1126167314, -59111910, -98514394], [845445904566, -3339592678, -1835601296, 1574253152, -1248781686, 1060864254], [477424840605, -16193239603, -1883179367, 1665022763, 160975593, 236235054], [1630222471920, 11895623528, 618923188, -22396744, 1989000990, -642795204], [-705704763783, 46695794971, 3523719124, 803697148, -705374697, -250587707], [1623658306212, -21561139284, 3070602648, 891718740, 49669128, -813739608], [361728563064, 836061306, -479454328, 4386481256, 133830060, 915973082], [-7583876124, -5732840488, -5930658768, 1704074120, 557532588, -1336227192], [-665819409855, -1683281719, 1301283355, -249258847, 1090223517, -715447056], [548460308235, 71331016949, -4340767239, -745663113, -505259619, 1124176362], [-1054063538602, -42205275980, 1453258420, -588614540, 1293551992, 130231512], [677362517698, -73523220854, -2153608022, -2395770494, 2073135368, -817934428], [-351052753634, -25052233340, 2303826262, -1946196098, -1281217158, 716672814], [964934105202, -32747080696, -384783603, -956675689, -1603377684, 195025419], [-538481163249, -99380085925, -4177118953, 2796519653, 2370783735, 174205674], [188153872231, -4669283141, -2813549745, 3021060705, -2822566459, -460480526], [1392273867572, -39236993016, 760154144, 354012384, -1206474720, 2018062920], [-732468089011, 16121263551, 7266964971, -434638023, -1135965699, 1262345622], [1776460041756, 15121852838, -171046760, -983052848, -1181024424, -1332338426], [1521475259825, -46631697369, -1625995209, -5371674291, 656618685, 572726610], [63666654035, -138468341181, 4267632932, 1267850864, 60389065, 2156900413], [-4023422637203, -79971903393, -2568197540, 795818068, 834908795, -2660851783], [1174241466410, 14412964474, 3503699334, 4139174730, -1956878222, -207484144], [-544485980910, 83734759058, -8150164327, -60576757, -972456576, 1600951833], [431473971982, -5535423752, -13496371664, -3585248612, -1566741186, -1109870784], [-1463002602004, 96210915342, -6742873568, 5288841796, 1868015476, -3448041390], [3606967208972, -119332552200, 2610786638, -916894306, 322590094, 2091334714], [-3230891227917, 193956974417, -2687686763, 2073712307, -3893765565, 1062396558], [-514739627324, 34607798636, 4340962359, 2963691345, 431955230, 1815877477], [-6481894479662, 33005916004, 1824289160, -1533430352, -2066750520, 302617572], [3098661655403, -178125654865, 7348408390, 4880900278, -4357105067, 1566425631], [4375084854091, 89308840729, -8917811275, 4455880543, -4110248541, 251899098], [-6001302016578, 54582564884, 9889131646, 3335753690, -3960117264, 4125259638], [178324402333, 43813685371, -12898116157, -2279967191, 1526624745, -2405168022], [259294125742, -50318720314, -3061933722, -3397374138, -1968277912, 3155022100], [3759929597566, 221180260900, -3037781413, -8146647323, 3499318962, 356507049], [-3952076641863, -144870004207, 5373198937, -2614188085, -1883931555, 4717485594], [-5226788458409, -97037448441, 8047837169, -3904000105, -1158983587, -2499308772], [-6762455169147, -185511800971, 7294213681, 5230281983, -1563642063, -1383061950], [-3627947728290, -91157216216, -815210868, -13249416864, -2794049886, 1822021380], [2794783534140, -28529537464, 5812621068, 7697357276, -1771182900, -4812514356], [6185516924954, -51371931324, 3327930164, -2239982464, 2001814762, -22249616], [-5800193670759, -77147975523, -5533100473, -2229832975, 3410793087, 5369978312], [-2094465883836, -279359675356, 16770336332, -18672425680, 3269620794, -1068595800], [2254398099049, 201479770471, -6735032074, 7335739514, -7805840929, -1028392521], [-93041979703, -176898626037, 15493939903, 10353063549, -9929507727, 1426213710], [1941560722934, -178339847186, 17599836184, -6154249076, -778232060, 2243385138], [-12534334944366, 107976750302, 4842197391, 2792957957, -2685510492, 587323695], [-1620868466322, 13570787750, -633839848, 1057997360, 7100918358, -6526214878], [4621611937686, 266108812136, 12084293140, -18828809284, -5277545196, 10833043020], [-5874633404686, -337467590536, -17765969702, 8416498030, -231735506, -5108571606], [-7330747303931, 585610872247, -18285224629, 7078793221, 1788178689, 3573182058], [2187518930716, -157259785200, 29079369886, -3722871998, 8693253968, -2312278582], [7266474962120, -8434721172, -4466355201, 20037298821, -4601432490, -6673740015], [-6072475060021, -316204672449, 1891823867, 15656343989, -1353893387, -4082442950], [-8194801758855, -235834475533, -28099590569, 11256040145, -3070781871, 1156777506], [-5245761007146, -358644883154, 18703559530, 10948946482, 6993927492, 6574409392], [18067673158182, -719357548270, 31658794784, -17221288888, -994273110, 1754472942], [-2602981633606, 279380598810, 2421739008, -7157865264, -4602675110, 12815181470], [-4872277053484, -420547661400, 16372176008, 5815711020, 7915426224, -13285381764], [4070741321706, 234049069508, -16179002526, 13317000966, 1616710800, 8287443810], [8883892854267, -109593635545, -34734532217, -28296023935, -3537079197, 2963158386], [-3676255969530, -211494707816, 2831782098, -22116046770, -11130151236, 23238592302], [-3520426700044, 9806369384, 19751574216, 19667032620, 3804800476, 5169484364], [11697704143850, 459135944192, 17087228028, 10535328840, 21868189642, -503517964], [11117792493856, 339512628256, 7746654794, -8461437422, -11373755484, 9221925498], [141963761084, 488648783768, 39111032092, 14297458156, 2407534936, -12801730668], [-3088441052698, -700149255276, -11477330790, 5948380614, 2062807180, 3382800530], [15664461719132, -456465169684, -34199960216, -38583429680, 22729421260, -4342473180], [1260543685426, 580771668580, -17411989315, 11498505571, 22051759590, 9174220551], [-1304647695581, -455501586521, -61621772365, -7204834919, -11564979801, 7312189098], [21228892920434, -344594237004, 50233971664, -375896772, -13234294182, -4084542300], [3323943244145, 137986152451, -35654159900, -17851930556, -12644340029, -14552841411], [-11200742681720, -566126005500, 23358835488, 5820410040, -16598675200, -114019988], [11675892893820, -432791206492, 46551081505, -17775958285, -14514398418, 22481316495], [1636115635926, -57084860116, -99008531139, 26508882483, 618808554, 3358413615], [1226196988170, -125208113632, -16800345582, 13305777410, 789211920, 26518220178], [-19405527011858, -682179724748, 21883829417, 27721988467, 83528568, -2338740021], [-11875878838723, -730741903787, 18545477245, 53180055475, 9843126535, 14508993210], [14025396292092, -248280558892, 42483446944, 50622754028, 3263471088, 17275319496], [-12263302922999, 839881235051, -7511215068, -19804121292, 5487132875, -26490495755], [11579817509862, -326464614016, -93617896551, 27157425935, -19134128022, 9974263671], [4835637424933, 160452289225, 68070420347, -52626973751, 22301863197, 2843418024], [6264068877411, 22553831069, 24436185611, 13206978641, -11812237245, -17601524136], [-24011297855804, 111353558076, 11456522866, -25012577162, -25837859002, 33324692030], [-18257419938560, 1058464145296, -81543200515, -19120385753, 1486816074, -17986903977], [40021798097350, 831130578524, 73420093296, -42586665300, -7128407302, 5752827268], [-27470072220665, 350214060267, 15699737054, -22406376562, -15344799703, -15645862485], [-6931434708867, -1143964002849, 41148801256, -12637399208, 8642046387, -6497886131], [-10688782402592, -1895626401536, -25685833527, -12911972789, -16909870326, 29250259467], [15801014803910, -1577944286994, -51579374040, -44928453276, 387934236, 5951493642], [1109918060756, -1287696439182, -75032023602, 8441432790, 25416196908, -29747746536], [-889139035934, 830809955676, 4331934539, 22660255685, 7819212734, 20999474529], [-485675563108, -72532977714, -38565424356, -6301001352, 13255909548, 22401436446], [16138215848061, -280080041825, -74212018903, -48873558601, 24892711671, -10062589000], [27649048356694, -164763191270, -7053693416, 39785664616, -30251288718, -25326011562], [30496622001308, -829410313786, -52531018490, -38940644366, 9976070326, -16085953836], [20159012935048, 468046708888, -106063241590, 64076290322, 26625816560, -14206146750], [18098555362624, 1031709829426, 82210489566, -4097395434, -37003522888, 27828957832], [-46183748875165, 1843456338519, -128962083689, 15155827809, 24876310035, 14918420034], [63523245546282, 485149895360, 5175767986, -43932309634, -10019092224, -19937344458], [-6681995715914, -146578479444, -115316344452, -56937104076, -35527337824, 47069269696], [-10946279243779, 372291817425, -23401037350, -138863642710, 30591485683, -17763427103], [-11567537617320, 2283100734706, 123246397142, -2075713726, -698654322, -29158159696], [23933338684214, -1557048079572, -107789067689, -14104270935, -980838630, 1736225253], [-32516057145072, -2297467823956, 65865791137, -75197923513, 11852968320, -8006732961], [-4184173020332, -1134550969010, -187431978304, 15482326948, 12137946936, -74484450606], [-44584093727272, -1847986910392, 53958369346, -80751326558, -1661868416, 42950954370], [-9710228428251, -2520613411877, -47561923630, 817162982, -67235876217, -21290596777], [-35882819826973, 2165987718729, -140984702543, 48925876059, -3241164297, 20562687294], [-54155519720948, 1552351557064, 38158663692, -64436923188, -30321687988, 9735488620], [-35319756378457, 708219847091, -246291974569, -5608868911, 21794629549, -31815875798], [-11160062367434, 1566755960638, -12805048958, 39228071878, 22472397930, -46593649632], [9518368105570, 229981136224, 47478401972, -52337340476, 72199970196, 6756542844], [2780876383396, 207879378796, -117916054381, 6301729997, 41572225082, 28792487913], [16620118769197, 4011671898235, -96178179299, -14168311145, 5879723901, -25363614936], [-10998392867052, 534565694716, 63662587472, 90405712604, -35636135040, 38165734784], [-107653700673004, -1702034736432, 64102296876, 20713591512, 15353785810, -27955460932], [2984382982852, 4106078071642, -10571148976, 86411445280, 911891850, -6149252370], [-12961686064304, -1909747192604, 211101484140, -18725897984, 33719978880, -35857017972], [32115028921316, -316661505162, 87699498776, -203428489744, 1157824606, 27750394714], [18462711638614, -3048784410186, 31595040684, -1266221124, 1193378186, 8435114278], [69409854157087, -1638020603911, 132089020196, 157323567980, -11998775395, 83279240271], [-77267706700344, 2673667132832, 224090392231, -68326432543, -14792490924, 64816680813], [-44443416964910, -4638280310660, -162439753967, -35678272673, -92522009154, 44532640491], [-585421206912, -699064667758, -71979936848, 204133633792, -62375316144, -45997365518], [-6954228955757, -1607564295479, -383208753175, 149333940811, -94890085965, -29629453770], [574634895666, 1182266943638, -283075237000, 125952036320, -65393209032, -52438346962], [-35612226078883, 380413226505, 57295112823, -97356657483, 16439136981, 54063409284], [-2975059720158, -2018602839576, -343207930502, 191570321590, -68852768862, -45751508486], [9150836626898, -2332695259222, -140103480194, 68710001014, -42208276004, 17701530912], [112149050999428, 166008285286, 223493535555, 61799216617, 148988546022, -35632078713], [52673760003593, -1538970484737, 420287589567, -114635124903, 60778620655, 296735522], [106570439510541, -2897152171699, 41355294421, -92152172425, 91523573997, -34574621934], [-68904762789346, -35606440218, 135719472078, -40875055734, -55736357802, 37881952836], [8449334725212, 648696497870, -44016624779, -7399303285, -96981766716, 122978801781], [87610387637002, -1840614682128, 29807332058, -287788664386, 77333722730, -22641038598], [39796084644671, 1578194962353, -133074179235, -67612180473, 73367616699, -74782220454], [-26848277348193, -2422609831273, -162182134556, 196945754272, -25833799707, 30079211833], [187786335536075, 1627027173039, -71388352321, 102601507065, -45923284701, -45642578094], [146821911758227, 900346391277, 47938764152, 113166499880, 120255683297, -50338077321], [-143633283449004, 2961631088216, -204667271472, -8353188372, 28777516548, 14554554156], [-66039478190078, -3083537512418, 172582332912, -165409466484, 76652378048, 13482572986], [27329399734630, 2253881782946, -86916445170, -69752694882, -34906878286, -10328034908], [-13546473051861, 8788546660361, 18792468889, 37821222623, 26402089503, -129719025462], [7759279711532, -683676679104, 464062253184, 153312209436, 56748690252, -48433725492], [-74423548263980, 958373036956, -318211655341, -75596225315, -114614557356, 13854011781], [50533684376020, -2109792725410, 344369404832, -204744392512, -29741854660, 13176145734], [97017170684941, 4259763333189, 420671903680, -140913848276, 757064579, 135795099695], [103707078951655, 5725125900325, -312046638831, -154947822485, -69449469597, -81828563118], [90649045400810, 1329730111702, -459440398728, 47383646664, -34495693340, -78571240594], [10201659549728, -7011197835180, 189005688984, -133364987040, 151694062140, -23185387332], [-16037845898659, -6757935950879, -14645850962, -159168636290, -115714968545, -116791726227], [87418910672438, 6589954279980, 20029602758, -48763612542, -161739983592, 108152797350], [92281785246869, -4465762197571, -25162050715, 26609600147, 91879385263, -174718346318], [-99097551711966, 10276825182792, 25211202121, 123473228959, -99005398458, 34377185743], [-41523181595846, -9814887429848, -176803492278, 12575714962, 14948688618, 110935311510], [-55257941904225, -2384883231283, 153705641918, 519895842242, -21508397907, 24940997633], [52910672359044, -5217303897596, 52738535882, -213104339566, 7736479632, -91533491170], [-54941876184845, -433227965981, -32197002235, 101739111535, -31388387145, 30186399348], [-29602722624776, 6776255155096, 128073788092, -65168967392, -222804970446, 125570924124], [237334929077596, 3797830780070, 71154381958, 83073193594, -63390981862, 114623058212], [4023124354422, -5276552580676, -762136088402, 263037418574, 41021527788, -151397839854], [-56223420158562, -8009136879448, 12557631661, 39542927267, -258124737186, 24470050347], [-71940007280198, -1662237397234, -787077212080, 78029688392, -70052997808, -18456054594], [-129339942400487, -9628207806959, -449556736099, 307625416255, -210597935331, -69700745970], [120497384905860, -12027637005316, 387742434817, -199672434973, 34599263430, 71954091447], [-55535729126671, -6344882051531, -124881474705, 239216432961, 196562881231, 81224027312], [-43093293630154, -1590215681898, 39869726942, 9146826282, 154260953130, -194761205652], [152426362125830, -11379392678748, -242609487144, -110466472080, -126992921804, -64237851964], [69144044642581, 2100024436293, -142644360319, 109978926335, -156516626197, 146387862942], [-45482944168338, -11799584978938, 286984052164, -581877579472, 10227382320, 123164618022], [152340626455183, 8653701531337, 231216042608, -38103175360, 148669005653, -50676350157], [207956710454844, 7756002097292, 173651858049, 29302819067, -130069477326, 218810185239], [-22113004521816, -602648202916, -70193021384, 461840409248, -59868925164, 25295954148], [-117162560192621, 3134993754895, 365429210523, -77172964379, -69477409125, -18213369234], [43057546319813, -5224117356813, 532279993509, 239095394463, -148323797595, -65579759256], [-118022715332194, -1927801869948, -275564501838, 412918466826, 233903546754, -193070028342], [68184097108396, -3452317286936, 71111729768, -695193575948, 294785579064, -23896697436], [-212770605244479, 6175771250451, 63649353729, 589664825655, 112533291279, -9347548932], [-77944459885996, -6967735263804, -833942968215, 389819362515, -115049176182, 82795253175], [-395972107055690, 4292832666364, 263996944706, 393888457978, 15149438166, -59091498006], [23508419927965, 12535793275315, 534785811403, -80115662795, -183051631753, -162964887838], [275416902166210, -9199602494154, -582771950584, 345004920884, -293388406120, -25372042422], [-163003111766232, 5336293526960, -162898438238, -185359870798, 231702103836, -174138002838], [-28801171193963, 12048886076725, -799579680560, 188668547476, -310700038597, -35643161833], [-49313739653920, -1206531689040, -628297987285, 159150215493, -29076492648, 119530216953], [454531894125261, -13820320702573, -927940134613, -370487474743, 139423005681, -149357144814], [-187204769717005, 4658850584707, 739196348120, -54347771812, -130735663223, 145552363081], [-583028332770915, -3660521690923, 401930782383, -524452801675, 112349729421, 270670332000], [-189500259070480, 12769048399390, 461746610694, -320884774506, -91872017900, -84747685060], [351083643333429, 7054718242859, 238299893401, 185195459507, -168657771135, 7879801404], [143519908348432, -5984145225270, -29122508878, 485749375442, 65082592568, 122319915132], [-59819821978948, 5788999114080, -1122624658263, 510061693239, -444671672126, 81686828879], [256480410529593, 3424505555019, 188246124809, -314660957257, 30791239983, 235187751284], [-35641524762816, -1592816505374, -518117384706, 387107595054, -204193714116, 183179080584], [-269422071419022, 13194697352466, -31212257452, 559941114512, 86837714916, -165388103014], [-236343425666724, -28391078749348, 78433888951, 151759356665, -98405812764, 361226209185], [-23360715397156, 11574235219812, 921804766655, -577917812911, -31306740374, 124730413189], [225717161067978, -897498528712, -518952921973, 918026133677, -274743402690, -75959246451], [208035784243779, 14837319185801, -288135290510, 356238740566, -38099203803, -242865863135], [-225175516081974, -10263032531146, 1214655208486, -640606007498, 450285296322, -222447498032], [70503573283851, 14907419802461, -384519405759, 583821741011, 194772183027, 53098378818], [-275098243575481, 953697760851, -753707159159, -17297306157, 241154057955, -291845791248], [-507678469209866, -20047353127972, -187004857348, 594896738108, 37676580932, -335902769352], [-77683994517179, -10470051403505, -539656191313, 437290372645, 494071529505, -172736216022], [-806709416080254, -1567424717874, 322675536642, 570251007570, 96169436850, -4702680588], [-321631899821469, 7825273195673, -803221103, -206257086457, -604674988797, 50008628202], [-49955193536882, 17135723700664, 860118115934, -19898892230, 379727623992, -57472531974], [-190203157397708, 3843662418544, 227587072532, -184771784236, -311919123556, -124827729780], [-10682288485982, 19363499975326, -317366082715, 409221276355, -259524584586, 77864970873], [273002666023271, 33224449422307, 153833269930, -300727998326, 498849764413, -150369638937], [-268764243388730, -19996757116688, 492427670176, -13518042080, 611861088636, 33386568984], [313503049430479, 14034242297511, -1041026602556, -534593621912, 205826442653, -357147466543], [-524383215166516, -4402317771136, -1235661733947, -20351866269, -463942342058, 109832491379], [-96897286008644, 9095753676358, 1241478295854, 277354718430, 315555885626, -94550599376], [780008254289220, -3361568506768, -113641161576, 664976805296, 64064470140, -281299506168], [503171687330914, -12967965755368, 994827677997, -154981204509, -512031596326, 385382161195], [86470559351234, -10377288228768, 627144898368, -681602098896, -457868357496, -198366050928], [-127278950612085, 9960010110001, 1763087940783, -1202625421839, -310159733559, 179238513264], [51930856269846, -3777793110094, -1782620614430, 962580403318, -109314799362, -413327588708], [-718682436583187, 5937777543517, 736831991123, -334430669375, -304066669155, -26476490748], [256242010940895, 24797787539955, -1538916919637, 1338942344101, 9862793685, -416390852834], [172746394060344, -16595257271704, 1410942121858, 56756949854, -89772792840, -500136161106], [-274478289199577, -7445526125453, -317043375451, -725682389153, -612475561833, 736783580148], [450043703370126, 1791007042924, 277524363876, -950237110692, 795231025080, -103445170896], [550422084493528, 4489134072238, -382278978037, -48094432619, 777166267452, 102317025351], [101601606289442, -883250975540, -658101835530, 1199756196474, -332403911912, 283838062046], [13864282965362, -6241920374652, -1321317895860, -148208116680, -345131774382, 17054759232], [-308387283560340, 12062278593884, 296986679176, 660535538324, -707016680862, 102096445764], [302419605198936, -33396046687228, -660134365764, -1534647340, -77572411440, 578160546840], [-404857632022372, -6277415261524, 1385936610752, 487465537208, -340289406248, 180969259684], [-370924154672499, -5475592727993, -767381765752, -1125795539680, 67011655623, 425788022645], [-705853915571551, -3435424586175, -1464297556707, -443342023041, 90374279985, 541942551702], [-48617344390310, 21648360729296, 761461189488, 210589005456, -3941147788, -17359076432], [293941283181096, 11264563947932, 497248853336, 1338340458740, 69010213008, -23253184296], [-272048991325627, 11174575594995, -419012909481, -1234060666815, 811513387195, -479458515178], [-554691731455731, -8368464637141, 111265164947, 1442862195737, -474668151483, -97473801822], [19614895187319, 12443970725725, -1227751320281, 783873861817, 216319549665, -413981078300], [313034242154972, 27805212550032, 1619805743723, -1167458023023, 376083236622, 335127065553], [-440413054740012, -6420865675770, -504316523646, -331623627918, -1456084740, -429619284144], [524934565857433, 30610116771817, -2110058190011, 1606074504859, -371617543995, -42475426806], [684316617123528, -5869416153268, 1799689996956, 360556261520, 611558637456, 255206778276], [-852479920445712, 30071521716044, -1302874280275, 634654600523, -90887588184, -293053309053], [-241740105268777, -33022809885121, 81794392793, -1579509008761, -458615868755, -65629095644], [16450749252372, 48859107186742, 1348371004856, 249062746220, 368274181584, -445967399638], [-386372517642912, 25194937579262, 226965413617, 713354917931, 404835901842, -836711891775], [555898522908814, -40545307301708, 1585695457890, 285941865258, -338625016954, -182044607942], [-573855600632808, -30457007037340, 996589402906, -697689839798, 973678442982, -89686908062], [-886602053197546, -19504107638652, 1178675062066, -1484723116338, 764544018528, -942790197798], [-494055072504284, 5686220084788, -4396248858060, -247773970448, -751927986102, 305777838792], [-91732981818440, 39941042871692, -1931420217808, 885620961044, 172926209534, 42216766572], [-336531043922951, 8904338643975, 1776351152442, 1108853456478, 84817045451, 181202111827], [744385365989440, 31311118700008, -705767820364, -671769199520, -239589619074, 149026279428], [15759860587268, 7102938561882, -1781113146852, 723460234308, 546054274422, 528222824730], [-186151840339769, 197214169693, 999505498754, -252531711106, 144388282733, -383349092883], [164365211513832, 28651142624078, -1759482234893, 897696068069, -79163921196, 97572185751], [438071675544020, -2224493749584, -3109213807391, 1260631574607, -241861586520, 400581704475], [236364909533132, 5484807857118, -1265440075164, 328829671212, -1189171355792, 515951995850], [417531111839770, 32402074043120, 3652236841165, -1906709036765, -144468190246, 120563299715], [-1014514982422152, -19207864628572, 2761476696396, -1721582557512, 780348016644, -194166132012], [-338616357045573, 25613138577835, -795728657215, -575430216817, 238228608477, 363425336792], [210979099010104, 23945274482632, -1471287883062, -641471692446, -48394255558, 296486347462], [166887966204235, 9156796097575, 527755722579, 1875981001297, 1099838121891, -1060237915494], [-577948430942534, -39230569515752, 600219735040, -939722930864, 1034909874776, 131799530312], [1105605408295036, 12637583717272, -249579808918, 1557773685398, 845291850992, 31787417622], [-617323394450458, -7854872988690, -899770291880, 182425325212, 1131997799764, -1426101203550], [-916703917999829, 38304193380241, -1243046058003, -320654383109, -130789403337, 243560555550], [309536723906488, -3829994616638, -2397554803068, -575731583624, -816069809940, 436512283026], [161536543009072, -66680196614640, 940781727367, -301187075543, -1080970651546, 1221005057537], [110843225253692, 11498736875850, 4022045074887, 1777621784121, 491492483832, -711172453233], [-248322742587414, -3322930087732, -674038833350, 3414202316414, 209264198700, -610989049302], [-1817095473910276, 21874188522688, 1209766297468, -1009915445048, -648026742164, -406690192080], [-1063295071825324, 17284459801272, 3400482994058, -481725442806, 638494223538, 501934591998], [-776290772469359, 1815727099109, 1514757562378, -2845444358342, -806955243709, -218957316091], [872881778796176, -5921833748542, 2922910355122, 641101202254, -1179369109034, 364471129308], [238318063639429, 15356963883691, 2785422255137, -3428021513645, 449991891405, 246378916644], [387805569345991, -67592834898113, -1139690949095, -808470467981, -473067236997, 619303628220], [462156519181912, 42723835983980, -572193633086, -2030927058230, -919477167058, -49230745462], [1366830705926318, 38754855788976, -999804201897, -408836919303, -561391040330, -1228211416087], [-1660087363962555, 38030297336933, -3441981781327, 753680200751, -723205075131, -271223880966], [1590638754072797, -44857019848247, -1965748395417, 371233736817, -509434279901, 370020068972], [-1131127327881972, 12946594953722, 1429519335220, -2158379427532, 507055097010, -372758829102], [808982662108250, -1116826750824, 5118555777552, 2328498500424, 1423167870328, 231313656056], [1929806063733609, 17213616931197, 2888589546487, 643954821889, 1736935116879, -288424498712], [975634881228411, -29375983832035, -2129674919521, -2665133454091, -124447519401, -7262019852], [-162652431031359, 30487341379337, 2782060885073, -3450553605073, -165668277465, -670678108438], [-264631731591840, -12504447949828, -2598959647158, 1955324758370, 1073295653178, 323735932698], [-24386303651880, -61555060341556, -6707565793936, 1522483602500, -776718323790, -917388865276], [808595390161144, -61860027963092, -2158250165756, -558004557368, -303042164928, -415341455172], [-187758886916206, 51998302813644, 1277634480436, 1365244290228, 272462867460, -57277091352], [-1863918737154497, -105404930214107, 1968882576441, 186468651535, 508984813107, 1901356556526], [-633539551295896, 8658997131300, 49926345640, -2186275113596, 678823342426, 721230778860], [-1214781852940422, 7492895855696, 4447086438166, -364589763826, -990184706898, 1598027332530], [134611316232054, 2654437310516, -5972401281956, -884235041348, 334930670100, 890523171472], [-2415836627758084, -23514682581240, 905103254508, 1404086322720, -541078381256, 354171031592], [-1816585957065769, -55756155334839, 2112682504965, -347481895833, 289802145615, -2170117224774], [163697726098158, 27478240075426, 3676809879824, -1608919077964, 1056219582588, 1301967430766], [940747844735482, -104858609883692, -4460936468286, -207709329962, -957707797920, 1773940968018], [1996001476828752, -24185817030418, 905961714601, 1086553126571, -1701474747270, -301736477535], [585750653179392, -17528440012998, 562482601514, -363809780110, 810745190412, -533441324428], [-92476489155300, -5894702504932, 4745684020684, -1849966521160, -2165025098526, 685011485592], [1341938891928392, 14157835920248, 2952768264571, 2031105871069, 1853738739682, -1896094846299], [-436365229154664, -76094095576624, -2125475265113, 654243189569, -676752070500, -870367255875], [-436851946510255, 16937811756773, -3908088222797, 2112055363141, 592064669215, -1755971931756], [756094439864022, -26915754799456, 2385243603343, 2150469788909, -2318679398952, 1590295314921], [-8606029760522, 36319219258220, 2246123115324, 3042666781008, 633100825520, -433697272340], [802108097837510, 70385213460160, 4473671937116, -1310451734176, 937036727530, 497413041580], [-321975640848057, 36478940289821, 610518424141, -3488509085473, -399403818813, 1852069105950], [-1108352412233769, -82099012296361, 1532774518981, 2475499383527, -804802810845, -298687333656], [-1199933065537332, 7837344410478, 6463429395442, 294605177938, 142271383218, -404376862580], [-1651134847692748, -52248461457816, 4198697170042, -3532021854318, 778729134090, 1377932958486], [1718713202751115, 88736386011393, 4893599362595, -3655241111083, -332777062315, 729597157404], [2116341277137094, 6760394338492, 2240063460836, -2417048603444, 1973470387464, -559093644312], [-194933447673961, 23402728696417, 1642099861008, -2255737098288, -373644624971, 974131392443], [641700821059490, -71366158294698, -886977946074, -526522905906, -1177365169226, 1765026693200], [-1533487432283389, -60978146826003, 41850859109, 852322508679, 1530612036975, 1282453794174], [-963981593937954, 76895012313788, -3864208051280, 1010941003640, 55998956208, -782706940716], [2613932901366244, -29702574484428, -5464864697365, 1638035922077, 143780694326, 2036012150889], [64083259909372, -55292102392712, -1037940047172, 1112912505816, -2232600284554, 2124135900172], [1681839892250820, 47432148123542, -2378857968029, 2889555779225, -2058694618938, -1166291300073], [-556477310900282, -78725016349568, 5815468617950, 2309448998378, 884940224684, 2133740590890], [2743957469467370, -34163875156838, 8899459870720, -472652902784, -2228676281102, -360925867410], [2155384307118222, 68637319542596, -2490626982334, -5234222761846, -541082475294, 813735845618], [246313530660730, -11467034850518, -2366536275277, -4137475952483, -535272241770, -2526487573881], [-410503714439403, -2380884286731, -2230509194340, -1610583467760, -2855709947637, 157717265523], [904013511145980, -160512700468736, 2628875830670, -4076181248098, 736140862146, 289801334474], [1667907311574412, 236336316802, 7085264627332, 681513495892, -1020255359670, 1178321171898], [1357872674731524, 7550187299826, -5268061835222, 2771085451474, -431235374196, -2211679651652], [315709341394380, 147921499648812, -2988235808390, -2931197126018, 1603308057354, -774735319970], [3296825625618737, 78715498553465, 4008646688757, -7992589020837, -836814892493, 1091392286222], [-1313155225271695, 199124261504319, -4845054925189, 3141348687273, -500973348963, -272396344986], [2746296118308053, -29558223531367, 3610667935162, -1420482951806, 1331928380431, -875112783447]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_57_a_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_57_10_a_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_57_10_a_b(:prec:=6)
    chi := MakeCharacter_57_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 10));
    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_57_10_a_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function MakeNewformModSym_57_10_a_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_57_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,10,sign)));
    Vf := Kernel([<2,R![43621632, -9984384, 241968, 41136, -1410, -33, 1]>],Snew);
    return Vf;
end function;