
// Make newform 49.10.c.h in Magma, downloaded from the LMFDB on 14 December 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_49_c();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_49_c_Hecke();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_49_10_c_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_49_10_c_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 := [8963293398458481216, 1282950647298147456, -744297532540383840, -90637606103367168, 26209670720799040, 2306370917243232, -467753893701144, -23235313319744, 3963633390800, 54819837928, -9779568598, -53910056, 10505991, 24024, -5242, -4, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [364394247664764492960105745847727648, 34638112607361769555634391604695360, -19907622250935193783046307900024624, -1256462149469663348964199376491200, 363128197465771328942270420498872, 11899213341242578304518988953072, -2312427721768176863802479808252, -36906140978515566772200104880, 5232086378028191244086493599, 55983736737892766070196404, -5420662674405204892532547, -46038132289280374217696, 2657954907191104151041, 19795343656796193696, -502663496718792953, -3495845062716468], [-1605963507827767551915208287276274814566589884092149689228597056, 3980510351697584008672482876115854355648693258359531253172698656, 222684933120949330780019563976152530344323187362314820850219424, -90690895620288502107170169500856316036713416951483641818487728, -5593516629906883255584711174101269351361948837039102327507888, 1413668153480525648939763015259307958917241194033508478502072, 55575367927902267302546979295892350242810227538513654324712, -11118600139308414432611455015467451457604294735418235553372, -129198344090597988967719191477357796632566881175600042324, 26991345053851320802356139546933957922333615857935112634, 124739995606525069950683773588557534675811426512071070, -28820693600925077136371322644834761787291590666033793, -54278780316430068000072937615877309098466978140780, 14338772866994788375073460000162337661086609793902, 8751026016142921105799338673754133959509303134, -2731161300103103636989135600252594649919024347], [1192760598632262532925573101939537128156049919971061391983469537984, -10576615996419824616872987720417894458864953016745483125916630688, -579340060754466599969371160649502406418505355610597706409363232, 241985176629140948524209804439106580488842619633464143281193072, 14454375745052752248447488429602431984769244510933270181426448, -3786708365749478437659872756304330671605911007620463321638040, -140952531777828867487196019723711428902897096498377829998344, 29870130935648319250511678173178660586996152650966757843724, 292792914994276727826190130579430723822316589433598251356, -72564017475206193678500782719981241380890028193278354370, -250065578755548009584399637456117915717490426972733790, 77536538709297568972970012277648006756372696929558965, 93685036139907935312743579358577210422193877748804, -38608304431974656997491144879426039773496151825446, -12166411519869546903257483253366625953901144526, 7361003513186267735895693585098376914847187639], [-2280929776707391298991499782098773393542134459832277205684805079584, -130715434016817309905432165879672764889189970011910627799446401472, 72641056391497085116603892445617392972121904095884553493849052416, 2408948907939887533529607304533317796677871278705836714943153424, -593533869020384116347517895585360256393481898763202623936264728, -24846028286003897041023546785430593832990548583842989540143280, 3757004783382460327428620295052359416417952088030437822995512, 101507584198611112329024911488449070468625895794811792815124, -8848553139246910028437394389046212262911826893415310448174, -190766870848357873172147857866732639104174609935002647116, 9435386316266867803953701258607867180752765403055531932, 181278374498243459133563430181381789409784252425725981, -4723616410851096883097000049308441056736136758041282, -85291748063336265543611737154696785781421667868204, 907811591437847142229109656357478664052421563816, 15847763074889662518442705557132594116401417807], [-4527935608465895913253400206375723915919394084130518250243339555680, -405939478572474318739571364956677361413597851929836603261025176848, 249864367056862877051006347144408028660304471350710932353276172768, 14139674284775469887531750351905561006871466265074532976899918464, -4612288714219425220212138218099545039304478137357669236421967560, -116784907538718859171821179877285129952737506240960121483221740, 29811597010913640169279229918301807082758345315611019869076832, 203265251328737814157722305996602748496593981812536897745308, -67122363803729564043824570447089734304042917468186733319926, -72359968196294214470757482141566715577882367287874446007, 68861335705904224491513939462595479597352328077850340042, -94949606735778541848604096331708082244801165850366798, -33390095157884016651711351315019230144311710815134518, 86571593889928344890650480464016885296559782047299, 6243697128451916998698035283371531059342948078342, -20054954913930204035899332790826795910563297150], [-1608202903798293194799937254242792770532057823240575736139387392, 22371280207848911283830233382596372792059754344223518247162624896, 2135052839360518747696465902786765300874879468787273276511228960, -1193215765331149792159477454234379009443325955487275549204748208, -83195760962948084276530635137004101722381729436551611082029568, 24569980503168616565718004982309394917692855673066077592328448, 917502156674917987914637446937653641867094295590971486349176, -200583022112525081592800530391368393485168688462915728684612, -2153670437413507901550324749749896930998744854490654314328, 489224882989288045834217729019270432700613902526005697908, 2071882472214678715586969330069811613732493807609385870, -523191631591133224415028960869408171744109604603466077, -892152985595097204436822724489983993911111333615680, 260554331899623200225124865548881047983901364181692, 141306325046482523050817823938148966398594263838, -49669773871133165124617472317406517701117997111], [-49119912331289551351032737985539071680077211743022164645901489408, -10851329952396123455452907674951974445031129764904867107926071328, 923003808064691933582727510158546980065205639817594235377544096, 398505978867162007749125477634636574783433386616871989695948656, 6533351745669772153200781507098508160816861261132150072181376, -5908490309759399835988764063700152356118668971901762277180568, -115946446602213139336144435232341592625377353835753937898664, 44223310607512431401233854923239824624855390559442751468012, 257911588616459331433233340056879928239637034293928590232, -106023231846628913181400493788544719288083328058322588946, -217779802678443837768169421093430569106391168780418802, 112680862884081670352508459554664073284332306761564189, 75105034279196817216692523788927160024957686359448, -55951211408717339972684008835159690324481708641702, -7643131697836279138444976962638387661835583866, 10649706929122981567716761058347321574518442079], [-1605963507827767551915208287276274814566589884092149689228597056, 2051068652563014022223950693587039158548324986097245256671217824, 222684933120949330780019563976152530344323187362314820850219424, -90690895620288502107170169500856316036713416951483641818487728, -5593516629906883255584711174101269351361948837039102327507888, 1413668153480525648939763015259307958917241194033508478502072, 55575367927902267302546979295892350242810227538513654324712, -11118600139308414432611455015467451457604294735418235553372, -129198344090597988967719191477357796632566881175600042324, 26991345053851320802356139546933957922333615857935112634, 124739995606525069950683773588557534675811426512071070, -28820693600925077136371322644834761787291590666033793, -54278780316430068000072937615877309098466978140780, 14338772866994788375073460000162337661086609793902, 8751026016142921105799338673754133959509303134, -2731161300103103636989135600252594649919024347], [-10596380788370810863049006416330858349552083281598340601534262380192, -1236389834336053694756459293686408010050923116499194983924694208928, 682851861931511595801882452649052858281853309820236612115007263472, 61446133446431898638798950475461914501096798381266643078230773248, -16759216482692700359787211460897917488147115944131153812821601816, -953510463715084609769997882480386806787333794303232158289526728, 176310182965514056820712180831798897124657806984810165407308940, 3629160408789277227563331122251732608843059807944019852807472, -457814647087274258749747986508977014736915143220494367258194, -6287502917717335516657186378242840060593821377998388470570, 504125245249059248835012630013798383569991391606245926085, 5662045945353564299854791855273123979909509785643792956, -255658373894003933570846973732789486790080635255387750, -2585956518457244055783900050114577466717702805971042, 49387871736726240966231709607177925262840759431623, 474357232225661057831260838787954853437707111972], [820459275306552173513083394342507914100369914467198911272655347968, -790052910362910777510255303706929838211995857323974655829755706912, -44217506336990087145678716566581907924517018086427964523506848544, 17997023711168552052046437003642948589386092646043812257023073456, 1110675292572537282204121379739824971945235857390245293049896896, -280466247181226237618403993951813659824237961910688013182154296, -11035922692619683436952354470848882519232733924905990734915752, 2205020969887550400665200820983211250062949272471112374027260, 25668821801383042957484460331769829157610560642000983226432, -5345646595357222799951198296567743765869624817691256920266, -24806164537498064574839294216259856412088882679679169010, 5701930849611180173868528829230717857510471223242519833, 10809197203807147599657367991471556985144544606763632, -2834553908192224470353705205158979994045173140963374, -1746300086112296064288463893062165256878634861610, 539577806597299955294020778635581155396924608083], [-245542589583449156336593482330239161682027934933383467484060464320, -50652734382656640788177152768042386260817029455309516243404634752, 13373828063089220095353819611257521318426026784928967076702335040, 2896255345506026624614368280494498516230927916858957659955540336, -270413445189955566953752921296020195880986906397354280045171600, -58979619569518245324400732125733759379569232592564352846764512, 2390846258237375559968615848848336634623893579327453424246080, 477737098093258596926635046570305547053332879005408154879156, -6603252831895269934891776617807776136793132081555037098500, -1166094029862805139433654995689585294558518057542736637028, 7953041177102317551580298752250098723959550678991162772, 1250424195220924561378242222411573715624383661800990377, -4416704936479522392584041523424389298461232241385060, -624942733823258493606821501682399888460340941242676, 930159885018194901942538684193832594912598477448, 119624513203392629082199450457284106622417680699], [2874733490889198445394307977354945704341318283693408709125016064, -5531753714354181547916317938471281087254854763828987783314912000, -840152339104886321268221510327614104749953228957573001443322400, 375743175681590053342869225063327632072994940118970442954568496, 36113086316045188589301295403189953744786871121853584330600448, -9566458157465895581860477683400258100568680667619804484095936, -502630937821797339398446002914642105091337691726318393419256, 103831588569394027139754415413142078057748147566019059904676, 1221994663298148813835938874572515406981390766271919445208, -269998005404243289965031940746115322828668443940657252876, -1190893839706318935113467120718867094965620150148272110, 296471061332894438457995703138037184570276661666526357, 515810182148166638796776991900220104251000366680928, -149725259937126223083582343448462814720644634009380, -81883976353730466242057968900883594003866528478, 28786927079589013617751059908309671518040601311], [-110233798018965378072404932921565090796830028464680091457841713504, 2499132081294371242342874159381662354535241254594814183031058351808, 204098912850521637156301829854246903856155053551968540267350854016, -107883408592991830274213408022858362614292077621872709152871442448, -6081258305785936245625264653888966035027583643895230070038917256, 1671613418168867288366913609687180113498854554251368810807016176, 62087773666291673109680059683651513036181152195182884298706824, -13072179473018523709988341746512856281270785835436820147168020, -144357687548888099079790742135350746522995266845477813497498, 31671965922828982809400058570037899292613034682211001098588, 138830289180760237930921895648197862018815783948293558876, -33782845256869237486676839728728464407463100222835718093, -60015087713562131878705686865327922386597908760706966, 16796194750071232100368638390670259695076538959409980, 9581176289501003418804673733090252656027548969824, -3197749535816103641621843177283284605629532386367], [-1916382474620109941079911342731581569059932977655436736247826330080, 1642714267968015416213189380812861047034976716136388323675749955056, 294503228335327742750974930235061581328850717408478154961219922352, -102778552624558186935473665996930876328380027511434442285960599360, -9612658394692002696256842427421840668138855460183142122538751704, 2234359143630087224974569105812782186736110971943019479759495348, 97729816286177806063348398557419195596983312720116304731704684, -18590787670654672593790051070921032444556697634019935019559332, -228610342771358505277055687304735287326608373687100773447702, 45460150706860125395310980278468919833219985761024638491841, 222166976635783618564681486630502434920443331462068334059, -48610460825929089913358437871973017384397599391823023474, -97500993101532071305431949507090185542021278253552654, 24187755817218763328402591545752330373219053833640743, 15907112820447655885761568616898815777514120541201, -4606067591582644916958941460079463096416264786626], [4956720615248132818091823567806339572187326633401027680078132734848, 4925159602073806505423911255468091976530367685064120505269340539616, 249298903474553450898245565305808740778450493203209518728858723024, -378929274652473957131782128559354284744012250240046437340017135728, -23162515547639471233199922889324287258113004135104305576826454208, 10248665109703889173149857741576560837970917299608743014677496664, 389089751022315661624425109780844538038249225865506741972055932, -111088538327284348754812007412539550348295375894670695910410428, -930878968091675338651954836418143216798030719036230578955772, 288598890668608003424551257943204470666023678866455524745934, 865633869606828077763405403088784714067700930260720563867, -316744009976595112428020223911907830138376052223566676023, -347164210766988758157753569541821417403529565641592348, 159919815897277378366919706002087748318381359932559798, 48497695061389050848515890058906963970586636656333, -30741744586228596152581036716329928696334470074365]];
    Rf_basisdens := [1, 47734872457932627621161341786435728, 1929441699134569986448532182528815197100368272262285996501480832, 1929441699134569986448532182528815197100368272262285996501480832, 3858883398269139972897064365057630394200736544524571993002961664, 964720849567284993224266091264407598550184136131142998250740416, 1929441699134569986448532182528815197100368272262285996501480832, 275634528447795712349790311789830742442909753180326570928782976, 39376361206827958907112901684261534634701393311475224418397568, 3858883398269139972897064365057630394200736544524571993002961664, 1286294466089713324299021455019210131400245514841523997667653888, 275634528447795712349790311789830742442909753180326570928782976, 39376361206827958907112901684261534634701393311475224418397568, 3858883398269139972897064365057630394200736544524571993002961664, 643147233044856662149510727509605065700122757420761998833826944, 3858883398269139972897064365057630394200736544524571993002961664];
    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_49_c();"
