
// Make newform 441.8.a.t in Magma, downloaded from the LMFDB on 31 October 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_441_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_441_8_a_t();".
// 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_441_8_a_t();".
// 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 := [900, 240, -102, -1, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0], [165, -72, -1, 1], [-840, -288, 26, 4], [-1815, 492, 31, -1]];
    Rf_basisdens := [1, 15, 15, 15];
    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_441_a();"
function MakeCharacter_441_a()
    N := 441;
    order := 1;
    char_gens := [344, 199];
    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_441_a_Hecke(Kf)
    return MakeCharacter_441_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 := 8;
    raw_aps := [[1, -1, 0, 0], [0, 0, 0, 0], [65, 7, 3, -1], [0, 0, 0, 0], [1076, 196, 30, -9], [218, -115, 37, -37], [14095, 251, 243, 29], [-10612, -34, 316, 11], [-33950, -1741, 285, -208], [-8190, 2703, 2055, 353], [-99414, 3328, 1550, -527], [249, 4592, 1396, -10], [92082, -19143, 1905, -1513], [24092, 27900, 2988, 1212], [372914, 9580, -1206, -2915], [172967, 29326, 4578, -4760], [156148, -78463, -14649, -5428], [-260149, 133928, -8660, -2962], [-126560, -65381, 42281, -7106], [-800112, 27246, -61410, 5466], [-1745403, -158366, -20854, -110], [985802, 80361, 81879, -3864], [2381772, 22698, 30186, 14502], [4171787, 282892, 21924, 9032], [-712866, -684635, -25459, 1939], [5318209, -436645, -11985, 11935], [-8392190, -137571, 62535, 29142], [8572816, 471074, -142200, -15965], [-4607187, 317237, -189119, 15617], [-3358482, 574557, 6309, -43717], [19300296, -300178, -128354, -43174], [8807804, 1016965, 40455, 55370], [-21414715, 4621, 474669, 70351], [-1763220, -8318, -433630, 153742], [-8959577, -534079, 370101, 108881], [-9299806, -1330980, 858870, -67905], [10091915, 404684, -365528, -233314], [27975940, 825427, 534821, -15932], [44948136, -2179407, -293583, 357871], [9697925, -2779670, 613974, -47952], [-45628768, 4077580, 283374, -172165], [11551658, 1046720, 1102960, 102440], [44123446, -1030372, 252270, -192077], [4136783, 3026589, 128997, -405525], [-7036806, -3174093, 630123, 494189], [33490302, 3044362, 2864, 170107], [-37156868, 1722622, 1649630, 239362], [54407768, -4287982, -1115390, 413318], [-82295360, 2387774, 2659836, -182341], [118897543, 10592619, 3308751, 39879], [-876035, 1316531, -2692893, 673337], [91145040, 480453, 1320645, 47883], [25067641, 14264892, 2464620, 282972], [246376812, 15483627, -1628565, 480397], [-29106601, 9656335, -4090281, 962865], [-136595818, -14641529, 1545693, -1115130], [43760173, 8339756, -423744, 1341506], [-113109394, -4603531, -4411145, 160274], [-350117255, 2742334, 1792586, 348364], [166523958, 6943689, -7526895, -1183121], [-49469908, 2693576, -893102, -787765], [-35267778, 25967928, 5451096, 65912], [-387094756, 3778436, 5029012, 1357844], [215828554, -1572901, 2984805, 383384], [248386285, 13759446, 2496222, 160542], [-178244189, 13634726, -3406518, 3189560], [-230299216, 37458993, 798555, -3756342], [621658906, -17977691, 8277533, -320549], [-337863460, -8432369, 1353609, 250196], [455229170, 51889007, 416935, 1131857], [-342378737, -5712259, 16097349, -1835445], [617099818, 13466402, 3371196, -3328503], [-455011230, -17681501, -20951743, 4014166], [-141364615, 2061582, -16078494, 5466648], [-234135060, -37930375, -8225735, 3504095], [23591810, 69010978, 14734272, -2872217], [1044537407, -2860211, 4236729, 1774969], [143483331, 38165911, -17704333, -2681825], [-1004542559, 21296729, 9763425, -1065841], [314381917, 22617393, -12288351, -8168637], [818269380, -16602636, 18567300, -3398076], [325085822, -67324833, -17773785, 2263017], [-217471894, 27644074, 1749720, 5349799], [316126478, -93990199, 32847793, 475343], [-962794542, 68293438, 16000616, 517093], [-268514240, -9254212, -23812926, -534103], [46221030, -65119941, -35519805, -2158731], [236183899, -71129438, 9773066, -4205630], [-2295243858, 55659549, 20230725, -283021], [-1454789888, -77238536, 11343512, -7614248], [-1269568756, 58192003, 24575877, 7412620], [-133528082, 126375539, -35377419, -4429916], [713192890, 104276677, 35492879, 1591294], [-820254972, 61983567, 36939855, -10779623], [-1863390308, -55152461, 23416949, 3270124], [228936672, -107883738, -945450, -11417838], [-1920886723, 71452975, 8388099, -4421925], [80336179, -62707060, 60823620, 3684200], [627796640, 223502246, 32677132, 10491887], [-344355571, 251687007, -27154125, -5366853], [773948596, 85861219, 8730083, -12027419], [1624422755, 208609915, 20662383, 7670271], [-110429912, 97066667, 5907945, 368310], [-3349971107, 201103310, -18281034, 2436310], [256519364, -142656888, -12027330, -12013323], [-460580335, 142529048, 22564696, -19880104], [1063574316, -46298280, 4518024, 1446256], [-1384670425, -99605219, 8239605, -21521837], [1429651142, 84347437, -5946621, 10700272], [-1974476202, 120085333, 37782845, 11830243], [-645913394, 33613098, 21282444, -20610915], [1683530473, 182844949, -12545143, 5095645], [-434532306, -127824177, -91231881, 11880609], [606569852, 112771865, -37832141, 21107210], [5051352992, 210710562, 22975410, 18186102], [2216958401, -89722940, -92091420, -23454500], [5553650428, 100686084, 101241876, -16888572], [3879617650, -271114669, 20430573, -6249176], [-2064174725, 276164546, 102622902, 869732], [389058180, 336475854, 74672910, -16096686], [231513791, -199860568, 144560380, -14560138], [-1488828518, -455012147, -4284379, 2322307], [8280082409, -30518039, 21386085, -16382315], [2781737852, 44511250, 141861372, -35877935], [-464519204, -74884929, -73942515, -11792934], [-1935400902, -309033588, 13601100, 20132292], [-4081731543, -505621696, 57771364, -5761546], [973601522, 140137219, -105605631, 58446934], [2242413904, -276003534, -32220798, 10548294], [353739075, -241534934, -116755378, 38048692], [-1347484992, 358109618, -90925904, -179257], [3804451488, -223127646, 44801106, 36694518], [5097363394, 367639216, 46339310, 18621481], [-3029811274, 125132853, -155720163, 24004971], [7770862259, 54519775, -70911585, 70108645], [-1031406650, 30633375, -259116825, -6535695], [5987630353, -449611873, -85472205, 14097355], [3182715920, -199358797, -77944859, 36836996], [10119181806, 60146901, 166387485, 24615691], [-12020303563, 430891594, -31362126, -11926406], [15801815668, -137599944, 168256680, -14517024], [-3812241089, -386770777, 137498235, 8069523], [-37704342, -841741645, -5302787, 48913760], [-327514476, -885732792, 5904024, -71368416], [10710034507, 94844223, -147931101, -25155357], [-3044932440, -242088072, 292449240, 38553208], [-4755676382, -343484163, 165922389, 78582123], [6621662035, -827363938, -253551066, -27681306], [9596636848, -818050116, 248720706, 13515609], [-10151419970, -534145417, -184289511, 32700752], [-6290030411, -601236197, -165524833, -16108745], [21451511802, -408444960, -226378320, -35040600], [16051943132, 166120986, -33515526, -2925018], [1819192454, 764013208, 143413182, -90691875], [1224871580, 7812525, 54233667, 2762664], [12351178608, 1329805152, -11119680, 43006752], [19370022302, -456098718, 244078104, 22823307], [-2451161353, -771389006, 272677074, 55254294], [-5805665946, 53724652, 396087308, -84691916], [16571679109, 1476048182, 566950890, -58559168], [-11289162884, 86778887, -115472427, -82047630], [14723863398, 535922013, -98916795, 159113323], [-14020875344, 1776067558, 423692342, 39083986], [10138879664, 71961121, -525354165, -138681254], [15661716425, -1924192949, -224247021, 130993861], [25007426578, -925219168, 429814650, 2356235], [-9637272946, 492801399, -425957895, -55325376], [16498688615, 899951648, 8704516, -106146874], [-1305343550, 1705716319, -139169545, -47310791], [4262507345, 2134143856, 199488900, 907998], [-7823255668, 193162675, 297034029, -41765120], [7095335418, -1140896003, 119595125, -76809893], [-18715620854, 677718491, 569099445, 87006656], [31168227443, 1185248880, 42675528, 38102820], [-22120891358, -342255228, -106110846, 185747397], [8547291090, -523716171, 98892525, -145788661], [-507427508, 404090875, -104235205, -205147715], [2805164831, 1610080690, -72183210, 212174460], [-21690259872, -604344038, 528145994, 56451838], [-7790143477, 274234085, -148657439, 90522185], [4900952594, -1039630479, 107203215, 229235160], [-5504006628, 1423345710, 237284430, -244587390], [-6753684058, -766038408, 965885640, 146910912], [-12163025581, -3452632268, 551343036, -55857960], [35871811682, -461069237, 86636745, -100300850], [13134805873, -2152528864, -90104724, -32213774], [16282479685, 76220365, 765064937, -34693631], [28954891592, -1888184524, -597280442, -31389445], [-12548894333, -1605092699, 15574709, -244692689], [39700448734, 983436074, 610524300, -4384851], [-46571422015, -1310169184, -476285408, -28723168], [-27951382212, -4065370818, 233792574, -51014622], [-35723679916, 3696618990, -2649360, -14810775], [-21472550251, 2540307385, 24437325, -112168295], [20739520520, -1239808808, -384433110, 125022231], [40969112083, 3450711977, -320243415, 41520515], [7049081879, -4854472071, 27889905, 128647959], [17355558885, -174497311, 1239081013, 137664833], [-5029435974, -1670862639, -254145975, -279721569], [64064688110, -3098282813, -369309159, -26051462], [4449920027, -1919294999, -437385411, -48702919], [-44161899512, -274235358, -467465550, -4125738], [33464572791, -816771770, 651309266, -130975580], [54467889257, -1415969287, 115142929, -205059097], [-11172060780, -1742609382, -10466790, -9629482], [-14682148235, -149393488, -266200236, -318953306], [-32879983362, -2543088989, 914962661, -128959004], [22561234780, 1003958720, 702490206, 44414057], [-1797259770, -1733919780, 1795009980, 159139140], [76580504276, 1511467931, 150090565, 137991776], [-22902465561, -1645012327, 507681457, -319220905], [-45428191818, 4949079645, 663243045, -197952765], [-59337532088, -3062166788, -867329380, 60217732], [-16289327056, 2383316479, -1678587447, -169159060], [57394182058, -3304156756, -374281674, -151638281], [107074229861, 1445882861, -491206595, 124239671], [49943133830, 2841472746, -1291146852, 141591669], [-35013191201, 3141003407, -965820345, -120955143], [-41580275654, 2031562160, -577542774, 313772155], [-30757979142, -58389576, -1155630504, -363862632], [59548996529, 5149916319, 40650075, 61673559], [-93231904120, 68084003, 60230755, -68688547], [-40096154567, 1261446146, 1151400066, -427563834], [7836976370, -7224841056, -184829442, 56964873], [2804920716, -3464388090, 553095654, -30336214], [-33728683330, -3967409457, -1443286665, -206541207], [-42156946285, 836459347, -312376749, 746128433], [-69816028438, -582606437, 554379849, 463020038], [65414093746, 7596531612, -1795280442, 302062455], [105497772016, -2978991601, -581571195, -195750826], [-46358871107, -1979853644, 558092264, -592581110], [19913537072, 2018018195, 2486936389, -326719420], [-27966540448, 35253420, -2163321780, 363352980], [-42955853899, 1106001121, -442399455, 472118571], [19732603668, 8841803044, -831937804, 317107348], [73133164150, 1298207903, 1939444785, -155768416], [-27181264327, 2334061787, -1646482109, 356110997], [35342735455, -3896733661, 634273335, 322218327], [16826211540, 7439219256, 2641740360, -163954224], [135906622632, -935233185, -319547745, -192749215], [-55792354408, 6467058697, 919788939, -925751210], [-78101220744, 4719053350, 2049073340, 118796215], [-77112224058, 2257156855, -279337843, -299202650], [2965832797, -1576502060, -2733276256, -397029650], [13546157682, -89811060, -2165796372, 608301972], [39487291022, 1621465105, 850674279, 522282140], [29221588424, 2040253754, -1694857430, 33791534], [-112131188336, 10100749730, -1253247360, -404907545], [66280562308, 4765224394, -2389162624, -202022861], [-21132952272, -8511581097, 512568855, 356694393], [113332131446, 1214945487, -637581609, -697470039], [44500106159, 4357149004, -131020020, -387949436], [-34526309890, -4302580730, -44759412, -161927649], [-34435775770, -4743068815, 777183385, 612989735], [-5525325467, -4330626718, 74377110, -79922700], [211039292068, 4907690312, 772124406, 134529657], [-47269936831, 9780151836, 844326600, 105755526], [123811315020, 12708443272, 108289970, 423831691], [-130678001634, -528764361, 2051183103, 129725361], [-34222262099, -4211637375, 198839361, -794396325], [-59619831082, 7713253281, -944944461, 257450430], [-172914484356, -1513083024, -1859526528, 191769304], [-34695387833, -2705983701, 2019809079, -719153421], [-157318745582, 7689970359, 117742671, 9275913], [-95143017305, 1947501707, 1223521779, 809485189], [34921741948, -7151361852, -2314345854, 1267824453], [32039484330, -15828392271, 121367145, 278684199], [52635494082, 9090683481, 1730692305, -710609129], [7570954972, -2688901664, 1508927024, 193303912], [-53667879073, 11602436425, -2536312683, -203467395], [-75026081269, 8742242465, -424526435, -644715475], [-144331597480, -14682967062, 3179225400, -782098521], [-72956692723, -3558952603, -459133451, 1204849535], [100697919602, 8832904134, -5341314396, -39279501], [5452392254, -4239149491, -2116251275, -766014181], [-98420200550, -432576171, -3479199345, -28889178], [136482910696, -3372771565, 2400666201, -797718470], [121868364933, -1097928364, 482606776, 649101746], [-77232518261, -2531104058, 5314113710, -258365138], [-48010851676, -10529119142, 2464406460, 48249933], [-99248781122, -746751922, 2652120816, -128424215], [-114994188006, -4238426836, -1248045290, 367275239], [-98775512184, -16438551468, -6307627884, 105033836], [-122476825702, 3199343987, -1590671285, 384044717], [238593607936, 5379815322, 3761654208, -810393765], [-39532733834, -10048115974, -651143220, 94221701], [60792627703, -9329683100, -1119524812, 252587860], [83674829994, -13355767389, -561975333, -1286947491], [-10062078338, -57622557, -1936347831, 1684460658], [29137536930, 255100299, -469310685, -1638170691], [-101413716709, 10897640053, 2152501545, 1381751373], [-318632364320, -11536248988, 3815235714, -106808811], [19504360165, 7824806864, -2473377000, 925865132], [-155906521188, -14175857751, -849202455, -868970001], [-260920591178, 7955011111, -640716721, -614105183], [23207367013, -2717256679, -3515621739, -145519179], [155207011046, 12781066220, 7783143550, -478649005], [-120505293378, -7701932025, 8456689743, 824553137], [-119627984728, 16870161769, 3830593059, 721158714], [230127756364, -12273101847, 939595689, 257422959], [-172767836715, -3087423050, 2014154126, 797646262], [36371674891, -7013506411, 3525917265, 452236985], [-285965600522, -10692024134, -4054263604, 9949141], [131117206548, -649643718, -6564387366, 220406198], [147306900864, -5716651528, -381967310, 337106627], [-46005809094, 4172787065, 410437009, 1503278711], [382579715420, 951502777, 5363865555, -562998134], [-334781022270, 2434184899, 1380189275, -301245731], [167413087738, -9302956552, -1284636654, -2573393837], [-76323056015, 16414044535, 4412230259, 678725023], [33326642330, -2712727031, -6180395337, -995522312], [-433331456593, 303195544, 2814569484, 1212904694], [90160996201, 23954642117, -1776876195, -627994693], [17797784328, -203533855, 9961041823, 838831520], [-237035909496, 33779529816, -2482137768, -1688186936], [-180697405763, 5277045819, -953126661, -1562081271], [-272505774180, -6695180238, -4776010350, 181909902], [201180917186, 4285498738, 4265793840, -440263817], [-249438454282, -12378928021, -391167629, 163398773], [-232323047010, 3783652581, 977102925, 2326442691], [98471466616, 15080472486, 10865670360, 42022521], [-13012490261, -14865623555, -5750348611, -415887185], [-58259875218, 19570154433, 3205425225, 27566943], [79873631552, 49099851, 710916939, 811348197], [-154290430003, -40541387912, -621589920, -823616780], [-399069348799, -26863068694, 2234217850, -1872327274], [-94518949148, -10508637593, 5399965529, -2399231408], [373260564520, -33492848169, -873803523, 2481891702], [-133672408394, 7677360833, -6984325581, 607572030], [211210031058, 5050536897, -4159912071, 1512938343], [-236780181611, -33161447318, -2627701930, -193967648], [-120386282845, 10876580053, 6024433401, -400410059], [5681734120, -2602902474, -4512556890, -1027436814], [-38082392672, -18257464117, -374706759, -575519890], [89062798204, 34876752568, 6114479390, -1930436387], [-247688252484, 14676211224, 9111703368, 750556816], [380969232470, 24935231415, -6653120385, 1686516225], [-85643894665, -10652815433, 1644019551, -305104727], [-272840334842, 2748489108, 1657312500, -289779732], [-339147437074, -15218250031, 9490859635, -1675662730], [-241917063647, -17776442195, -6003201007, 1127628445], [36341849574, -12646041903, 12851871033, 172893559], [321455375790, -27263229849, -3509810865, 3116387121], [-430141842608, -23957138606, 5055395330, -1219815386], [-4171750325, -8231134312, 3722682204, -2044379298], [-226158237660, 23853272886, -1425592650, 1554518426], [-355184671609, 30520016552, 3395336140, -2060427298], [92664301624, 32364516472, 6067890626, 2546469835], [16578044112, -32333751891, 5340381165, 494312259], [-230976753271, -12783944138, -4546747734, 978746880], [-254266158244, 6234210389, -15597261245, 384363284], [-170512426725, -42949017373, -11104863581, -1391141311], [25419090738, -8798667321, -11028142305, -2289216631], [21987648522, -26125502099, -9906814117, 3523781140], [-268348470503, -27602365034, 6335827274, -834098384], [416812376082, -4848686232, -352162824, 977284832], [766712383202, -3604089443, 1227888219, -543998948], [335964367444, -3896779810, -891998700, 3038251535], [-269056325759, -34125749791, -2999350455, 1170756135], [-130287637992, -43888312548, -8648233956, 631247748], [-7385175594, 28331216189, 5318236453, -3139971469], [-192416296621, -2708257103, -44772735, 3389878067], [-96201412510, -39705789416, -1528776138, -1730216879], [193731099568, -1500397495, -1340200929, 5138859660], [16374401200, -50067867303, -5862705525, -1549498434], [389614706635, 19161730495, -9183493681, 1278788173], [-318312680394, 10839055863, 4104761727, 1412290961], [282325814578, 2782407814, 6977251232, -1443068795], [106358395122, -16582257952, -7680430160, 6780093128], [-439490418664, 8457434191, -5066264175, -3181653104], [-22345414872, 6423429256, -10175011714, 2664623701], [394988215870, -24819595864, 17385440202, 937120607], [451683703050, 37789096104, 3353405400, 1420415904], [184919009806, -21100717632, 4783269030, 3854438133], [73629508189, -476983310, -4676054866, 348229840], [357838900048, 36364575608, -1840409994, -253896207], [549086712048, -43088662056, 7624602360, 905834744], [-362922767903, -17524194333, 12465534939, -861174555], [-201641570353, 19274018914, 4719969234, 2854101454], [569700262374, -22501971563, -1101051907, -3484687181], [-485941942211, -52067790301, 20101057215, 83707699], [226519339998, 6858595143, 13423431375, 1632906873], [-63951169784, -15091758920, 15207376184, -1959524504], [-103435133335, -52392557126, 4306535802, 93707486], [-532052899860, -28423461440, 1858717520, 3297283960], [200790514978, -28054850986, 4578070992, 1764673765], [568435759454, -18621685995, -21020039145, -4294590510], [40005266735, -86326543048, -11111948180, -2298183274], [-432354104080, 11525506503, -18115754703, -1508982492], [-161143213584, 45842186952, 818721576, 1574840616], [-294560619710, 30821196244, -18349201420, 185997004], [-438891596455, -9669730871, -10368264027, -2411273147], [93039226532, -41212685429, 5824111509, -3104689664], [617176723876, -51137621643, -10336151757, 157009740], [-405110441414, 33012368300, 17857661190, 2604516735], [-409329770717, -6754062218, -4902927490, -1164436610], [532074395522, 6817012757, -5214991181, -2085587068], [883982313810, -47730153075, 1095227205, 188370915], [-118160639508, 4667274512, -20302715840, -1395089128], [-608034013969, -9162143453, 10576858815, -3715906493], [-933758755757, -36983482914, -6925493214, 1561880496], [-901140533255, -22075525507, 3545475189, 1541883507], [13692111754, 34086088114, 8392085408, -512423345], [-1433203053781, -23874908696, 4627285728, 979701100], [234478139353, 4384793765, -25853133639, -63452995], [359938488746, 103205245139, 15214265005, -111249016], [-651264220635, 17149107422, 17850621874, -470327656], [362195685798, -24705089925, -11545015005, 6863515525], [-113579270888, -418215210, -97914168, 3084187305], [376042067372, -8761006259, 6616438959, 2010413746], [-736763679215, 86754907938, -3684366, -994867218], [-21172654409, -71795071642, -19075023726, 4818384420], [374361818388, -47132826384, -5345098752, -5779640552], [-606002434796, 20500681012, 890489750, 2325108307], [809619433266, 29910175049, -9741813407, -963863449], [-514595935651, -4301536604, -22743798960, 2392673566], [1002368364238, 21654334898, -15902099244, -3503358667], [696123753070, 24163080030, 19412430468, 1491388791], [-1127202411654, -50437357119, -15376431015, 1087938111], [1480438151270, 30434080876, 20464195410, -631802807], [271051772747, 25315322572, 3742083624, 7038125662], [186762292151, -27196083616, -14912731460, -1109559190], [-1243607706096, -4335337488, -23113979472, 836640304], [960938573700, 37313903466, 23393055210, -23583994], [320718504478, -13948901529, 14851156623, 1527055353], [239847976645, 36142576910, -16530090558, -2274939736], [-229678029860, -35824392262, -2817265416, -7791955073], [909239121030, 37397294853, 30665844525, -6206656317], [-255812592924, 108025379101, 11593968935, -1791309074], [634090878658, -16153335016, -5945243694, 6459218819]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_441_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_441_8_a_t();".
// 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_441_8_a_t(:prec:=4)
    chi := MakeCharacter_441_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_441_8_a_t();".
// 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_441_8_a_t( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_441_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,8,sign)));
    Vf := Kernel([<2,R![9312, 1704, -412, -6, 1]>,<5,R![11594625, 19632900, -90490, -252, 1]>,<13,R![1618193586130576, -32623185504, -99442952, -1176, 1]>],Snew);
    return Vf;
end function;