
// Make newform 69.8.a.b in Magma, downloaded from the LMFDB on 30 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_69_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_69_8_a_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_69_8_a_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [-1061812, -77282, 48973, 540, -466, -2, 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], [-156, -1, 1, 0, 0, 0], [-4103988, -1226918, 89711, 18759, -175, -45], [-310308, -61166, 7143, 878, -17, -2], [5819212, 957754, -117345, -17217, 241, 43]];
    Rf_basisdens := [1, 1, 1, 10624, 664, 10624];
    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_69_a();"
function MakeCharacter_69_a()
    N := 69;
    order := 1;
    char_gens := [47, 28];
    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_69_a_Hecke(Kf)
    return MakeCharacter_69_a();
end function;


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


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 8;
    raw_aps := [[-1, -1, 0, 0, 0, 0], [27, 0, 0, 0, 0, 0], [-66, 14, 1, 1, 2, 1], [-191, 8, -7, -1, -7, 0], [-2463, -72, -14, 26, -9, -3], [-225, 333, 21, -38, -23, 6], [-11359, -306, -37, -221, 175, -76], [-7250, -40, 87, 13, 68, -251], [-12167, 0, 0, 0, 0, 0], [-50238, -5706, -132, 518, -220, 900], [-39806, -3100, 362, 186, -70, 232], [-103739, 590, 1642, -1220, 1533, -1657], [-152190, -22330, 498, -4688, 516, -394], [-300672, 6572, -1101, 6105, -3134, 2763], [-230319, -13753, 1117, 2432, -3383, -62], [-254730, -13476, 1257, -657, 7178, 2769], [-246135, 18509, 255, 14064, -927, 9836], [-161799, -7428, -5328, 13464, -2947, -7987], [-81432, 9948, -22791, -6113, 8366, -2163], [44200, -27934, 4394, -29276, 9532, -10786], [2732064, 53982, 8254, 3388, -50, 19732], [516947, -327508, -2505, 13009, 9643, -15928], [-1162323, -339538, 1992, 21206, -24065, -4669], [-3360189, -73700, -22369, -17595, 34525, 16246], [2027878, 194752, 15406, 53778, 23272, 104514], [-2777874, -28888, 4204, -31172, 11616, -81556], [4183341, -347088, -7269, 18961, -45439, -27886], [-132877, 234520, 2626, 42266, -125067, 79779], [-3601129, 687864, -69722, 35454, -35653, -2235], [-14564773, 195004, -18725, -75759, 93669, -90422], [2116368, -713174, 54484, -179638, 79512, -164272], [-11855988, 1339570, -71610, 131152, -10596, -47854], [-9538817, 2242542, 135105, 44029, -88603, 31060], [7730986, 1736438, 22270, 279276, -121914, 124436], [-23241332, 528396, -81489, -262055, -59040, -31439], [7524078, -182974, -19178, 38952, 286558, 264524], [-4324759, 425254, 368490, -41044, 175057, -312125], [4627616, -2269584, 43642, 531846, -174240, 94646], [-18006814, -465824, -126912, 473664, -85266, 219230], [17178790, -406166, -105768, 244366, -272360, 397532], [-14815595, -4149177, 141521, -552012, 399649, -449346], [-28544895, 3523218, -170544, 295194, -75491, -141271], [25893062, -2007250, -163572, -391386, 335906, -314174], [32945361, 198173, 54537, -264778, -364613, -248444], [17264820, 1636582, -56500, 482902, -676966, 63818], [-22441797, -1854940, 273911, 454349, -325829, 187172], [-6113934, 2929262, 254540, -946578, 243218, 281466], [-35262548, 1103184, -714816, 521848, -92132, 35372], [-3946953, 6054868, 1001944, -686296, -377387, -1003331], [-27016837, -11710284, 2170, -1261186, 443671, 222485], [-39669000, -1197458, 210146, -1208616, 2144822, -256576], [69635302, 4791162, 1096042, 735516, 1159678, 78224], [-24632264, -4607622, 943040, 162726, -1150214, -219442], [-4810545, -48210, -277938, -550712, 222433, 2039111], [-88860254, -1383462, -1140254, 771540, -1459284, -412930], [34911252, 10397034, -2289688, -264402, -645580, 874696], [48388936, 20364598, -939092, 668454, -945426, 925230], [34448320, 1361586, -69560, 574230, -1584448, -505060], [213354140, -6000016, 1913092, -1677836, 1355130, -2278362], [-55861727, 30341310, -969859, -272815, -436469, -1963866], [151356666, 2713924, -602775, -871209, -701884, 82075], [312369088, 13522326, 1732035, -981977, -361596, -1499343], [152711662, -7329054, 835716, -3765110, 3010598, -1072386], [280852285, 5292209, -725557, -2670136, -161511, -1755024], [135629014, -3722842, -3738606, 3117136, -2265048, -2514230], [-42990544, -2758936, 355354, -793802, 2481298, 3447968], [11628204, 22202828, -4044402, 1550254, 2096020, -1835858], [79700496, -31805188, 1519906, -1242702, 2763414, -1749588], [-232988647, -17191693, 2418833, 2206568, -421771, 2849850], [452719861, -1855227, -671387, -591030, 2072291, 4733920], [-171051436, -685672, 2799026, 3206182, 2430850, 5540240], [-299459618, -37847486, 2350772, -5992350, 48898, 1880906], [-468653093, -32466472, 1088771, 10725505, -5377349, 5356748], [345403893, 54638526, -2962838, 858204, -2088835, -1859049], [-65318450, 65475384, 1502571, -1608579, -505340, -6187523], [-25172250, 6911684, 8472794, 385186, -3100546, 3286012], [225232330, -82727442, 2881915, 2351455, 1706458, -3040209], [35136154, 67552644, 2592972, 1886304, 10132596, -3562320], [160334189, 62527034, 2565843, -2153697, -7565773, 879320], [243185159, -93705621, -1846357, -2072018, -6273855, 5849396], [279271349, 34219306, 8240836, -194874, -8779409, -2696185], [1056006655, 13341914, -5100240, 399410, -3790833, -560861], [-1111485168, -13780598, -1764486, -2391164, -1849564, -10679578], [898588240, 42539952, -6776124, -275396, -368374, -5017954], [-57068602, -94525502, 423982, -7240312, 3654990, 9024988], [138119060, -21181636, 5961304, -11341124, -5783168, 2163072], [192238272, -135828140, 7077244, 12003840, -2082126, 3610790], [-722326860, -25461946, 1228176, -110326, -359802, -11786046], [-254898094, 51150912, -3443562, -9262294, -559992, -9481294], [1231718744, 74026988, 5150528, -18910220, 6451992, -6714360], [-155009445, 33385854, -625694, 12422332, 8797621, 11655823], [-411104282, -97727418, -5804798, -5404440, -11622674, -7623632], [-516191300, -48132296, -5748336, 18409392, -2190676, -1805428], [-837597641, -82562931, -7633113, -7515824, -12940029, -5866426], [338237784, -77148800, 2455850, -20940842, 17981320, -1858434], [-405845168, 2811386, -24533970, -13115464, -8970076, -8381638], [1721905712, -40585276, -411582, 5655498, 12619634, -1812888], [-603054111, -125358284, 929859, -24141175, 16435063, -955692], [-1622482244, 149784288, 8846945, 21858547, 4139762, 1027585], [-2499707645, 38416295, -2300677, -22277222, 3604353, 143996], [-2324424510, 92195542, 11595412, -20291194, 5730930, -2687926], [1462220858, 197168110, -8386625, -29198965, 7623690, -7716165], [-261204913, 91058188, 9690440, 7500312, 5393357, -835203], [-2589267301, 50845180, 30895117, 2329807, 27864081, 25445612], [-1700076260, 115940656, -19566655, 19459175, -42227086, 25225133], [-1250529941, 104947731, -5957245, -17289170, 15979741, -31524048], [-2785671476, -24732770, -11661286, 27808288, -24839252, 30177494], [-113238264, -71833056, 12790252, -1421572, -5835846, 518158], [-651288806, 1760234, 30506818, -3214668, 22988402, 8630572], [-1006335089, -187600849, -30643633, -7347610, 39274809, 397480], [-1316195162, -292556674, 11898958, -29662564, -5579810, -13266092], [941048831, 65706554, -10939074, 11355028, 21248123, 26720297], [1751051475, -33108296, 14161879, -28441759, 16434461, -41502602], [564860606, -294385760, 14052097, 11641327, 33269888, -8303493], [-4428503887, 204676992, 19330727, -11919487, 34148389, 2467550], [-3834093843, -155885194, -10605029, -50332381, 11800035, -42115424], [1353169184, 35302476, 26065723, -60001127, 41082970, -18783309], [3421241507, 211833843, -33276611, 38218732, 4281207, 10247728], [2599992600, 21969882, 5523898, -29159884, -51682966, -20132452], [-2212880949, 548147434, 19845798, 5745860, 22307853, -17788605], [-1503129765, -99306138, -33727618, 23603504, -52666417, -32805427], [2218094173, 263774765, -16881139, 216866, 22535407, -31048644], [-5428533228, -209090896, -22642221, 51795689, -16143504, 7039597], [2001278084, 18135314, -58565174, 13279724, 3378964, -19714538], [-3619399550, 182029058, 5527780, -39525006, 48619634, -506630], [-1314006708, 99134726, -39765491, -39349443, -14729692, 39732463], [4565116749, -181793544, -13181934, -26341118, 63938661, -549733], [4042057271, -88477853, -18775227, -33654220, -3074245, 14205852], [-1699393611, -229209068, 13081509, 69730115, -17206019, 46337108], [517882119, -377421770, -34672528, -9211338, 29356367, -13204245], [2555888704, -493334816, -25910460, 20733620, 691268, 5594152], [7922041850, -161283112, -48517922, -44918766, 33972282, -32062156], [-7154419721, -19345328, -3290295, 17317263, -4606773, 57851058], [6065009541, 12031690, 65111792, 47456738, 11623321, -15300955], [-2167926704, 101193212, 27066030, -5443810, 8525270, 36454408], [-1498600934, -303334034, 119039546, -49906816, 30896252, 26184134], [1320515130, -147956500, -57367509, -41597339, -12238838, -31819697], [689281288, -851332368, 58487071, -52297055, 95007354, -34667417], [-12160792296, 623329420, -20137379, -10091733, 35613240, -83489901], [8503156178, 332757086, 29352372, 208142790, -77670688, -32619128], [-8353370682, 511608182, 4000336, 89278170, -95185634, 56581178], [-6260135674, -96396512, 47511128, 57092560, 41710320, 93066232], [-14594162812, -65637522, 626908, 18720246, 29200676, -29427084], [-5331658977, 845966698, -17077066, -112266620, -29398783, 9887463], [-737796009, 817369863, -50394693, 51373594, -48230531, 42259976], [-11794607904, -613842466, 61960968, -125695014, 106713160, -17478396], [1713710030, -614551744, -37835648, 31654624, 98581216, -25336512], [-8151084456, -680662906, 20149534, -43695284, -99943026, -48156364], [-10576981622, 847297854, -76227266, -67624900, -42456602, -104774364], [10794265921, -350320439, 65749703, 65115524, -24895387, 108137936], [568147416, -152258316, -25034484, -1751480, -27620842, -51312830], [16821755313, -1050805234, -100891619, -427879, 6577267, -46391466], [-1382604032, -270280544, 7358598, 86218554, 58708376, 150226762], [15457054875, -93198023, -103290577, 13701492, 19121707, 3602022], [-6608139502, -22879936, 125604769, 131858779, -200014388, 69129147], [-7691839648, 1466418174, 78054242, 13631632, 85170868, -64116514], [-21792515577, 1101868428, -34464981, -96588095, 16832263, -124781540], [-12548762990, -442243022, -120082202, -20677272, -115779484, 25676178], [-15157646950, -592613324, 119246440, -120600148, 137263328, 89011256], [7719043394, 1085773598, 34242225, 44099825, -25865642, 82909317], [5550407857, 403733407, -37776391, -174322284, 94411637, -26453446], [-7524746361, 36133024, -116349619, -38842037, 170875605, -21635048], [-10525679550, 1286539356, 34437894, 77586238, -12169478, -88070828], [10555891663, -800246856, 43723152, -152090748, 156391589, -90328587], [-18508872095, -279772756, -42774113, 9559925, -66581721, -28957816], [5893965320, -1086464094, 155199894, 223467320, -16337124, -20972886], [5373514332, 1457235834, 52540536, -96359698, -129809812, 135678344], [-10128718663, 1819956489, -205377063, -142580654, -70808753, -150296576], [-2105299310, 912494432, 100213046, -141724374, -171976708, -112367362], [-8448466768, -995120102, -33488810, -213973648, 299329250, 1406256], [5772904907, 1867270930, -51119670, 276408136, -68485651, 203047951], [-11354535480, -301790480, -167655496, 49309248, -282108658, 91574934], [-6064367750, 2557094648, 17631350, 208208202, 96004570, 102974764], [11984975894, 902548610, 16406128, -70466234, -289273532, -10943368], [8373687840, 546354366, -78107044, 62957038, 146894104, 324482048], [-17122993869, 984723670, -63506505, -10703913, -95413171, 9638582], [-3121719182, 2252295174, -28348438, -46206064, 6199206, -61614496], [8871539184, -531948704, 356174364, -133458220, 253067374, -211714230], [-3808500559, -3756810684, 132408643, 150853489, -61045443, 148652018], [-19497720781, -1451920192, -48110616, -357288404, 18209603, -124267349], [-30614884738, 79081264, -132659066, 200601306, 139994470, -146245800], [-20562944747, -1927113568, 71423060, -85740248, -278157841, -79923869], [8942381760, 1407740692, -96779224, 167276252, -161858018, 97246206], [-13284846894, 553393350, -235593696, 299786378, -316780024, 274709852], [-63515348, -3048177354, 6760634, 291063176, -152171448, 118736786], [7269977640, -1335516552, 109132485, -88146057, -57973632, 93870699], [15021851494, -3416029384, -230765560, -79054400, -103461968, 374907224], [20425463976, 1762416628, -61037281, 20874645, 19184058, 67576823], [21760570768, 218250130, 40966466, 197149044, -196945434, 243563424], [27931622487, -2354221751, -214277145, 165918684, -432301369, 240930330], [10079997236, -2500270946, -323797310, 123102600, -101538230, -74033412], [-3228792936, -1483206350, 27254346, -186650020, 409328592, -14481214], [1112733552, -2585930368, -115413557, 321689165, -68424022, 112107795], [-21386453150, -1087720230, -181247546, 581501248, -157257848, 318115270], [9523697825, 206301746, -209225500, -43631170, 57565043, 92067851], [10301059681, -3115247124, 216426969, -32452213, 256092835, -107677006], [19790185760, 1846498138, -12098570, -120814072, 117172606, -156937588], [22671263231, 2632483922, -59957560, 730713834, -374910793, 111498187], [-31270556589, -2507464362, 277126355, -187232357, -45532131, -32580326], [38247785200, 494345232, -383896148, 24013332, -330866544, -112746380], [-13086889218, 2586987846, 259192939, 119597623, 507827966, -99292205], [13609941230, 1652362732, 167355990, 283206510, -136549858, -251228408], [45621441952, -2335161048, 79859988, -47688596, -97317194, 427290562], [9257047432, 2290142284, -10734910, 429956898, -266587266, 153092868], [27954833757, -1433359712, -244467882, 418945918, -729671277, 210430645], [-17411237160, 907387628, 465931222, -262945474, 596144914, -85106492], [20895896377, 2589972792, 180818345, 104522675, -205803063, 414831676], [3012289769, -834193283, 231893655, 407186152, -136908727, 429093884], [-32447990888, -889857368, -110224896, 154437368, -760052838, 126235314], [2444695772, -30200192, -455675954, -155639366, -382494076, -165213490], [-22886419788, -1342899950, 44498366, -391046008, 49990130, -141208848], [-518009636, 918902324, 610618428, 136658608, -57289070, 441190950], [-4773180441, -2381391952, 128547313, 384365755, 189525923, 246093998], [-7403054237, -488759482, -119286484, -20056430, 156269369, -450191879], [68008298900, -1282839350, 513608562, -73219468, 233043920, -13966582], [23333110422, -1987254126, -23612002, -371335400, -84625888, 528657438], [12970122834, -2027049058, -698611434, 382292620, -411903886, 108488680], [13410901766, 4222763234, -56760152, -351372434, -11912660, -111234856], [42191953912, 5225592612, -40466428, 127866952, -653513512, -436661764], [-70550929888, -2018249092, 248973332, 104123024, -224915898, -96266430], [-49274446589, 126136949, 63896149, 380971474, -104653523, 135297962], [-7741690977, 3677368588, 153708933, 35833667, -868467725, 369122090], [30954112834, -2276920314, -281979216, -86209006, -602244464, -303422180], [-37646281463, 3411626604, -847251317, -874770855, 68681725, -565497470], [-15048426382, 3243824754, 346233750, -388844312, 64494246, -551970788], [-55426570771, 4704448363, -135848357, 120269534, -737865489, 139045474], [-29414605377, 1383596896, 199033759, 291323721, -105336687, -868427702], [-19562619295, -5170208613, 195495117, -294885780, 747172441, 215310842], [4374435907, -7719609580, 240825741, 655721279, 59079871, 568488098], [-61257496972, 6614902184, 125214996, 973394148, -322662952, 826356772], [15044465099, 1075350595, -48222849, 21344874, 301319633, 999663952], [-34480383750, 1089344276, -429128983, 1209485711, 37026444, -12662021], [-4577887921, -2287830168, -415115051, -201026493, -993232405, -426506402], [-57543792114, 4572135788, 100566022, 250397038, -150566800, -762179382], [-23271656854, 2590279348, -208825939, -421738385, 174031100, 190962659], [69014532868, -3283532106, 4102618, -810860024, 343423072, -303794694], [43299831382, -2450513420, -965203730, -952723482, -67180040, -817209966], [-110747257716, 445093400, 165801757, -370998433, -49121076, -102910177], [-47834175746, -4816700344, -315958888, 544961384, -582004762, -558526194], [-65432403195, 4304671947, -74180187, 1654076324, -262022211, 1015671414], [47825035267, 498111144, -448841216, 105729076, 299500841, -170886455], [-142323445452, 390385220, -119218902, 231680650, 184274804, 55648282], [-10575928084, -2150030830, -179001448, -242723410, 708840436, 52037272], [-17074333295, 1549309215, -293976849, 1160048102, -839780197, 429180706], [-71804462388, -6064065466, -327522886, -264356360, -745725622, -79894084], [156029954036, -4808162144, 299394644, 281926220, -435313188, 853257384], [-8582117106, 5431219508, 817550366, 377361878, -14270882, -295744616], [-9774002271, -7840426630, -483438212, 96447934, 448259363, 889927763], [-69281198734, -14975349208, 449455141, 151527423, 660944868, 657718159], [-155328835328, -2848840284, -548083264, 607712692, -294363600, 24260864], [75429849631, -9792714560, 438624966, 244501558, 218560579, 109970525], [70638473611, 3990665362, 57325635, -292941649, -446267659, -417891510], [157209421962, -4547474896, -352207854, -122412538, -36976958, -203082632], [31003491038, 2892786310, 462976300, -150907042, 950304324, -164328644], [-95379469248, 858038144, 8875584, -810434584, -1050131010, -702811090], [-87362679620, 6829328232, 918478292, 27711236, -1417960, 463429476], [45694199469, 6358557998, -1383885464, -599766786, 84568305, -376988651], [7575809752, -1644545352, -718561951, -523192553, -376037626, -604888375], [-77380713738, 3905231104, 883095234, -236213706, -885650924, 388978986], [118984482241, 7045451893, 338063921, -46914170, 24812227, 455747780], [-41358248823, -2910985400, 629893887, 824959617, -245268059, 545535718], [-52183563785, -4649135696, 685330634, -839463158, 1030271257, -536052593], [-68235865492, -12816289192, 197554516, -306945332, -439737510, -563204586], [24025546827, 8404090474, -403063362, -613034500, 89756311, 228329021], [73039821512, 801716490, -1151077154, 359935640, 777048822, -459280732], [-133758035770, 3603875356, -491315387, 827265279, -442814120, -100767993], [55413638324, -7515790548, 366691197, -1450731141, 69814796, 373050295], [-8168739333, 9447869330, 534965711, 760910763, 289134117, -591328458], [-97864313050, -7154014540, 463521865, -799425809, -1091966664, 31927111], [28792489066, 3621612820, -685735646, -1600186142, 468397344, 1124578702], [50478102872, 4893548748, 150138316, -1323448432, 1694080982, -582647854], [88694711668, -11470237732, -498988829, -32350495, -1488190282, -222734217], [65605264332, -8791546144, -474497470, 358004774, 319967362, -457291848], [-10737111373, -8708761768, 408414465, -140783925, -1016731697, 706042994], [-22746963986, -3061806448, -838972764, 1056380572, 1565144252, 32643544], [76954824994, 2824007338, -1120676578, -1478767840, 1515744626, -855367248], [-124014655363, 2467151453, 941074299, -622494444, -65156971, -532951932], [199934059874, -5110059772, 123690444, -949585392, 1199489004, -855095832], [146444497122, 2491704492, 630222232, -1414983212, -987270312, -1480177216], [-39977117915, -9056721312, 438935414, 201327006, 414877683, 307786965], [48685184081, -5542058459, 168900455, 1391296536, -457159339, -462811176], [144598429781, 3573352444, -1203454973, 1230727925, -1296840071, 538361538], [46512232006, 4314342370, -703948296, 1927756758, 1212749458, 263837102], [16587407771, -503945614, -479339730, -793977148, 1723051391, -1569933531], [-153522986302, 5390554602, -639824624, -138357106, -2286713182, 407653894], [17301411015, -8360388509, -1531868703, 844862872, -646923549, -2228055784], [113010293384, -18704566866, -60226340, -717964722, 1729780450, -2097219926], [87039460298, 7084600814, 1079653983, 764229035, 3120214258, 189708723], [90335187784, 4417663160, 683463096, 920299144, -463403968, 722674808], [-217718727176, 6828477870, -124817860, 1813282878, -509128758, -245281582], [228313851696, -7364002808, -1949255209, -105373563, 1188307732, 231962421], [-318561816017, -10509107568, 341405166, -301395418, 299511625, -792072373], [-116386713964, -1993938802, 561624516, -2196227778, 3345303974, -1362024258], [82116458931, 15800707724, -225377952, 640610928, -689204575, 1113809049], [4947857953, 13417205249, -205226535, 605125418, -19423553, 1568058944], [-53417221686, -8278944534, 467897533, -2884498407, 927696598, -369566319], [-126941757467, -16921594160, -176800743, -298861169, 205721901, -2900793876], [107005201998, 4643631332, -601630248, 2148911580, -1206370280, 493494952], [-107714528456, -14503726056, 616752744, 1200758880, -662862068, -1215617228], [38609439644, -2704499120, -1203299032, -901095760, -433507200, 1595632136], [215206133282, 10142248082, 1489607562, -1813052188, -295353588, -2618666746], [-33471884838, -14577367670, 2566116835, -1775890949, 1081594162, -881864201], [-87708051147, 266511324, 2094833501, 63868043, 1175452821, -862753860], [-242720846353, 19464296015, 1117879713, 414185924, 791265943, 1002956772], [-265566804810, -12033406444, -792470417, -1154948111, 1845065140, -406488563], [-9332554683, -19317225675, -1287798407, 1363986270, -507680953, 1805991824], [38414848430, 7497980126, 781169990, 2087564876, 174674850, 3117782256], [419336583, 12287912744, 1991366670, -2592646050, 265139979, 1616187141], [-22917423240, -9164674050, 1541354296, 185385490, 1109233408, 486719764], [27523608213, -802153529, 1659405399, -2296004954, -305736865, -254296386], [-38988473679, -11329404591, -1329222729, -2129685268, -820924075, -892526400], [-54036506148, 3723405518, -441711849, 204183539, -80692992, -1890967439], [135854581537, -9045137600, -486632073, 3348830009, -3492235849, 1864366984], [-134698550020, -4105965844, 2328567008, 1303705868, 303282496, 1582406152], [-111230216058, 12668766024, 967982976, -317973528, -855670494, 1957197706], [-176813731410, 20508750050, -89184420, -1072703430, -2236526188, 2234333756], [211586299314, 8685622626, 995231186, 1752881804, 442807726, -185031672], [403213113995, 13051924825, 413488499, -25361664, 275635627, -295290382], [39794660066, -5798809950, 1477504256, 1970258062, -791022064, -1554486020], [-163837469098, -11593600338, -1733557318, 586983072, -4264509672, -1468186286], [58603217568, 31704775640, -757442581, 2075380765, -297239446, 286496283], [166083795384, -1243069508, -1867257684, 173301040, -3390762038, -242201482], [-34942744918, 22897593694, 1316119802, -2743644968, -864162664, -1061910630], [-61265549566, -15232492238, 2378469782, 2003236440, 1289021634, 3149427952], [170948404619, 17594133344, 183352669, 3609813347, -1745750767, -374351732], [-174472637138, -21231699704, 361913234, -3928435618, 2136862808, -835060682], [-313887555888, 10345939964, 2892004039, -480606499, 2751464402, 353399967], [-254778447302, -7603041322, 26031914, -1684123496, 2304229278, -739817752], [236427688026, -16886355782, 1847981538, -4075805180, 3820339578, -3991682924], [71540472848, -3561262880, 1805211001, 3484345059, 1408104944, 5614915855], [-118544806788, -5049301844, -1790955072, 2459792156, -4771394486, -293877006], [285881150682, -4076075128, -301413048, 1504478944, -1980768844, -2234997836], [-195285716076, -6349184316, 475501152, -4612679428, 2611106044, 1674104636], [-83752848782, -23293988680, -529523524, 4690660804, -5836542558, 2241492086], [-31789729574, -21994163176, -1095532479, -1821766229, 11160516, 3773015323], [-176245228559, 17586886019, -153871559, 691878000, -1072951811, -2350375046], [77793605665, 4486995462, -170545522, 1821329640, 1947634801, -810117185], [40260618985, -4926642242, 2907384293, 242255545, -265844597, -89717042], [6672031361, 16298532293, -2216401703, -1704365138, 2487483811, -232473332], [-203220756623, 31106384936, -1332442873, 3274239349, -2657202051, 5814256554], [157833317097, -34359920773, -1718274549, -2130864402, 3855066947, -1843215834], [169847223621, -18357106218, -392280141, 1173733067, 1003901667, -2332833336], [-352079665296, 28297875796, -2773501436, -2792190816, -1689966354, -1472133678], [-175503206659, -7213304608, 594776821, 3656836275, 482204037, -211173224], [145212357218, -13879206260, 185990731, -1256564131, -1053823734, 2005417607], [-281544670248, -6124581424, -212691052, -1323630212, -840577748, 29519720], [222005595423, -9419628839, 886685769, 1494176122, -2383533447, 1568860522], [156679736098, -5582019078, 4871975732, 1943456202, -37318918, 1848653370], [477188754004, -112251802, 4218094218, -4111124760, 5701040048, -4033257430], [22728325496, -4971363678, 2619170539, -5454476317, 1908189228, -2301155063], [-168986105808, -7363144580, -3491913480, -2615051212, -1661046804, -1619077180], [175104187185, -4961078163, 2940518681, 5358117926, -2509125093, 2485288684], [-264454063578, 29132289536, 983076330, -2761945626, 5416521260, -3559184094], [176996751043, 13354654364, -1001042093, -4781679747, -1534927149, -5228843012], [-205592019893, -11097639314, 3579690890, 2320646404, -2626484329, 2392375457], [-362410902382, 16600254686, 4602952168, -1653184670, 4492761736, 1024834188], [520306553034, 22525190904, -3493771398, -141639586, -630024310, -150934656], [-114324691619, 11624299656, -853325136, -598699292, -4737076089, -89589441], [-317471448408, 3257671156, 5067296394, 711605530, 2793971422, 3478052116], [120765627957, -4909729109, -4424757635, 3334774028, -2148919331, 471454734], [-365952942267, -14763826372, 1691027780, -4479344316, 4764623441, 398588653], [-387616611560, 2918178102, -3017942016, -2143617470, 331338410, 2146350254], [-516580013542, 18828846324, 1695497812, 1784923944, 385619078, 2404898250], [-284049755943, 21099871522, 3677222806, 1387844652, 3966921767, 5317485925], [403949939378, 8753795718, 4987991962, -2982860496, 6827809870, -1572857408], [584420298096, -16718815106, 1367713666, -4311248456, 2890833078, -1582983544], [425255365324, 37504650956, 471135360, 2883694420, -6596973294, 2663020962], [394727579295, 123393128, 1800298403, 1281415889, 3146336719, 6168068416], [-58014424142, 8190027178, 3554622530, 2424964700, 4318128188, 2169849222], [-285052873429, 13034093593, -521077349, -1426908256, 1551446591, -4539360122], [-332964305932, 18188334136, 181576774, 2177930290, -1623766132, 3553168374], [700932604278, -31032315280, 1922369460, 3726736508, 779929818, 6127697718], [-315328677484, -7072691158, -2268766763, 1988105121, 1828020148, -5054770177], [637242908105, 30493922164, -294308177, -1445104899, 5795037549, 1008998078], [511269221198, 40594897272, 1989197800, 1550889872, -3728789864, -3639499792], [244497427320, 22874100610, 808176770, -5985137548, 3294522232, 2695457762], [46811763678, 1966511808, -2368829292, 973924364, -6646081958, 1085213630], [-151366347376, 32911769710, -1979859142, -860414520, 1376774950, 745451520], [-502534017523, -7459668392, -2275660609, 2056613057, 2323007019, -359702932], [14460103073, 2375026217, 1258481013, 9190484110, -8833192373, 3258671248], [-454018486404, 18296443620, 1468210845, 5254960595, -1495903628, 2783175151], [67078775747, 66424479582, -2282051235, 1481668705, -4384633063, 455030652], [274795606804, -44809778802, -1417892380, 1346351510, -1796959620, 1041241276], [-438610891208, -13098188084, 1672899920, 4055639052, 837352002, 1705689370], [-8460630190, 38104131968, -2356291853, 4041530861, -8569311176, 6290220969], [45549497034, -34041227790, 1068784398, 1212429504, 7627536714, 2035389112], [602049268550, -2360990200, 2383792438, 10673669370, -3760985786, -532514720], [111194737236, -19551908136, -6733386908, -7635403956, 1233950210, -4530418386], [184687087004, 54798568752, -1845903363, -4466427285, 1577089146, -112895527], [227355396510, 1868341420, -9123966392, -4785718340, -2088955086, -4893728598], [171701868346, -6499622082, 3075234380, 5424100678, -6476908032, 5058637736], [-285940252248, -39076255898, -1002826584, -11838961414, 502793806, -2443117614], [400828934127, -13229031321, -1299317043, -5492345456, -1224415049, -7383679704], [764582028758, -21123105666, -3163609328, 571504794, 1810376198, -1077342918], [278048235570, 14609389884, 524277432, 12533045932, -4896607658, -3387909218], [-8660234348, 7920242774, 882948584, -1570940958, -5782042202, 4881851114], [3715027731, 16182386240, 306274229, -2535663597, 2355019751, -8757145662], [-388267150959, -35326650292, 368429379, 1226491721, -2848037305, 3012780540], [-734096913844, 57222365060, 6624453275, 1175049733, 3527912886, 832164379], [565004573664, -3125913600, -997555428, 7347074060, -4641960978, -1188988622], [-480002078698, 61727112828, -828146876, 10577265408, -1056380824, 3320761916], [-135427329552, 25255257046, 2252265432, -11079431478, 10016593130, -3900277946], [179237381075, -41723876940, 2608074247, 235840537, 5716237179, -6223157096], [-961840013485, -40885001528, 357760561, 4258293687, -6455778895, 1381613544], [136625476550, 23389657954, 4076394094, -4518843480, -2031634980, -1514273702], [-301189933830, -837783510, 3559317174, 3103094792, 4444952146, 6154303384], [-328993149543, 4635984090, 5279742532, -5210645882, 15105011925, -266128091], [-363648277018, 3697702960, 1067667050, -4130427450, 6139102424, -1637720650], [94994228006, 53081456904, 4337716665, 4470337443, 5708968080, -3167989809], [511454243571, -15260541739, 673657771, 4651698708, 4155056455, 1411291542], [61925808433, 1996352125, -573458315, 3178571146, 2445338411, 3300993888], [507889555540, -33457245968, 1594833236, 4061037844, -5006755302, 690052166], [-473259356135, -9952110814, -3199654112, 4591291306, -6684781909, -1600377505], [-381177533056, -85997482132, 1810100897, 1753688631, 204082710, 2733604845], [-279435476462, 51421816798, -6528503556, 2294911726, -999678720, -2736962624], [-13881224890, -21355467686, 6040740400, 5467589678, -8121726152, 875198396], [603787885389, -61669832349, 6930469369, -6072061688, 10517598085, -9038942166], [980431821596, 27431317162, 3347104536, 7512342214, -107032860, -507067240], [-865141743807, 925643940, 735645819, -2772859143, 2174581839, -4628113124], [467321408284, -19332029944, -9727125986, -6377013470, -1973676984, -5058333046], [-800985409092, -19169868232, -2443049415, -6211578613, -9852987252, 1202884939], [-369609998605, 59767763808, -2085943848, 7848790948, -2609264549, 4520157115], [679831051844, 5867092440, 438999452, 3828199068, 7353546932, 4799940952], [54947636991, 5502519995, 8778913145, 5761702640, 3250587311, 8367914988], [132653571210, -37228492100, -5203275476, -2881878040, 6722437800, -5165110876], [112040628840, -45253955366, -1764143542, 7953148524, 251477002, 8498353364], [62942950301, 7796794682, -10153946746, 4020154052, -11290948165, 5471347497], [-740674082834, 59876636244, 921560748, -3006556888, -4498953036, -2336859336], [13361004732, 88507501492, 621826070, 5168923518, 3557772596, -3905475978], [-883560912517, 79179698725, -3372156881, -4566611992, 2722034331, -5173348898]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_69_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_69_8_a_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_69_8_a_b(:prec:=6)
    chi := MakeCharacter_69_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 8));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(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_69_8_a_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function MakeNewformModSym_69_8_a_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_69_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,8,sign)));
    Vf := Kernel([<2,R![-936560, 171760, 44592, -2364, -441, 8, 1]>],Snew);
    return Vf;
end function;