function MakeCharacter_49_c()
    N := 49;
    order := 3;
    char_gens := [3];
    v := [2];
    // 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;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_49_c_Hecke();"
function MakeCharacter_49_c_Hecke( : Kf := false)
    N := 49;
    order := 3;
    char_gens := [3];
    char_values := [[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := ISA(Type(Kf), Fld), Kf := Kf); // the value of chi on the gens as elements in the Hecke field
    F := Universe(values);// the Hecke field
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),values);
    return chi;
end function;


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


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 10;
    raw_aps := [[0, -8, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, -2, -2, -1, 0, -1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [10371, 10355, 0, -16, 0, 16, -368, 0, 0, 0, 19, 0, 0, 0, -19, 0], [0, 0, 0, 0, -734, 0, 0, -98, -572, 734, 0, 98, -572, 0, 0, -43], [0, 0, 0, 0, 508, 0, 0, -1432, 1791, 0, 0, 0, 0, 236, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 765, 0, -624, 1979, 612, 0, 612], [0, -307024, -32200, 0, 0, -48, 32200, 0, 0, 0, 0, 0, 0, 0, 876, 0], [-2293991, 0, -48520, 2598, 0, 0, 0, 0, 0, 0, 1329, 0, 0, 0, 0, 0], [0, 0, 0, 0, 11314, 0, 0, 11080, 48726, 0, 0, 0, 0, 136, 0, 0], [0, -1068205, 215496, 0, 0, 12738, -215496, 0, 0, 0, 0, 0, 0, 0, -4701, 0], [0, 0, 0, 0, -93916, 0, 0, 50344, 128007, 93916, 0, -50344, 128007, 0, 0, -9208], [-4538389, 0, 217344, -31288, 0, 0, 0, 0, 0, 0, 8139, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 32294, 0, -78672, 55234, -8984, 0, -8984], [17576268, 17540120, 0, -36148, 0, 36148, -123296, 0, 0, 0, 5062, 0, 0, 0, -5062, 0], [0, 0, 0, 0, 229647, 0, 0, -272344, -115825, 0, 0, 0, 0, 67836, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 48650, 0, -388750, -458266, 29513, 0, 29513], [-57594178, -57602738, 0, -8560, 0, 8560, 577272, 0, 0, 0, 79734, 0, 0, 0, -79734, 0], [28657802, 0, -6822416, 38712, 0, 0, 0, 0, 0, 0, -19518, 0, 0, 0, 0, 0], [0, 0, 0, 0, -146752, 0, 0, -20908, -1975161, 0, 0, 0, 0, -212110, 0, 0], [0, -95900214, 12628944, 0, 0, 28840, -12628944, 0, 0, 0, 0, 0, 0, 0, -64290, 0], [0, 0, 0, 0, 1898049, 0, 0, 1131256, -3805271, -1898049, 0, -1131256, -3805271, 0, 0, -187368], [0, 0, 0, 0, 0, 0, 0, 0, 0, 2718584, 0, -228392, -1613733, 312496, 0, 312496], [0, 0, 0, 0, 2277436, 0, 0, 1165108, 3569089, -2277436, 0, -1165108, 3569089, 0, 0, 166586], [0, 0, 0, 0, -2585094, 0, 0, -1037330, -7569110, 0, 0, 0, 0, 1488963, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3808082, 0, -3188152, 3155762, 237992, 0, 237992], [0, -160538986, -27311416, 0, 0, -473584, 27311416, 0, 0, 0, 0, 0, 0, 0, -982742, 0], [912509633, 913275727, 0, 766094, 0, -766094, -57626712, 0, 0, 0, 224073, 0, 0, 0, -224073, 0], [-1442134931, 0, -16491200, 605854, 0, 0, 0, 0, 0, 0, -556945, 0, 0, 0, 0, 0], [945726146, 0, 106861176, -1278560, 0, 0, 0, 0, 0, 0, 1651758, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 22485847, 0, 13737976, 1304473, 571760, 0, 571760], [653252306, 657903310, 0, 4651004, 0, -4651004, 28272848, 0, 0, 0, -416462, 0, 0, 0, 416462, 0], [0, 0, 0, 0, 3524937, 0, 0, 7444080, -20436775, -3524937, 0, -7444080, -20436775, 0, 0, 4015596], [0, -2139553622, -110850320, 0, 0, 4313944, 110850320, 0, 0, 0, 0, 0, 0, 0, 538232, 0], [371781774, 363991038, 0, -7790736, 0, 7790736, -96493032, 0, 0, 0, 4160082, 0, 0, 0, -4160082, 0], [0, 0, 0, 0, 46710074, 0, 0, 9570734, -76507556, 0, 0, 0, 0, 1646819, 0, 0], [0, -642989213, -202852272, 0, 0, -10848152, 202852272, 0, 0, 0, 0, 0, 0, 0, -3446115, 0], [0, 0, 0, 0, -20551330, 0, 0, -31150560, -142790482, 20551330, 0, 31150560, -142790482, 0, 0, -2496520], [0, 0, 0, 0, 0, 0, 0, 0, 0, -40370298, 0, 17152810, 32378696, 2362617, 0, 2362617], [7132859158, 7128065110, 0, -4794048, 0, 4794048, 275825000, 0, 0, 0, 3809934, 0, 0, 0, -3809934, 0], [0, 0, 0, 0, 47061314, 0, 0, 36247610, 7363340, -47061314, 0, -36247610, 7363340, 0, 0, 4827523], [0, -8027996106, -20498544, 0, 0, 24287856, 20498544, 0, 0, 0, 0, 0, 0, 0, -1775502, 0], [717561317, 709950043, 0, -7611274, 0, 7611274, -286677744, 0, 0, 0, -14950749, 0, 0, 0, 14950749, 0], [-12704593356, 0, -32756720, -26515180, 0, 0, 0, 0, 0, 0, -2637986, 0, 0, 0, 0, 0], [0, 0, 0, 0, -48466006, 0, 0, 58306472, -77332266, 0, 0, 0, 0, -7294000, 0, 0], [-20393993998, 0, -408501432, 16182888, 0, 0, 0, 0, 0, 0, -20584782, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2092316, 0, 0, 42897176, 276361360, -2092316, 0, -42897176, 276361360, 0, 0, 8626840], [0, 0, 0, 0, 75212377, 0, 0, 2113600, 201890897, 0, 0, 0, 0, 63130196, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, -204115010, 0, -139677566, 420015928, 20283613, 0, 20283613], [0, -17663354628, -199370736, 0, 0, -21576184, 199370736, 0, 0, 0, 0, 0, 0, 0, 22310716, 0], [-23455895848, 0, -691238712, -11204864, 0, 0, 0, 0, 0, 0, 19879124, 0, 0, 0, 0, 0], [0, 0, 0, 0, -107874732, 0, 0, -140832060, -28885479, 0, 0, 0, 0, -21185730, 0, 0], [0, 0, 0, 0, 323008865, 0, 0, -51125144, -262584279, -323008865, 0, 51125144, -262584279, 0, 0, 22437488], [0, 0, 0, 0, 0, 0, 0, 0, 0, -173117224, 0, -17177984, -778224231, 10540384, 0, 10540384], [-17379387458, -17463423370, 0, -84035912, 0, 84035912, 1424745376, 0, 0, 0, 20830670, 0, 0, 0, -20830670, 0], [0, 0, 0, 0, 349890278, 0, 0, 87091474, 709939284, 0, 0, 0, 0, -6621611, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 75301300, 0, 134372248, -427046464, -52740536, 0, -52740536], [-46897395634, -46830643314, 0, 66752320, 0, -66752320, 1938931920, 0, 0, 0, 37164180, 0, 0, 0, -37164180, 0], [-12929572200, 0, 2567935568, -116950928, 0, 0, 0, 0, 0, 0, -45548920, 0, 0, 0, 0, 0], [0, 0, 0, 0, 277237647, 0, 0, 180230544, 566278143, 0, 0, 0, 0, -40303296, 0, 0], [0, 0, 0, 0, -115521434, 0, 0, -231572838, 928282, 115521434, 0, 231572838, 928282, 0, 0, 106506463], [0, 0, 0, 0, -36271577, 0, 0, -335676152, 1089946263, 36271577, 0, 335676152, 1089946263, 0, 0, -136360120], [0, 0, 0, 0, -1109418264, 0, 0, 35935504, 1205892376, 0, 0, 0, 0, 25464192, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 621747604, 0, 480453784, 851277609, -93774608, 0, -93774608], [0, -10091148032, -4647497216, 0, 0, -8207740, 4647497216, 0, 0, 0, 0, 0, 0, 0, 62953258, 0], [0, 7708729775, 1135540608, 0, 0, -355726776, -1135540608, 0, 0, 0, 0, 0, 0, 0, -28489335, 0], [135297499765, 0, 755032896, 44995066, 0, 0, 0, 0, 0, 0, 110566053, 0, 0, 0, 0, 0], [73362908569, 73502492617, 0, 139584048, 0, -139584048, -5405599840, 0, 0, 0, 25230225, 0, 0, 0, -25230225, 0], [0, 0, 0, 0, -467200086, 0, 0, -94974558, 2521228028, 467200086, 0, 94974558, 2521228028, 0, 0, -29631417], [0, 0, 0, 0, -1125065104, 0, 0, 845862484, 660720135, 0, 0, 0, 0, 16478230, 0, 0], [0, -102644065150, -1097631016, 0, 0, 679648160, 1097631016, 0, 0, 0, 0, 0, 0, 0, -21594254, 0], [0, 0, 0, 0, 71011384, 0, 0, 542146648, -771038300, 0, 0, 0, 0, -45756392, 0, 0], [0, 227524123306, 3215310864, 0, 0, 163793960, -3215310864, 0, 0, 0, 0, 0, 0, 0, -76056312, 0], [-27477127571, 0, -17296315008, -166744144, 0, 0, 0, 0, 0, 0, 51789717, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1003158458, 0, 766864368, -8197652762, -33977984, 0, -33977984], [12444356371, 12097410765, 0, -346945606, 0, 346945606, 5338115160, 0, 0, 0, 145187755, 0, 0, 0, -145187755, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 2418542782, 0, -298807154, 1632197612, -82851161, 0, -82851161], [0, -123293896887, -10712477520, 0, 0, 222812450, 10712477520, 0, 0, 0, 0, 0, 0, 0, 98900917, 0], [0, 0, 0, 0, -1431608188, 0, 0, -1412118796, -7941287293, 0, 0, 0, 0, 149684162, 0, 0], [0, 0, 0, 0, -162869257, 0, 0, 907054848, -9574997689, 162869257, 0, -907054848, -9574997689, 0, 0, 553880], [441838221914, 0, 2507805168, 127140176, 0, 0, 0, 0, 0, 0, -45788892, 0, 0, 0, 0, 0], [303392014368, 302953996816, 0, -438017552, 0, 438017552, 3291855656, 0, 0, 0, -193611988, 0, 0, 0, 193611988, 0], [0, 0, 0, 0, -1053195868, 0, 0, -101753008, 1918264165, 1053195868, 0, 101753008, 1918264165, 0, 0, -2313944], [0, 0, 0, 0, 0, 0, 0, 0, 0, -4613894688, 0, -3727052664, 1377273668, -89097312, 0, -89097312], [0, -667754373222, -2711795448, 0, 0, -872862576, 2711795448, 0, 0, 0, 0, 0, 0, 0, 219444510, 0], [87329182582, 0, -11820289760, -1300154336, 0, 0, 0, 0, 0, 0, 358700648, 0, 0, 0, 0, 0], [0, -533039915595, 27247697376, 0, 0, 136854054, -27247697376, 0, 0, 0, 0, 0, 0, 0, 478955979, 0], [0, 0, 0, 0, 2446073642, 0, 0, 484641738, 5593553168, -2446073642, 0, -484641738, 5593553168, 0, 0, -758652277], [-513969422196, 0, 11904561216, 833088736, 0, 0, 0, 0, 0, 0, 161582004, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 2133032857, 0, 1078762240, -4932595145, 15149972, 0, 15149972], [0, 0, 0, 0, 3512170054, 0, 0, 1270067320, 3141274586, 0, 0, 0, 0, 1361995448, 0, 0], [844690888596, 842793935092, 0, -1896953504, 0, 1896953504, 6327196296, 0, 0, 0, -402230328, 0, 0, 0, 402230328, 0], [-1071825960102, 0, 2272854872, 366095704, 0, 0, 0, 0, 0, 0, 172803482, 0, 0, 0, 0, 0], [0, -770455388838, 3630570408, 0, 0, 1600781768, -3630570408, 0, 0, 0, 0, 0, 0, 0, 72192678, 0], [0, 0, 0, 0, -3274130880, 0, 0, -3700807992, -2735644908, 3274130880, 0, 3700807992, -2735644908, 0, 0, -773693208], [0, 0, 0, 0, 0, 0, 0, 0, 0, -5273158938, 0, -2314737986, 23247925580, 661324695, 0, 661324695], [0, 0, 0, 0, 396146004, 0, 0, -4434892372, -14050741705, 0, 0, 0, 0, -415331634, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, -7004934833, 0, 5118986152, -11360228359, 303595180, 0, 303595180], [0, 468736865702, -36514850304, 0, 0, -802574632, 36514850304, 0, 0, 0, 0, 0, 0, 0, -53330796, 0], [-1088416617035, 0, 21885047088, 2089855800, 0, 0, 0, 0, 0, 0, -564287091, 0, 0, 0, 0, 0], [-1784315087208, -1783601721380, 0, 713365828, 0, -713365828, -15306411184, 0, 0, 0, -1102367338, 0, 0, 0, 1102367338, 0], [0, 0, 0, 0, -16581908193, 0, 0, 413811896, 2294872079, 0, 0, 0, 0, -1147649604, 0, 0], [0, 1010283947467, 37922429296, 0, 0, 2052511574, -37922429296, 0, 0, 0, 0, 0, 0, 0, 1624147711, 0], [-203105147849, -200745127641, 0, 2360020208, 0, -2360020208, 3668864832, 0, 0, 0, 993792543, 0, 0, 0, -993792543, 0], [0, 0, 0, 0, -2841323568, 0, 0, 10341811260, -21901273463, 0, 0, 0, 0, -406087974, 0, 0], [0, 0, 0, 0, 19448854677, 0, 0, -4050252304, 21358340789, -19448854677, 0, 4050252304, 21358340789, 0, 0, 1568328468], [0, 0, 0, 0, 0, 0, 0, 0, 0, 7864159952, 0, 3694394408, 22931393531, -551677316, 0, -551677316], [859617209244, 861699033452, 0, 2081824208, 0, -2081824208, 49827890320, 0, 0, 0, 1484777428, 0, 0, 0, -1484777428, 0], [0, 0, 0, 0, -16459451336, 0, 0, -316243928, -1422544821, 16459451336, 0, 316243928, -1422544821, 0, 0, 2538705056], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1499996892, 0, -351143472, -49667504620, -2425536096, 0, -2425536096], [-674515159929, -676436329895, 0, -1921169966, 0, 1921169966, 19772032728, 0, 0, 0, 319891119, 0, 0, 0, -319891119, 0], [2867196119247, 0, 27599360608, 1426339070, 0, 0, 0, 0, 0, 0, -493330721, 0, 0, 0, 0, 0], [0, 0, 0, 0, -15372392691, 0, 0, -404925648, 29663859021, 0, 0, 0, 0, -710132448, 0, 0], [-2581900166762, 0, 55094214816, -123965120, 0, 0, 0, 0, 0, 0, 2628082974, 0, 0, 0, 0, 0], [754662213383, 756450172557, 0, 1787959174, 0, -1787959174, -142233674640, 0, 0, 0, 395342087, 0, 0, 0, -395342087, 0], [0, 0, 0, 0, 1586507633, 0, 0, 5867828792, 2306884297, -1586507633, 0, -5867828792, 2306884297, 0, 0, -5181484676], [0, 0, 0, 0, -17520872518, 0, 0, -15103317672, 22295988662, 0, 0, 0, 0, -556783088, 0, 0], [0, 6453589260481, -40241986520, 0, 0, -974367634, 40241986520, 0, 0, 0, 0, 0, 0, 0, -437364983, 0], [-1032792749023, 0, -104657048240, 3037769400, 0, 0, 0, 0, 0, 0, 1560402633, 0, 0, 0, 0, 0], [0, 0, 0, 0, 7969406798, 0, 0, 3080159594, -13022657358, 0, 0, 0, 0, 3472390793, 0, 0], [631358120986, 0, -187499320224, -324583460, 0, 0, 0, 0, 0, 0, 1376501082, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 12025897682, 0, -12259630974, 71457940024, -1259424143, 0, -1259424143], [-2407188755906, -2412212333978, 0, -5023578072, 0, 5023578072, -70357521256, 0, 0, 0, 147546918, 0, 0, 0, -147546918, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 15734378007, 0, 14416661880, -54983455079, 3196897752, 0, 3196897752], [2386518773255, 0, -209196318392, 8599093290, 0, 0, 0, 0, 0, 0, -1815154065, 0, 0, 0, 0, 0], [0, 2992776551123, 242530679016, 0, 0, 5390300818, -242530679016, 0, 0, 0, 0, 0, 0, 0, -5325156429, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, -31968343450, 0, -5114834144, 22533699234, -995013488, 0, -995013488], [0, 0, 0, 0, -21225732098, 0, 0, -12782997920, -102908589202, 21225732098, 0, 12782997920, -102908589202, 0, 0, 4074075968], [0, 0, 0, 0, 0, 0, 0, 0, 0, -60165600394, 0, 14907800174, 24250146170, 98962007, 0, 98962007], [-610886981151, -613288338983, 0, -2401357832, 0, 2401357832, 164467234896, 0, 0, 0, -688525047, 0, 0, 0, 688525047, 0], [-559043002278, 0, 32199855016, 9095908640, 0, 0, 0, 0, 0, 0, -3453182810, 0, 0, 0, 0, 0], [0, -8153229719496, 128612495304, 0, 0, 6883933600, -128612495304, 0, 0, 0, 0, 0, 0, 0, -127975980, 0], [2976270730041, 0, -22131068088, -8782532786, 0, 0, 0, 0, 0, 0, -3676140399, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 40477729660, 0, 547463920, 99504304555, 1321431452, 0, 1321431452], [0, 0, 0, 0, 35060197332, 0, 0, -29158994508, 10036175571, -35060197332, 0, 29158994508, 10036175571, 0, 0, -235303998], [0, 0, 0, 0, 13282062130, 0, 0, -2503074990, 25543331134, 0, 0, 0, 0, 12799615313, 0, 0], [0, 0, 0, 0, 47069075031, 0, 0, 14639480016, -55902739777, 0, 0, 0, 0, 9916280724, 0, 0], [0, 0, 0, 0, -63272956270, 0, 0, -12712930258, -530496860, 63272956270, 0, 12712930258, -530496860, 0, 0, -3125089171], [8849919992583, 8837123498297, 0, -12796494286, 0, 12796494286, -207967458272, 0, 0, 0, 2601021985, 0, 0, 0, -2601021985, 0], [0, 0, 0, 0, -5760765099, 0, 0, 8451297456, -90320846251, 5760765099, 0, -8451297456, -90320846251, 0, 0, -2896092768], [0, -3149497042926, -429504623616, 0, 0, 13179606440, 429504623616, 0, 0, 0, 0, 0, 0, 0, -9905801492, 0], [-562789945240, -538131772960, 0, 24658172280, 0, -24658172280, 6743333952, 0, 0, 0, -3106593024, 0, 0, 0, 3106593024, 0], [-7845482807594, 0, 189857466904, 219938488, 0, 0, 0, 0, 0, 0, -440352178, 0, 0, 0, 0, 0], [0, 0, 0, 0, 30735680430, 0, 0, 32634005070, -38905268466, 0, 0, 0, 0, -6847167753, 0, 0], [0, 0, 0, 0, -55596252554, 0, 0, -15785473032, 39443755426, 55596252554, 0, 15785473032, 39443755426, 0, 0, -4103753840], [0, 0, 0, 0, -84291933714, 0, 0, 53271747018, -8822449748, 84291933714, 0, -53271747018, -8822449748, 0, 0, -2813265033], [0, 0, 0, 0, -1921274380, 0, 0, -4447908436, -36806581979, 0, 0, 0, 0, -7145096066, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, -19826004901, 0, 56253083288, 114370256285, -747544912, 0, -747544912], [0, -2161198211918, 557251092544, 0, 0, 10453767520, -557251092544, 0, 0, 0, 0, 0, 0, 0, 5177859902, 0], [0, -6672855649769, 72059767320, 0, 0, -17800407470, -72059767320, 0, 0, 0, 0, 0, 0, 0, -3557277777, 0], [0, 0, 0, 0, 101753425256, 0, 0, 13468801948, 69188979747, -101753425256, 0, -13468801948, 69188979747, 0, 0, 9172514750], [372948384222, 0, -466306040856, -9704928320, 0, 0, 0, 0, 0, 0, 2534223870, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, -73918511662, 0, 18430376928, 142395712006, 198178672, 0, 198178672], [-2278392065042, -2314802711498, 0, -36410646456, 0, 36410646456, -263783309832, 0, 0, 0, 441880686, 0, 0, 0, -441880686, 0], [-8319656223486, 0, -15598254264, 4971632880, 0, 0, 0, 0, 0, 0, -4765976058, 0, 0, 0, 0, 0], [0, -799009885836, -441401605824, 0, 0, -10422080072, 441401605824, 0, 0, 0, 0, 0, 0, 0, -1569051156, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 104123611644, 0, -7261392312, -309426896649, -16805671620, 0, -16805671620], [0, 0, 0, 0, 9422954216, 0, 0, -6598832884, -148630569999, -9422954216, 0, 6598832884, -148630569999, 0, 0, 27551629570], [0, 0, 0, 0, -109868461334, 0, 0, -56742147058, -205375465650, 0, 0, 0, 0, -7363958869, 0, 0], [0, -9724801829287, 150534002864, 0, 0, 9456153224, -150534002864, 0, 0, 0, 0, 0, 0, 0, -5420946329, 0], [-10832439459960, 0, -930018529760, -39513948820, 0, 0, 0, 0, 0, 0, -6712272914, 0, 0, 0, 0, 0], [8290742610948, 0, -964129790424, 11692230320, 0, 0, 0, 0, 0, 0, 5078324376, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 30499075545, 0, -92647496840, -79204821721, 7359284340, 0, 7359284340], [5112274118290, 5110242606974, 0, -2031511316, 0, 2031511316, -33768887552, 0, 0, 0, 6548434754, 0, 0, 0, -6548434754, 0], [0, 0, 0, 0, 8517170598, 0, 0, 10066910728, 460896822322, 0, 0, 0, 0, 14172169704, 0, 0], [1131143457092, 1131067689884, 0, -75767208, 0, 75767208, 312584450256, 0, 0, 0, -1044652740, 0, 0, 0, 1044652740, 0], [0, 0, 0, 0, 90192289954, 0, 0, 7959861010, 98337007942, 0, 0, 0, 0, -20680638743, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_49_c_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_49_10_c_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_49_10_c_h(:prec:=16)
    chi := MakeCharacter_49_c();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 10));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(997) - 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_49_10_c_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_49_10_c_h( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_49_c();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,10,sign)));
    Vf := Kernel([<2,R![1827733504, -891635712, 396239424, -21717168, 1551836, -11814, 1995, -33, 1]>,<3,R![49216456032885882989925734486016, 0, 80792894435490283078285908480, 0, 119238827475081531827324736, 0, 20679134685517728542304, 0, 2567996739416353312, 0, 153894640052792, 0, 6685098888, 0, 92702, 0, 1]>],Snew);
    return Vf;
end function;