
// Make newform 80.20.a.h in Magma, downloaded from the LMFDB on 04 June 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_80_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_80_20_a_h();".
// 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_80_20_a_h();".
// 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 := [8077617181385444, -341671644076, -214954323, -2, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0], [-2, 4, 0, 0], [801487176952, -116307691, -9844, 1], [-837599102536, 115505659, 10180, -1]];
    Rf_basisdens := [1, 1, 63, 21];
    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_80_a();"
function MakeCharacter_80_a()
    N := 80;
    order := 1;
    char_gens := [31, 21, 17];
    v := [1, 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_80_a_Hecke(Kf)
    return MakeCharacter_80_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 := 20;
    raw_aps := [[0, 0, 0, 0], [770, -1, 0, 0], [1953125, 0, 0, 0], [-37055510, -802, -1, 0], [583743480, 30013, 1, 12], [14355806030, 353176, -173, 45], [-116490440790, 9046312, 1615, -255], [406204540156, -27289661, -3287, 876], [2525417417670, -12463606, 4181, 15900], [-5450727045066, -1191600548, 122434, -29982], [17379398451484, 2057985400, 118030, -20880], [539175142082990, 7701758328, -1074258, 707370], [341914322809986, 11265253572, -7430271, -2030157], [-723867339791390, -31147493443, 22025162, -3408660], [-435167501427150, 83194734700, 108337, 10511400], [21063439244576310, -436123391608, -360751, -19487505], [-38209535764103988, -498766573567, 339338951, -7625268], [52856326647837542, 1161409447776, 472572732, -64456956], [-164229995318636090, -847327379073, -814130202, 62371380], [-220780580600086188, -6839853449706, 628820808, -82332264], [81306681809470130, -9863317222104, 1307161827, 89277645], [212564213824099528, -2135895681492, -6684976344, -22818648], [900731320887307650, -10628540026885, 10157467472, 155391660], [104637074991105306, -9319805721384, 11403516402, 2449034214], [-3033879365040758230, -224756195294416, 17762034113, 1887104055], [-3018366042419353554, 142630045158884, -31556537242, -6007124874], [1122349795369247470, 136480666830534, 419833437, -13978527420], [-6261377141726203770, 538941896136701, -24458586112, 9046877760], [-2509022237685588442, -258584948035232, -145911582014, -16971883218], [21119284532593655010, 413575889301592, 195350621314, -17849280810], [-9805157937898155470, 1981388986382616, 303886148817, 78233615700], [-79325732507002976040, 3049553175335591, -94503822733, -67941860676], [3379131245511279450, 1394531553669000, 698789396976, -108594414360], [32176022113163669116, -699430507464627, -252612773589, -14578990788], [-189117968719295719554, 2714341982243664, -1046767248162, 119061917826], [289156758436470287860, 5448924508208898, -4212762973524, 69967296672], [-75930196023124196650, 1081111497889720, 1915200296326, -249958098030], [91414514578605556570, 6824670533318839, -1943938586516, 204959465640], [1080825735225996144930, 2722176851583686, 4146722472815, 35034562740], [667841016462327137670, -11563108783918216, 6141014520566, -521051067870], [-579147598293653731692, -1120473545191957, 155252932901, 477376307892], [811257165686257306670, 14158103245026308, -11711774466664, -1198986710028], [1745117658662476254612, -24191515532190112, -15576127785334, 3206764010472], [3722044470117053396570, -73173770136744456, -24936159182253, -2858154900915], [5477293408834359687270, -67198538997697456, 15156179324945, 8526963315015], [2717642359335173989288, 156158555978578598, -12557015860894, -662812027008], [9800757473384125306936, -137657755791261277, 11823803300471, -8996563076748], [-379710970961685591530, -231597614959171856, -64261030334861, -28907508746460], [25295130741683855804550, -59308205318618505, 29163096923442, -1947141396240], [-4902846012869738125474, 104582860325049596, 20303297174492, -44384509896], [20454088623042584240130, -365485197629306544, -56295716731167, -16837368061065], [13641008935623395013336, -360248226653932988, 6564050313664, -17880769855152], [-892393890428707294726, -1011069453906417268, -13992900046171, 39678160752903], [45073293774197006869800, 395699336113124305, 93026887425685, -45444703426380], [7998795876001847301810, 819121562788783912, -289079973229130, 7328298258930], [-71007050202323149177770, -895064239527880754, 114163617711085, 54271822764240], [49570077693992059161462, 1446612697016423024, -413658776258512, 26883847405536], [71981861486199607053700, 1018393635681819372, 263500085484414, -4767890376792], [-31750722060437562968770, 1151093412221501456, -275257924818922, -247872429317430], [-76268112038365909334814, -407350901288903524, 1608360341263547, -51898485625071], [-167833639567068280239230, 2243908986729270769, -307036156525358, 7273427625480], [143939981705801794858590, 6116851123937929848, 25542335108628, -92019994357260], [95912380990520590749910, 2200621382420643507, -928986555313302, -317620965289860], [222121439704314816362748, -10336133447276082886, -679300925942272, -589196950941864], [96221671460688191851610, -1852183343696636608, -1668869610490594, -582938490736110], [-393514516835493509611650, -625771260191101600, -2121477525162937, 164503266394545], [361119073718848601991952, 6878197421388749277, -3490767738581571, 1463946454038348], [321135330362301985516610, -11974445268557599168, 3027448988905226, 1417752472625670], [-229743320225151583283370, -397182489318452559, 10117495794847056, 562028856894540], [31220583122114728628390, -18230315030719034532, 828925071311496, -1935514764215028], [518998319255238049088370, -1761362237702623776, 316397165455098, -1729977791625930], [-86679465520153820247576, -38108493801407878034, 10428930325184122, -412641256180656], [-1428564951359384932421510, -28164005024863178772, -4567351411064703, -1577092118646180], [-316011792611016282152770, 26745630339934579376, -5631775592183806, 1784390482857630], [-1020385370386404847671068, -15001099095610588895, -5301177551108405, 3137486327884260], [1582106171261053906218390, 75549375716491992008, 7833938184796955, -1231901709431820], [-1182209476587846162167394, -15633331716158395904, 130301300490232, 5691666789897864], [-1750515658206901650883570, 51262677458294107016, 4245756788260715, -4233263867418075], [-1095948111304076141977230, 113962530890345269080, 30668150536551360, 2640952829787720], [919409041999917575085794, -15101418541276878628, 3095775087245939, 272719351337433], [1362044315304077424478356, -11449768808481310465, 50525460895375985, -2598765433703700], [7409056757818656091482926, 104138900351688922752, -2993909581869666, -5819984260689582], [-6269415721721921396719116, -74960646430040403996, -36892158689293362, 1642716260108616], [3501914977313235908951930, 124302832751679666976, 63093932456706397, -7005271078021365], [-9550951472822370202633832, -63400173585689411766, 9095969124360558, -3767078082145824], [14782922322266785011777690, 61053257734781135273, -53682002645680930, 7047256796755440], [1463146785387248033979594, -163872959517050545420, -69448174769252815, -7648688481802605], [15440260285695417880070330, 103946686037014943856, 13977673032692388, -14977149886492020], [15686283436719209735110950, 92134308115067991252, -4131152376008466, -15489805423137282], [1289236210925659324655350, -255085807515003331500, 38489740360986123, -26772383723448480], [7010134760873845114693230, -220393094676918447669, 11201012696310906, -2389720285577520], [7949510672801289475757976, -325540236333101169688, -111710676866470036, -7864348714678152], [611708760169967449957810, 152624616873883787942, 183140408797423355, 24868700263331040], [23220726373764100706350200, 598749653980083261685, 25302226296876505, -18655205999108820], [14470775360418033741448156, 154040294278442073051, 228625886426784897, -3987118950898596], [20819168426373821078246670, -298634444673277586926, -15292223105930407, -66376165642363500], [-20330229670082480155979226, 288500350546505532444, 94096111993614348, -50457322274090904], [2304646375518768959082714, 215792365197430929120, -242825286368052960, -5136876872497920], [-32896081372857184712879150, -436295040559922776155, -81264262501100682, -33349004501553840], [77144587387446564181611254, -198555738904414012700, -146044238129563670, 108907611085373970], [-53389167999372035845195850, 1843095034777686274695, 275909684166187578, -20764265205513360], [-27734521033328096144215290, -1783520844547145249328, 544303709069102022, -76919734931808870], [-57276759564119828854170750, -378473778096816441725, 1104135614670908404, -58072973721945120], [-40028146018747355425046430, 1117003113364106392220, 311886818791571015, 139272644148911205], [-63639982860727056538332848, -3115703014170702881695, -435244695200914255, 2447985485406060], [-24402054208097210600350750, -1855701305983112474520, 338948712286037316, -108726947001136620], [14627606996508314273158110, 154783985070812405157, -1046950459241261136, -87100005110182620], [-12100022873458901552712750, -1436825336487522248800, 1403180796905764364, 66526076060356980], [6343833464191731883224960, 5937605187540876144786, 916224662301850362, -128450153367036576], [-121466909824694011800212350, -1490255543922365925524, 913597150412414647, -103882283403558171], [1487594038919955994210, 1650382516063000570032, -432029662734236259, 14017737246119880], [173189877043775070415424150, -3241681939278158661360, -1784205652123442949, -12834795427385235], [-165932966339134210578231870, -2430561526134136536624, 268838499481693209, 148718748781640895], [-102871575619788986910606620, 4560050506317227068101, 301918455770784327, -265369148910637476], [-20185249369174633100366732, 1955925981090711778378, 213589238686248796, -229614670556460168], [-64318167139574899205920278, 477562683281950981212, 1728644476168835469, 491989525236817743], [-331384660059355699408107350, -4188540155158749122145, 1372027442996290008, 217195761680721660], [-145566133994739144021348270, -7696820895193699102114, -328035517760617813, 308654742050394360], [-90531360182586845101750530, 8291781579568522817584, -1918012012615127735, -705644059652872785], [-335104028842427451403283724, 5378318087766888350003, -2217631548013463659, -246419208694491588], [82859205746619520256175278, 3694876204391199280128, 245523115607076036, -463672193703727908], [207794696878598299190599130, 1673089271458185488496, 830449899549092463, 621969996220790265], [47795078930156330570925270, 13278641385272645684464, 3184635560543177035, -537271052418081795], [43151710303888710513934770, -81899879738784879811, -2546730832511980630, 1190925758640180], [150706681956061170271259392, -10310989346083851312117, -1663581018810086589, -1305931778552456028], [28846280304433076795538390, 16065381772375622394272, 39908133267543674, 655931852812148598], [132922464681288531564810734, 11030906642552779573676, 3017501857571607962, 1382238642074646714], [-215652296031564850058353224, -1573865609294261602452, 2977650989581435176, -933756584059612128], [896990919689768689016766730, 20747972124353237744346, -4300624877901025797, 1208722674087782400], [-1103782939638190820774094010, 17477656548257821646328, -964295785467366228, 1622988166460509020], [1074823862956634387614174900, 20156421129279325350063, 4286560193134456761, -2612961726090861948], [892845054447950234385522750, 29169725280449402102070, 13251739099582428417, -1382652810264938520], [-469008959428934311700985476, -12351066572019610557948, 9828172452452926914, -751827276348185112], [1384811972790273826248469550, -37047901602584235718080, 4679498612835111456, -833729681480816160], [2594884608172030158751908522, 37393511978898764697520, -2598746799117759680, -709321985275594800], [656653401442667201322008978, -20782175524564657457528, 5569532251633080874, 3066682824267449598], [321828740032451158283747430, 60977384630843527153936, -13660691855904190919, 853724323034640735], [2697138473232878008265892430, -22552127466576160542789, 7141645814395531374, 2628598007474673420], [1921562783870823668638211310, 2829796012882000044752, -22942948601500207279, 93060493989069255], [1165306391397700790162023866, -76126043465626146649440, -20184760328329147440, 1127033648947722000], [760452207668778415921878136, 126362388338923210662133, 11517738375767262961, -3539462069424318828], [3973175414536059361115053086, -33465140553583991393824, 12296763600171523382, 1833285317770840794], [1288029451262560087214182870, 80989311174207316649954, -15836219129231182075, 1056305614683508620], [1904809168114905629488440870, 59237973999978506831929, 21427967888928682144, -1300937488971105300], [-4225108998192878926066582042, -58299758410253476106208, 1842669040533370284, -1629029189814216492], [-495596339197438938569885328, 65514435228508450237014, 4873280904595660398, 5036882151708278616], [-5989776530362432440712021930, 105594783465964357725744, 10441932694945397049, 5839999816609547775], [172303740897439508735203290, 178240113097328855060648, -11793291920751595966, 2952164756594140230], [3387944342648576370910041436, -59263726258223091643047, -34721118537882424569, 2010742830518057772], [-1709866195067065407819015810, -107303041709714192704672, 18118962802001938835, 8657757860456733000], [76818037774885115458332470, 36751986368354908791064, -21277782704338678604, 10910351770182580020], [-2767366860875545060629225558, 134111427568478312917332, -10320339301082853261, 11541628241481430593], [-3334431969185465275445714030, -7219804487073548152301, 5027904444650297092, 3687735787744272360], [-4209885848158507210051197510, 44527745364222152633618, 9459732800890829987, -3370001564731726200], [9792951560558740037549657710, 182850847191432933627477, -27602529761209084956, -2346980852839726920], [-5152859693976920645914697172, -152312764658012212080468, -1552037644615014726, 8182493377804969008], [-15575760325253430836498433296, 167413957631475303638274, 42703857204235727058, 6488441678484147216], [429619695495076543997784042, 57590100633593139541924, -24743960849230747007, 21714273806828270931], [-39997074488867853851566510, -176620202685969171425072, -100693821047229656861, -1428685291507214715], [-7937013043081266110523789258, 485134405177455592514644, -786035001482876852, -6117356766598707504], [13983116262789336431935726230, -228653977686666032427149, 33264525521873425810, -5953708272501129900], [9569691623221500367135255050, -116313167761903402430240, 74648653508356430932, -13076944471177435860], [-2275312043445389704441899590, 132111463766399985681342, -71335858382599429509, -23445167659330297380], [20874919769697704780176629984, 185786490495407691374909, 80402404403068358813, -24243827360390659404], [6913137360835869040190744010, -154885948956974888993088, 180311387102577885963, 5060632280993106285], [-13718611593740871142706137290, -418261548747158807081878, 79372821126035543201, -15786527267012525640], [-8439754185010443123217258196, 155138274153870369556056, -145361720129595832938, -2551871218103942256], [-2216284656000399100735267690, 654028683681613978970952, -122508512367947965221, -22509831058142031435], [14562724699212871766161948610, -105008507262286786748664, 143175569017567974582, 17030751611819612754], [-3042435605512465846844008410, 299076817266641510677168, 148402871712931300327, -9895187525490558015], [8086038429857095192054283076, 620886894481790576992097, 383430460528313819, 4725914085343097028], [17384325889963889453373990374, -617022653886766595160156, 57831596284165151988, -1522946294513247144], [-1413664110497515393620791412, 59347404575713445019574, -6523481956926772292, 47620223235357521616], [15367006784173732351333924130, -617044018255095685892744, 216936811846074096697, 21031525939277507415], [-33202903824721318760269775936, -171516209718757900324948, 83860894302189770804, 21630589075956814248], [-11699811853736663239188587142, -845295784662290900203400, 158113699281483488950, -2561341034456272350], [-17511548496004651315743190208, 279368852883616182364105, -75787224894296557655, -13095808588125889740], [38983076018113045513439682654, -546893665955724154099676, 93038651391838802548, 87322166583782002776], [-47744314124169014487654213290, 224834438040722565873302, 143006715208680842657, -27501397832181716460], [17581972065544538614874517206, -458788816075309607070416, -306617551902293131472, -3761141860845382944], [-598534473964765497092678870, -467515014180759861682904, 104741994463197760525, -20529032595532144620], [29173025272241075230794478392, -941953982715822191089033, 394841007122772104939, 72748476006817349028], [-22336572314414197180476801130, -757240520924124308404536, -327300482182832181657, -2857683033514608375], [19853081645983341356070247890, -1184050938587616999806552, -553007773420240378697, -10055495696297289255], [37940232257797812927691458510, -993128448976224639257548, -371866629032835023257, 7766068074554735040], [-67330765264661533784845521090, 898920828367258813778764, -37618024670048373842, 712776075619485606], [98166844485382647883724036630, -614097205029109919787024, 29371194916205282454, -51908004891176571030], [34424958739445697030936075370, -1474642328880849529464761, 133147790254302484072, -70241265217029859020], [-2662154437552403304154734862, 684298014516604171004876, 655901450867747120327, 10974040579592514549], [-74300629741679955388465102452, -1214198199477576399841424, 138603395851147642582, -133469206166406137256], [-40521316662936748250539220350, 1324283597040865452968360, 737907421285539804464, 43359745506881852040], [29952853201119342955760716170, 1726592317685930014695269, 573268321801155449402, -32168501195068358280], [-43178873738953060338612875840, -742500508891403558507053, -54238714369394489101, -1919246231289172452], [6094191413817598796992914630, -1907559210590659498885824, 941232216768946123332, 97268283668258844], [27934349397416509958314165230, -3143448639065558145606009, 496143524725067909418, 94713154454874605340], [-91109716434455152967026481550, 2346240376620282788130560, 57215730719907104807, -4026692716765601295], [29658644538181798966704716234, 692295004352554351005972, -179587748972154160641, -50752996752152409387], [25087048664607831905093495870, -1031166386561994197496816, -1167270912319070243793, 89724716372269766745], [136718253181528900893237776610, -1328206311385483296313088, -409744978234533794108, -124676203017035187300], [-116265896111695571062033974450, 2969833021273827018247630, 611123798481607420525, -59663345804779263060], [33178964353435853987835140454, -725087833060342210078436, -640287571156515813722, 357612316474003880286], [-89007525576176318812930857452, 285797285897860626273036, -121895773803124680498, -73791472421663637216], [33275257632027026768974809830, 267724878790709773835496, -380073803823466743813, 94704227935293243765], [-26055017291149014046341644254, -1007409482190936980366400, 1465849972963095411120, 32088683299542654480], [-147780064535948844402425978580, -3556100792267759769932859, -1022035730210730945453, -59287552727294352156], [34501049898154692726015146790, 542571574094315784711208, 496105664574854322796, -160331894279124413460], [156959143793428648292139061792, -2757336556950488709950960, 1543994440441936945000, 421330345053991826040], [-123642317277692525761976579190, 4384148476082995373082367, -16832163969128914088, 454179903910717023180], [-343329791858951045078216790294, -1427943162082333557183144, -785742458192405443638, -88588953052400899506], [195829559121088611534650819584, 1789451007069041903771725, 177557315989850369365, -257881118528757811140], [32677624285102677796591990970, -4207343391759945511189096, 603188177582565873761, 476757138903200712975], [-216758827090393631294477384898, 1205228490079356018393056, 1016360351520573620102, -83473028828368373046], [-17152107814318014913069336010, 7887248113948943862165498, -1536421347105012071679, 19905267956294316840], [172206586602751553019272652990, 8722715494563171234429153, 298837021780621581660, -285203161441580762220], [179120484497766668395328770032, 7497727038559108919731054, 915206950063942786078, 16224267550982066976], [-377873351944418261191694109310, 4651465109953726839947220, -326535886510960197855, -179244094958509316925], [442326446514995154143002408690, 2991145943058768749681948, -645996148565176612267, -320190662784202184700], [258976942388184240951374222898, 1626192006103903082923336, 634411675857969559792, -3738868548313794456], [101077403796762631367985339330, 3682367908035169588035626, -1856775609493018046965, -284555700463448217540], [521179824980188233947275452270, 7897945956609076390687224, -2318300725936413914727, 355241242720464289335], [305597662544565407611014767966, -7640086919831707456619968, -276285989943605452996, 940775879638154477028], [424550116409992266294613996672, -8976549957704182730696166, -118585276772755927062, -901992364439157952104], [130193007932076209960821523922, -10424157707966018077756408, -6451367555865440727166, -256400160890883049242], [900886994003552692091913296350, -2526052324205587445787660, -190483880328590964213, -131148653214675386220], [-437907297713674908346392306690, -13827476199983885046843813, -2694630414188769186690, 930265584809441760180], [-89946855069969076886037859378, 24441607135964484180566704, -1653858820922204593832, -262441804376235763464], [683382091325149675968817458930, -7613826962902589173026744, 4431715982629960829661, 1790188339968506743875], [437454346433481132003429634800, -14862101869980769764894360, -2978059243470550223280, -87788362324155472080], [876840759963820078758357559930, 736050177501097577689126, -2114889372496530825605, 768904009745951165220], [-576373758927171198640261329456, 13255990345776865773183077, 5265886669380998625269, -119305457447717350692], [-954933106456557004340565600610, -3183255356377530888153752, -5096500697495695850735, 192650857010622880335], [229042712402589744938035452508, 3960462602812947423369483, 4735857702082335663321, -1162972954219232484588], [524132521481581163452335109012, -18309736191259378554408448, 1557134993758233589154, 227854950204474933648], [157401319158520198759712940594, 34555515400459326920651356, -4432492311898779090173, 867536133742555475529], [387784968355175665570909710490, -12275733214937280743097867, 1642417387482554817822, -1219346733742612716420], [83429035345353170668616852370, 6100999163121087983122484, -8608649446123601135611, 114850160511150028860], [-291437609319836549764105965862, 15847009803918130318646916, 2081971281828244336077, 31039119961525672839], [-606067903007496073051406182650, -5777227224834891053971560, 7415577549874276268991, -715944215217542562015], [-1213436796621478697708866520940, 8338505209447470252037977, -4377219449730207047901, 12331901402655281628], [-140210235373009594117749060900, -5167637055734400818425954, 2799071864770552751132, -102293174858690094336], [541160358466956769779779730210, -5966960657002793692095533, 6744657646039563588640, 259973360412436011780], [-215460109664022128917513470776, 13801379526243556581626193, -5929903231723567590939, 3951327366432322182132], [424834531843672753983850789630, 26158741669702614620078286, -6182117506781166865719, -1180680267382274763720], [820739484720336083804669148470, 9905176800737102097491676, 10456694165088469662552, -2097802031232189495876], [-1743163426122086498835909651390, 549237791994602295923552, 3711968847264382351922, -74119201316475707970], [-448683395773753816446840973656, 9143270683039422301115058, -3851637509768820693714, -665849330911966471728], [-240539854310269009343579151710, 5891286459139503704170288, 7618297021283858469433, -265271742736952601060], [-1587466495024304995950716813088, -4919411811488595949918577, -4253146552157668255169, 758851853683461850092], [401588155576004458502015470396, 6587303029987267492605397, 1109099344415927197219, 4682957141107685584428], [379304510449134607855582364550, -26925115884173764584525380, 4159123343835083051251, 496378002920719541640], [407619029754327610715814601790, 38620476606379260268263528, 23216430622292836710543, 932946685798094457345], [-1175410765786985292012250016382, 30078762650065748595327200, -2127937511518029393160, -227100161294691455640], [209892493035779172556048869810, -775090280622579672327698, 12455686343838606915979, 3003403325143267991640], [2064076168897390173217459540466, -11784435453377399616207468, 2771300270239793005419, 1196800774663369735113], [-1546146682706590063861558263210, -45798431996727945705117032, 17583990958213422049060, -1647276875233705046460], [-78664316024838974844524227668, 3283962604215786525177683, -5334456598480847079679, -2122312839278855708388], [161391147423892157150162105342, -95458935376421409901107516, 7105182349146849562278, 1407289385939769541206], [-546830922424939584759996979850, -26427263858413895376874095, 2220903136456313579352, -2631202425330190263660], [-2194322353307492924160270729330, 28113587910666377601360304, 3690711986022927838978, 486875715637974857310], [-385709701092001351330987699990, 14794076882036450006296032, -12526007256397020413448, 3851007393207624645480], [-715571058368862053744210292290, -27837534388947780922995848, 3972976687606786166563, -2278671635890320588240], [-1013052624091087328629691136090, 3965242071680116586003247, 25412632617553029774498, 1960013436241971824520], [3996821241944620088212203019646, -11238794205559658835193716, -341587298879983368012, 1147651676139774361296], [5428028135267245810305045644870, 27338973605318048518530544, 12937795665631634875444, -2751597183501263700420], [-1712229112677067440229989622230, -36073449942937664098061096, 17218476873426763388473, -447583124437354946505], [2145217017301686521322733683244, -19585036249185434989287585, -7401158714490549541395, -1112618945283023429940], [-1475011772276506977006781604106, -72620321894634985348533764, -16127603985701405631068, -2373188353057243791696], [-4827612899997355266770706678, 137682892906319002959235752, 3957549910030553630844, 980989847810378098908], [-1544508388784566206852349697510, 12877247299990851094811913, -21128720345758654879818, 5814990007570719902040], [4165690716678682294063642383150, 88467909847573384960402920, 12921687803181033555666, -3169665842379348299850], [4682427501707180907208387694582, 3440424148580337903971380, -2411728485441625909880, 3187213741040247082260], [-3654876668902073725048891468850, 81772576739944312154769675, -22754539310556025755414, -3506975580558542246640], [9032620322119639924418186712050, 16840394477646404082216960, -16072298007392759958027, 626598732312238433235], [-1571966538862836714624647889536, -19402475489129842246979976, -2838264075580656393192, -2778051850277970050784], [-1330695885664391609993472867790, -30274641199137671534262568, 13126049049841364751068, -6846983851238263603380], [-2250929326286940666033149624930, -92464867516248994635449406, -6535294257122996883987, -5550996030611486853720], [-2726180632618939799118365334450, -128675200501947093828925015, -11452940172872933349136, -5410135818237909537120], [3083170784777673956439463112150, -138230364411816898696568836, -779641513327762629742, -10115348199313333886094], [-680136930621133629111324538222, 157236107599851277465894604, -10059383600333688276937, -10038127867288708830459], [8005967702255355081587497794888, 9616947162515326220907427, 50374185593321344045399, 3435852745765968884028], [5874405421841304527568902331870, -149260663780618031413228336, 9237720015000263853755, 7562037512766390875040], [1239278889451442522800001974924, -130342313398971955055293986, 26799026946557827916628, -10720950178029762936864], [-10828885277216213212496919279750, -88674466725080159228741870, 9928681053328457666191, -4768087511087164895220], [-357408991067949449045096050498, -226515138000882479049017052, -10902491924766539521884, -7602210100037575998168], [11594509824262433089235144366590, -103156637891747670820492347, 28378477751352367802880, 6456986255920299729540], [-5080308509366015290776796190964, 143831054737021761101301932, 23288976984430666308314, -4670809379323094617632], [-1644407716324747321694345276470, -27593510859514228630475384, -82254015284914620529301, -3395270420907595411035], [1650830159355772052946031509510, 179941425620685926537278832, 42788512451515471978607, 519145344756126776505], [5457260488238791510896877444480, -244511589869166571737324750, 13011386765871988680450, -7368526687719424060200], [4503799942486900502033402323242, -30231119335181031060161668, -8811880725671190540391, -563435135946660689277], [3435100036879611697735367880198, -236619191587890638743116192, -39205435924048908117714, -10363048870438640696478], [-9510167243042512643997751369170, -330512571795043079613970429, -40430457589754640988138, 14656875454208635006140], [-721285309877695124557336182510, 224402766762420555442848248, 56446010053171592204957, -8956583217278663109165], [-12573962410538440837054185022008, -12382443820403317068062995, 29935035352766929506905, -2267751759702948222900], [-1712360496732722895272545591210, 91318087775821818556384728, 80193312283961711754876, 6501378941675086558380], [-526110820870876153317252339978, 92052452180066353228454464, -1292904353387566695302, -3299891454248453568234], [-5897829905270740370362883083268, 238857804758311454696315368, 40713009562764847295566, -3535621591797373418448], [-2307565996179362794283365542930, 124897814427455509235057304, -53002596540865574568240, 38731991336655157984440], [6126435567359857038480658247940, 50554476516462192018477825, -51621139716745368225045, -1511265088883018230380], [8445042706731800674742375174110, 334174521463344672832046367, 1785640551110525538534, -20577092515457175751200], [-7899660140078022667189945346470, -201428318403420278285008824, -69985323866610041299704, 15409651936274717226000], [12038496047747374563094499479110, -76753116414555936260653528, 5111895553851407746994, 3292616178240745426710], [-575375136793074141528944674088, 389827671556788077892099260, -47776535217888268381840, 3529402436197278132600], [5534183530732325126262858867690, 481245242965281912351443163, -12690499082806157144148, -8764647716024073114540], [9263610374385133708388491755928, -577724140536672922009505511, 24100068789490301069613, -5579208987298777709124], [-6916535104315084462718619728230, -561776104513694289676597376, 34196933819580341983, 12624493445371034497785], [-12750065383036898740282145257170, -96597295018090451283550659, -56279546182439427586836, 991932819260588258520], [3508794471554747882871191008550, -194171098048222332782258676, 84443549428412339688018, -38274467640844719329694], [-7028224318249351790745917243256, -171305300392536987806471334, -59373201673838887444458, -31132573800915374993376], [11682161928581558176831672610030, -761204869125854253286835784, 95964717626180983240482, 30956813836641096537750], [5511356335408708373451682860150, -673779696436310305661144300, -48001111072704526475777, -34511243241587718152100], [-18782633782725657259720506467250, -663634030749135281317894852, 59383515985190757342776, 12137629595730458085372], [8514063747801514702596102659010, -83882122733434094930331976, 127759581187247104517108, -36983111670536617143084], [10716740122917227677776902856130, 31329720858344662535805751, -83954240481217503343208, -13072050998896806609120], [-21096809854268098991082407542590, -33153304183472108161060698, -61395202658061791472033, 37934661194862615195060], [12651941616567739472632963147946, 785580693005650174457751928, -171257938331876465125034, 28039748027173084312962], [12485941535941082647873117450764, 244307840663127904246977595, -80216757980222031018815, 49716154284198524364660], [-4576351683122539306549290826692, 244134302211016808690420080, 183204937305749897728270, 7960309512143392501560], [22183232126696437649526407958770, 100727981487654636225979304, 131599785793561315354022, -18196131493421994215550], [-19551414126228729320671357791558, 971231158320651610022644364, -13373842695096242013967, -36460178431260811533669], [38167452930683207595838027480912, -159315284298701801703701277, 38068752533778536573211, -27376416645605498147988], [19768211215592929740176246464490, 797832775200317993897583688, 1820744474738331786532, -33875431546699767932460], [6181541432814165586596613358790, -98797356220513268921033808, -513026318952169342836, 78612005747166274037028], [-2427094509762908841261534088970, 850143728473065071164978816, 290402242082483524020463, 10733531998856079465720], [7142682570390751416957949043850, 428615779012543040937281160, 344534470585405876746690, -9986622350114979521370], [7924917616649155490725873266266, -111192516972500236935910404, -29660974168032550033983, -5640074126322592856421], [-30938713225657255744478861733092, -54020228382926135384602233, -278479790598548024469771, -30084889693196201209212], [-884114626766420824117905483350, 1269363238972410546230790225, -134458034493546239363010, -17940988772105046720960], [-10909134651512547382430899994910, 232394921167500560136949568, 58821204380315305820381, 65138447198001265142040], [-17367664823783867016792267693450, -319465080788864498859361240, -367510343511377037947377, -48352844194545747721215], [23734267363180036937569448204870, 1226161920197463085736040432, -271334233979620182295026, 24108821556774156001458], [14545590758057561354083830626790, -542205010960698633077520552, -254766260665157874779028, 51123933436960047953340], [-1552460361606059467827889050920, -1537941918378493698979646288, -61760187072988332145556, -58788644887993760411232], [10192137663782191679659333398930, 956369365391722849511380911, -87151256838428067054588, -55448342278929831298620], [59699736278991062989810546808536, 657894826647072008664820317, -279848288776649917601271, 40481119692595320933588], [-33851109592969676719931181509130, 2108897392537310322218796849, -131392586899258822700484, -44192535341540759053920], [42335260509795250045689169092950, -317618822104813965308069760, 33281936561798189910990, 66102441632250344225250], [-68194674262473071288721740862750, 689222805479652547589763000, -141533156028505464831480, -45802008876226117140000], [31796909225525606288558816497106, -219003127287104573382269060, -227262787995401949458645, -4898203354186725140415], [77215589544248946565219220820010, 219557334113808639774858972, -311802235405231452220467, 36375690332748262058280], [68329925482407244388313584908910, -972011019751029990791981848, 17275378307697417154328, 26199079476860696611680], [41246015381388798737760730136490, -1639413806975144654088855312, 16217256556739812140192, -91296621637294057636560], [-87160860485301694982122492511346, -468633878002314871460004624, 375755122240512711311142, -41724096562084124801766], [-56180310439353314732398489859180, 1139487723855943041509186294, 89778239856077658223328, -74854089562252794086784], [-23138547330350778990973011053610, -948523006844535071945700112, 130414476176130882593942, 36510697806541137852330], [-6363686867107614549011434584468, -437311075649542532188584481, -172746263329471009904707, 73647674253987292504476], [29867386304809570896725547288350, 789481559514361341425418192, -641567439105771263306436, 71395343537884486892628], [-51692058044671536760095160607930, 2391315297584209785161669549, 328911375971561232823196, -11466759342628714566300], [-11930677478802326426708939694564, -504768623898834051321210380, 235312468295700869178370, 97111753894660806033000], [31952977864407591417052201185270, 13700548729264169981054944, -187052087301907961206535, -66011906194916056751985], [-56368859189824134276547795390040, -210471916965002594160909241, 424454117976114580660523, 62449262392851483028236], [16008215809010665759889067458570, 1890676271134769278438292784, -124752285577367758320498, -96118261796106741690510], [-9267111597140580770946031587978, 1707145957414670994961710416, -72613299078351544459048, -106300808322414536458536], [-32661582482538997916776573725170, 573615098308640364908708196, 94127256187474834789275, -182112302501711796621300], [113358857448448366941070982891054, -1065505430651410903200332004, -216713775243514614101028, -46669770216817706687976], [-95300736462118792710578963984670, -818909352203435042021963384, -470674319161976097184493, 11475970023384496574205], [27727803907044898737204981517992, -875419782777754549391035688, -61960558415491202839916, -143894287822532998417272], [-21549158681795254104379650374208, 3191185597974898858166875829, -40438755174129815089267, -79333785356325019312404], [148006529953881266384129239109610, -252719026971475592967389248, -216460670921333941060189, 43917028263068001660885], [82972055543861155572129059592030, -928633384893782871075865854, -163643407925767725579171, -51150868209004742351400], [58377421119116334860959306885430, 1807533193631154617060869016, -379425056776911398794381, 224973097067805459766605], [-21680679061731706899838226282214, -3094027007020479136636222392, -465477545449479112699344, 109608324493781870150952], [-22468004727533916876581507545590, -713959837427098829745882108, -932763414964119746686935, 58425582591961269669300], [14114154308018626968585743561964, 1390185302471233634501602201, 499365233672781953321287, 100063517918616471478164], [64022582915363269569259558806910, 3212927194493166152204472327, -422884172561240651171478, -116783875623597362837340], [76676612414655748947433539520850, 3531696096681282134557826800, 790111330651674882502147, -78507724846803928057275], [213097206613597393592487413209470, 1217591197530074376459357864, 283801540783213272294429, -105647096430736291705245], [110705478978212111540976387871750, -771848882798462856169951650, 623142972545961132045117, -221035255169592765529560], [108478562732472490964162678960690, 1068518541380846004277040260, 389320536925775641492885, 31147112675130881541375], [31433216831904666569031515972232, 534521477867450949653315039, 1810934022873392925170003, 123562386176083868745036], [-114162381080594083014659917845212, -1143747802961149625720152075, -685536837191099353339585, -20733651945456325249740], [-34144791025830034959674772636330, -230878683671848198050712916, -1402713503126940220570445, 61106548500723160750560], [-126508470108351039942590134933410, -1425567873504278760077909552, 946345613598125744218006, -208560633197346631701558], [100592069142441261157408370544916, 678144619037053403227531914, -408636446458041170112252, 132990726542806956292416], [110789674652919832197138525284990, -2734267703355699104195288632, 272474361697597476156383, -153066703264885394895855], [54857451533104509618583009446492, 92979088666217608433942947, -1166359986817188323135711, -33752683686107825008092], [46231327548906022272566324091468, -8719924237066575197490850520, 184095346600766475412270, 151795661887942620531960], [-48434940744470864425616455662430, -5108218745414662213767527696, -441933656567392917679544, -155408378845817420906040], [-168938615177170966449843457282566, 2504871086132715826885453540, 975502372740648242668525, 178090161399457071627015], [59365010966160284898453755255450, -290315484638735660059369320, 107660079075551851548534, -289337603746884769270590], [-83380851709125310916759670079578, 606187388312511802393758788, -393812832921401438465164, -104635717398012203295048], [613071174366609467910393476490, 1299438298782281372243314808, 34988338534365253433294, -299195245322803824341430], [310396466088462520938060094395850, 538794119684803031968663050, -218839278556382811681873, -144832748049341717541300], [110465539840024016613349413813090, 11125089341104322009181701008, 413288171673940358307544, -250226661214830032670120], [-91753147125776695625469048723764, -1161555354307174425352565937, 170589721114456382430741, -217598002212534458026428], [259436664616250744007525234720870, -853867911626376841487846266, -829516206382858774960639, 221560616397266524723500], [242800053745849033880621109056788, -2216534037570310639901461308, 521489481017511384417174, -185834499966797056673232], [-342208807940501646045790413578530, -4101121250136662367351771336, -1317905986668030718501386, 61179028383716701412130], [-186121777062453206660924540278070, -1064281148754236579379679239, 2111039006644403875621542, -323060567889113331485520], [-339956074102656563828833799223150, -1839017603704451525318617560, -1440647526531472712143299, 127483013676254819216760], [-79762875716756104449995221507510, 6340511376363949096031647868, -880736008868346006439759, -27748601218965065804373], [-70548685163834288534316909218130, -10650688218626986582038194096, 1365056847590400914076250, 68042841444865919813670], [350385694217221110472458978259404, 2499908064296326485068669549, -136594788552652015134517, -270074180940769282158684], [520291977918115585701129482565550, -5870347286166449159328934085, -1010705361198873643504070, -133530349937068864724640], [-154419991826570566110105980277276, 6116810798001514177979524050, -1129572276210692243879460, -84582995920507196331240], [191833205556693825685431876405770, 4321193383103184515014387704, -483485454967247767046544, 520860747814268629225080], [139676321243131859177350081517608, 3099399608509756780351161304, -3475707862311095869003652, 21350619933182948631456], [-3023008567245834762864861088134, -1660642037658430543857620832, 703508672428720338665496, 75575211919711072689672], [287243317193448943171106695092328, 7601093041583685842018127605, -2496972233258342359050055, 70760409332391957978660], [-210321790948126619404533572788434, 3438005508363131597170983616, 1706238856413224630897512, 258047788702336151014104], [-234476242753709926877227443304330, -4776605358541803297647696208, 1597594523103715032117774, -686774572023386446259982], [192743977749888507598020711749610, -5780302622448602969108898328, -2061532785279205341070363, -186327000865873844063205], [-205333584538909467457742627327750, -7686730397280084931001936780, -545433038164183557130271, -158183824389226422597180], [316421298609876846576212429405130, 10163110109058258867451994776, -1815183238364254012627088, 363173917418521749099480], [-386617367218640551032014209072290, -2641373278175422902444260720, -2025032615483390764790180, 116471614093637402105460], [-67472268227931772491802755188780, -790777823872343186400170226, 1380373246985677355823888, -273150741584275968843864], [-55703340527907025444200905831170, -6621841320296777251250344144, 411418714670158649991221, 620228683414239427348515], [122767177387014779554845047024178, -1097608658624032222721824184, 3655624413489563062389652, -458223348592855588951836], [55705092605093958692848384052770, -1518951306162295252898733261, -215380445670948916057560, 143569661238868325713980], [453324123880514246953374094243140, -2708293779820333609064711625, -682574070816964495670535, 520085983469287813596660], [-95065865553709669743613136896990, 4713702338928117114209768432, 576637431186565179959774, 714941583889170716198370], [556074261931991250141820043723550, -6242513978202251057467069480, -171142370597815011361054, 286219899114043899615990], [-288681197498736916852915437414270, 3224110818514064437012815601, -1922726096144855271156710, -866732202778633217517600], [128948964836577765062806562280088, -5679851588316970968739921473, -710053569999307878625221, 811117657927242979628748], [-231223868633990624454220197972910, -10962194317019465246469814952, -3283072727821615123654349, 518991071111635958779725], [214100881872945588004692705440454, 2791043009283872214525106916, 1218219250336951154017742, 639605976680779515060174], [-231952525236783038878616768871744, -7124601057471304932695828672, -1527507624423801609258824, -174320604875560298317848], [267162640403917606818126195298450, -573245377028102857778635010, -2404660416388463059988729, 401186255249672300973420], [-68129119147228102721474389540230, -8888161855023014528487728576, 1234316978079403564532689, -547851140392225704335145], [576334834519023683918085489228270, -12652395343585202054520082166, 1232036699311413927339061, -13270119635241960604560], [-554040942052658479087076237280570, -7085143267571749216260296240, 4798244974696947267481420, -374985092334182220657660], [-1233672335728973419436672335421770, -5367229633245924200772252704, -304356857770128074892785, 281368478218804904578665], [-892182197301832765681870755271710, 7459663458098697603864825468, 2280120645500202407515545, 162586150053140845493640], [706028855140523327973394470200700, 1593976003584045104706718289, -2443616356845942775842817, -388676739044061849604644], [-361506559942475120431160762921350, -5216532664697632236402981600, -4853933553706845145442028, 377540555649369146849580], [46039819442790890605235072927910, 14711238456845761362733809912, -3641394479083902337806282, -382252506638995349392350], [361336734572248443714785486119530, 6657858175271164629790409931, 5209438569398366769686820, -261095375745207931013460], [-498956462757922587719537867894334, -12648206399221455240804268492, -4083507030308903357921689, 53671742128503453085197], [-233414923637138672848706936980112, 7614714528102148027985859561, 1090960067328745125600777, -356542267465296696745716], [364337208831674145264772225073976, -14172284320503162974699218630, -475615791909668543485930, -834636196113182988712200]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_80_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_80_20_a_h();".
// 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_80_20_a_h(:prec:=4)
    chi := MakeCharacter_80_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 20));
    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_80_20_a_h();".
// 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_80_20_a_h( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_80_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,20,sign)));
    Vf := Kernel([<3,R![2048939287964476416, 27175390721280, -3435711792, -3080, 1]>],Snew);
    return Vf;
end function;