
// Make newform 2.48.a.a in Magma, downloaded from the LMFDB on 16 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_2_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_2_48_a_a();".
// 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_2_48_a_a();".
// 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
        Kf := Rationals();
    end if;
    return [Kf!elt[1] : elt in input];
end function;


// To make the character of type GrpDrchElt, type "MakeCharacter_2_a();"
function MakeCharacter_2_a()
    N := 2;
    order := 1;
    char_gens := [];
    v := [];
    // 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_2_a_Hecke(Kf)
    return MakeCharacter_2_a();
end function;


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


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 48;
    raw_aps := [[8388608], [-196634580372], [20669962168980750], [-51172881836896522696], [5297430319653102012090852], [-125094137018739417081409402], [-44830025442540925573659584526], [-1111319860561156308410383992100], [-178238089260084834809121532218072], [-30534112362977188191390732250983690], [-110801717324244256756593954244061728], [6203767833063528570721355158143068654], [-35669771283594680742424472586368472678], [338085414102589873498086573597898665668], [-2298386467820046045287393257826261887536], [-29595651085041661560230876234553121751202], [402897770467707194917911296294114858644020], [575153391792220796561057524320411384118742], [-1868033100301939556103984556344225386618836], [55201984112681452831941304628692429011115512], [-79182696974319051005003915162106408285767302], [88275129763458787700378919632160122138091440], [-737730557224622917773365649736040155174606692], [-8277033948537162260782072894676071243017411990], [-61954178934472753824888537150641827226577342046], [121967178312617777504936505228754901719748660142], [165592105135114598042455292418865154438207298008], [-461678148410166039380979302208644682727956369276], [251311239979627713418121736238673166110521158950], [-886375421982703640756439547428092473471038771822], [23594746402338470535711805448302213195717046290304], [35792496239270233665727943342334607396823210665452], [-100525801979628919300987366563723650088124171197126], [-55025380524830035492126477159442968875068333884060], [3783141463749637535548643550785817975672504330750], [-886913245939896944218479997076108776045841258453848], [5520456746698013833426813152517687104922097383937654], [7649126190550666479502368261726103174772504407829708], [-10101955921325226852828001385989608544040661962040936], [-12660778931953065726717984733687012723455237080233242], [153885632694392061602362717615069366866793866763864380], [62525497895368724097284271391368940229206247583910622], [-11199319541397553904713137530996061997781511874630848], [330249216746085827824047538882473115676031014370766658], [335581714566826816828072031975912735663563136344582734], [-453521445085816895393483256955816736755141218970305160], [2348645020238285580584640238733524810878528369320633372], [-16386178865099833654259597188297208632125740432468070112], [6424159805083112657666544260923358226206135687960871564], [26807298064490841714761540089864333883312609266810050350], [-69630745421109884433568158368567731381600062946456294182], [-1136958241978605329373206981456953853809825048649172720], [-108595163446500424867739516462550240898839790889873211118], [363653200332957150673955025895765650893250836602344353652], [218320446705745771473353797243900701644851700047477157634], [1022883667276084604268893339165286277914065316671373413688], [580374189088928507223805220175969475477680113899955289990], [1667646869832579672307525695089150301294791615469786747632], [-3420978888432739492492405721708968630034691811544877083266], [1129128010179873280818609497742708939257121350442006952362], [-7014713536125799873056331793287196460341612163590541162412], [-7391859760327051220771421734796413940696299325946306017042], [-29173493601256478278289145550357006770552051731942434335556], [19648499893417297018429600394625745825534671785777803009032], [53005860505714718171404518542978783463101399174480576564618], [17153265943586847738130144137493364816132066655927464729814], [-307803057663767285629457170045069246716208879881308850703708], [288762741404100512634244707311632027986276948141826005454514], [-366533106661300669948289347617547159920371008377383212330476], [-354128311065969002132217432485138519753398851056764947101770], [456710062716654007599505129510395316901455181916480703067298], [-909803597843509087846829163352568544169889014824213486298920], [1746988771720956396771827725807453341458145963135281595207824], [4070515460643023893828476535428387616537082948492218772860958], [2623077176235105253628340410147231638006215419795081270166260], [-4336384930846571247253739384675091352341773841936672695912832], [-8253517326418807512846525879007443542139126261188782922090610], [-2225019367856166732653946977765396622952190411370066520728826], [10277229464734382624420931848152054728077247829922482484571762], [-28192016896056098657668845492384115832031731370365752631610070], [-31366760297476153864818011752946718063476863106218094844505140], [69982684431268677062210482997229736017660339349284589906885742], [-28294040911140473339185956065226549576262357131688511736685488], [-151589737063332764776033244304864463670156277803310440834007982], [-110002840611939332343994418416588981807640288659774772310676600], [-134507871719517217160745207642254543026088380310309637042987852], [-79258705924835328885870493339594892392297685218557375578743230], [-326629532610321175546845985051860927061953938918904636019379206], [558028874408938596392814381501305666416665377646043840968782022], [576009513114607173691450857461340640287854735558085724250662448], [-490192417647384668519798200858266546991074941134152380906616036], [476619303011017886162425789137309907730180746207727543756505120], [-940089201894061222935858257932007009610469013507029368138819496], [2461805635506022290180051176655006681708239384818781447820217092], [3136297109245430351754880281474475495481345101875468445475679740], [-2012562129101922326711897980557790545627275530987044337202920632], [-7120233291289303201377394264590865374961026788703288416427622890], [10031767352180459178490146673440885516656727512937729003742938042], [-2572692720399063022976492247818543193860679803755880177959471132], [-11717701258836410568278651581041256822270226157139846341099218698], [7701759993633875898282638455001930188958389949493704545780096844], [18397346481528472935895986423951558768616094624857861602351635814], [31633335665744464016639745002872650077932952412005955168126503868], [82426076782906663643525723615557688144372802047629043468827241610], [-40928154046702907617124731642958428095799398948199466277693992908], [-108011658289814300184607920747219224500927423309677238504239732286], [-82752407498008154621012813857380931534999763896031135280213681756], [91337356219041799280474428098071066995502974802631004488843480498], [-93889716638993212748212784551947946481005112350525101327675254040], [-86788396874793999096058896859018497612362764497762865981654605718], [53280116414534603399857282686708719478905121077529761708272609184], [174086820759971466663806858652764180789169490964117679218697269678], [-455159633074408739494406802129877923783503938334918233735004595366], [-256378375321866844794450090397185862031000174670394383666624881020], [-423670667136137786909969869148573184117278813601500228822886870328], [249269032004580370486158046187207573500590748931201161099537617282], [-957846428964634295806018794178323660071966280115748290606925990932], [-365745778005965307508450926247959623758268200562306861606474609736], [-1297094409977260288835632422123522208683075508672193917041031454202], [-1659535696014948210698502941565639022122657486854889155492697992100], [-353636635888976186143270264725554893753905675547330320749163862018], [-759962129905649528145789992198384541654154782372961270764683101342], [168304007861276962834711051108047620030284691298275961301230771054], [-6479818067837235488825075773828872643906598457096428766173694894012], [-8139195780552207900380072817924551939948631297848032585953703299268], [-4135503394065619408151738588808452302998389166955714603153578907818], [5799361490038536998833615629601544466266195486006363815283080159310], [-3817162031414912618783674500557703966888913462956452335947642317520], [-14184019321547552652844019342727593833237650240403934668404808005016], [-3138538995639113553053674758470907391469071698931663309583986955722], [34063632398602960393421409167694504822350863468022177330673235783820], [-16886781290402933460823190230632425465401854617042417858108594202792], [5490677873538783842371258352778633026607601547230816297929533560592], [49534810385001255576884151124652003065917989107212113945975193739934], [-94238633676903641487704860974613903165027910338137097958365039033398], [-71778118410645240542299189602130893059115500200844199459523436689150], [-96095347169897928867914000016624285932361939876540183192099730259442], [86116036945720540301565312713915224383711671770534143818155758325724], [-16530068904328955515845948006564570977806957471750930265831803805706], [292289657672862117501705733573046842707616855728292148689880998586010], [-283385431127856760551830357119468325569524055386262695855429257202748], [-155030540114261931223065761780635778609224518481495676864162721160098], [-272598606478615009670401483160289155484009580046944517921128596088312], [452263271510062984863697313178316578526278335581877047040877718837044], [753936491228574384661248791779103991006102808332352354632921552564950], [-196939103967006434381690808658347434908131687156379273616941726074120], [-349667778960835852616353129444355697263949713152738094652058946851522], [538103368206523478695935198248936073541054995484525497785059253197674], [-879126384973299207367845622200298523171602183754543256764531692707820], [957146033052530831481858405547572880910581200106086459441547812689568], [-1797360543114274692946888825820902527078631694944922589735927701528026], [-76356564318308810787837174626787409574300487236596426929001619101038], [-1090052017755893365770790845842726332655656509488222833264093459337092], [2231197222290156157934429347226846331005560021740023082647683011269064], [340839182836738135405865008430767042047006733729310447507679824065124], [-1740631254958617715031917718271502423498730788963273059225183284131728], [5311092138232328136202426127755723333127247960089475234298828375146920], [2198491139830794101404201469249946676878912383206510243817557578230370], [-3735658464118373483074415787225576360774371688694550141147630327526886], [-3511610368948035681068223235616980311972493716695341773345365547538458], [-1808293587874489230424477181090359676494935506671532667669370371948996], [-5473797392773459188465940271459047769061946598190978416890180548289782], [20369186021030784070567408305891562108733632504897069932262400357579384], [6082616567407128735700257898111464490134924965801705768357013199942692], [-10944004770300051656927649315939220089856507329329639041521974335778766], [20035334581779106295206600498686724018243748996705337900980216196753768], [-19110499104048529127892020192283563602585381415290977972919904768524768], [12412359041971748127899683898510911284646330519389162003490109589296174], [-2483138483843109020524705537677031294685475432042593080895751645925870], [12350286107658133364029166853730932432064216781296821880326107927599518], [-36819305978647171036449564194444523507393193554708039524077316923575180], [-63296280715656459606211535425676564859617856682227070374739509453040618], [43454252156295315595289447564076927338643086382989050231005812766624312], [9625025670738089369336609692369893275065039570680754352234865849988538], [90905332788496341094248666802302308653297211000464800981696971041775600], [-183640459974859088069489557476192832794888275115463265996322975164541270], [186205104612103121271381650589682873458722645416827111224599969538133332], [120205437152017982737385274533377732706769396146142309484589748912575982], [-13294006923515659348564218603120860925588265404289964397624477866215912], [-155415758814849707637392139761646151215849108431430053968461795425043610], [-186776751620835568569996958507482359231665666492415040752536797363904576], [71706563202364038912503673000552112713586150541041725753805077972241452], [183596591313892662413892492115287962047777118752963841830321326196142798], [-159092964713351612869854704819927947750681245605101614179364506906409606], [83575687287954493171094196978925712153550990057134338257225358859598768], [490193902980807711120151844093215434332505936627518907091074859433663550], [96032840656972160264363263810881829328927561755632498526410131761923254], [-230348107650354916987141809103985875129552357556859051420973981865315572], [121238665544968329803626310482208775075956116604239937492397162683721050], [-266632858635291910319144903560121841063557619710454743848293955243678848], [300383065742470800715316185821674951418556622814397680110002465591214978], [-1216872231642321425729780517759586472620346875873309419882635679074674332], [-161489245645862956269146922244174303289599309679447643347339294811041188], [-2322429007164509765935048400561219420387126725667524195015495893816096138], [2491545110964245922923174871390820718064941693067280267405179524550789324], [2167983208785905540812109739049141074964033622501963164526757064579701018], [805155784380867416264026266567208720676476521295465265302995738622393682], [-4093903117173896449540634195333064201301032566574419980692554043284429482], [1096036402675061583777949051467988607623856639564237297174946335844511554], [-4434404574190601606273281178468646936182668593605157384551908960728475272], [5589862086201516019423444988945895825000983100100563953278447087719505350], [-5875409134613554498953460561679683215743295098925301755562619434029173968], [9011101695581231317030519585756963168071668477124522407156734088791807934], [8810227969717940328159969951971637954879971903978904913504966043371899170], [-4347200372042117885817035279430190374645487788401943963564821037572091900], [1644883985548776634338866189684969754677913829654379081117123787244489494], [-3471894060448770142125577362740132549822531568393710579464087720364995840], [6456279343894359942177883328225733513745701748425177299479701814804020588], [3781391637728860803673771597409777053710828057213386701521462340314031290], [5906058658521809906622871498484326475006982653868380236240655038787431652], [-21142777465674035462789145173253765336152940734024486359518846966013336846], [21440141668386180419576237525680164420648373972639101073249623139100887422], [30124070742352056071421106748535245199157651064084451186700746984059465768], [-15977404170715051575353208190762986985647932386122680377265778287151283116], [-24648733910604905802142358318750207998164901122549874908634065536419302120], [-20029831837174221946127278757711315676251637785613553312164954317789207398], [-44600909095979635117829078521549244065697571381054282741420434851677691696], [-26370800110622257388933010417634843391784939013963312957759996388977547598], [73427832899148241113157170120923023414342026276699765124458213216336426984], [557503957522363178131720921041132531187720882956208760608487490261128118], [72405544784889720047109476634000955544047531395871460425278079839261398702], [144124594664015294824113630521416339227758681176138219231318654436665962440], [45093374463066697023706904806471427101343188163427160870233392938064207490], [-149409871771301304226800830670026610212990690651522483361497232980493023632], [159595411354298158055567140506929636787472652914614599264726012316124686684], [-146152886196809907444994574468975826070823343731231095693931174545076235010], [64646631930862802687642338205589319242525432584996461372881081455326377258], [-59429942798228366743413067866366462171214573247721928800700930504228386720], [166944628208848272009766244364715125787565704813032617641545048196766364824], [-154819149755100753034007524031441436406389416237391430857368311645234916028], [63073411494481672682819720074534444946269306594555768269551709878012552678], [-67450895919595942188301249558088070442063333568672600207010264952615613380], [-344450623846730722973654800143446275906307101813962817525489904027471800768], [-349595159642101165906435356517369793425629975720089427148089019710863588358], [-165444292264301291082869061287131618178878571466948976785512046326986997212], [-99496952489695956716385662076743933125819764474807315403372463379316760016], [108232138775749688077824943064660578510532678949373891022725058077402467890], [222886911287488757026389097479568822219403796714074182543565259700975298238], [5279655261803471288492714009380946506844935412870053998550249949595898260], [597074387389567090081705986691144612009190864164547416884704506675352720472], [420932700791926750002042119835189322679892457789812714946850324733228861948], [-964067822397207205079778091260923318710017764197683645079087178640393936268], [-1353759245907570730872495279881499951035412027074355186297219969763147757512], [-187060894159926772833827583963243113079099590125666579794560745722328159610], [-777850642317743776202696198185905526471079464014546494152810902232258513422], [1582442610757434142038000928349017465013045433783791241266890949821264858920], [-93036058412786803118640441057394863472492430863868898646010472786847207456], [-829482998641148752888101622452670315150474428331259833520537799205172241588], [1449668949085579366132480421465550618365028102519576075160523677150420056260], [-880341307795851542448252340328562588576356793578237686708060073911329583152], [2561983904234044673628369644965052286613074453535323596755056090096473317334], [1093856017682298650180165924838715432032055998891086845610439079155422488002], [-2118860988013018256955898720359397143506363628571250232674521809847431620616], [3029100778080852525707892515545215433433184725907436460470315017980052173690], [-3902318985371472684114774390620731086340472382399146308650748635779688036282], [-4539527181922410456018378264589092320731401549816279506500523776581778484580], [3708770553979076846784973373559278453796023352990385880347171257001344207422], [4814643486893081013816402153432644066576523978283377154777701986751647741204], [-2669640793484884566392983615493216598753336680387928528560001653750286662226], [-2762727831452243093453566130067651349049154554712167109224544560564644515766], [-3433891026863351513318394320995056200051164282064726603052050348886167289472], [3218128909803274893894121880867579024063822980735589427331107916718419533804], [428549874528462645889720101744123317224717370749581851846853683318739348110], [11055213474573052362220786097515559949195640781299020400982049412407064422518], [-9412942078730511886205857546348540517256076054489167668167093340328528160926], [-4025621592649523552365024413188530233519709807924471680814819291804211198260], [7985235612626633636080714186589669071711016077211706314694241613068901862630], [17532042460681385134586084956758135040630800452752009653561999457582517722122], [4570291605132621006679003400566415856074220297758550160647737559050128134068], [-18258443390331545569940150704827851035194933529739724344580623803433442431922], [-8056969521898557883198659187922902064420281905428207431429758969785184261178], [5074759675825607202560254907802558248413791342777938664206653900904510250524], [6240937784768663661849241757575508514503077132418646721941828797897909959658], [-26313382986097998415006340230951791664785716622499506037156966462980246312160], [23894507402012361373133759242994109842791065019708886015866483266887616110354], [-16708783982875793991863863211901776995739954920710995330628636700206790418872], [46287801309702123909404598103852816183409648808990451378429888506780157888884], [6853254464533737607223075644402581578866022660073330577062783642262386512150], [32916384876595002586635633882556155718533894346548629152798119680354304221882], [-37072710263385398949834728905356240782589703554793056439245654690140413166628], [62440465979940731531019411407373645875607471626267278094772032013806053441248], [-31121753387578076121385150591068893957009994653685524210350566350161767116008], [-101894977624912421443666327897044700538446252438403016600414461714181500701176], [-9867795613293271375312246945254550671410498123337245967293236549095610062898], [57893561946320773496169749882365873449539943341862824011770337347271969459364], [48830026047121372263826156632526209368788403687785382087280015732904319420592], [-50988031926067758894555666678173988215525808794186019251699767517675316239182], [-19918109343707420673737653051210908664006568076889540018907871460371909924546], [-131262912629180996303921891926031026031090837554904522859205024690887350381080], [-107973071035263851943352955178415033189818706610857125381348335536559256187230], [148761545203939624946421899734115454693803281213716235518954197216394057424422], [-60778930352259965821487996718945701623022399193308192704072492492484605711236], [-182626282433340652082256410232662271506436309186683466080572205579135807687862], [251254995917078985516594932996823865299974266623611729728891941001340813123172], [-284816086880463091875766209392279059366609138382252673001262459815031889603322], [-9099440459420273336942728817290213224979421583136457470704474378982529636490], [-347757085573535052022080946958209588976606943282538032228603591199669322873248], [-32046637178162654384648183541949725162400184408021387382808850413694404318242], [-193193046854677572436067567318795193698287252379205700147524755072315589695820], [-113117771242232450952717979545191328162502164650154578881889388066843868525396], [559929673786608591678101587657758220403821351640010562595999087947530818031098], [229227733977793053802185516647429021951220967764845498311364823933744596353734], [-400939008875038136155594578349382130828862360682035181808180080304118916620240], [-196224765949434161231097239902250217541754338799316541110636443099633925733092], [-615552800899058435629334761125514434926499296198836649136310007481137499627628], [-273046029743423019301169867425054249303625977103251081594389424690028063075806], [-10236217541053571358769474134103051899119819627709759842232197361802605034236], [734790288752545306852690808038492309355148560181055902949738418594676160954790], [866151063274850683716899870826682788628935896530228606198027641737646386158920], [-969019145878649155315553036293933774946753766237524602960665253768458471365362], [1188417798842259939882569447312087970286927645319726587997962296779283675618288], [383786317217248687136048521183290188834552996867406908589295670478499404578430], [-1528978714467482402641847046572773567572573923386455382773593581616595296199198], [342296292713912601591655556630928697722745088913429506213897819019508754221388], [1309420354331999110428317930201575239193863498087449094561610458241420591280664], [-955008174619775665364276224940069112341002843215730419341743053548902145202790], [-1245961536645901389695761167628899521034809901580202227478530373160653172562500], [327061162231615328764893099347320103960014657901936032396020996765082472405952], [-946366579522280348344291122029541426621115839211417938440495255895003815275582], [-1447465215995931743551424394152355408072665697158163496153126360807195448727630], [1879099530844021045296964943559167948022042914089246704604610841217902508875932], [-1180171477557161467683982292743834442524325760559700189591586240425786801572246], [-698350325708115034886132847121042706360873002781436632386645502154345093232458], [234085695380065880198121170671869823025261859281244232086896250356653616873888], [-1480250435639925771165935112793841324652540955095723327336103130404806210469542], [1285623525231078826659535491362910721157730728673593122757269594559391811850642], [-282300302343042991252507804942461283013704107221847261417624517321304282739220], [953029075100731239894720101642263192708196130103942326081481131277752470916308], [-3159403753539115424737431483455709589997782956862450797593729334727731867101856], [-5203107242061281492884071917882970910147422931726243832254511649785607454737042], [-584330660506579649396468049269802467823166803149284885442406901566847930879258], [-1065497186370542565128469759182986519133232140892129870047383430606110826292906], [-2958232557232199377878477208044722673070641209078351072881614746513561204866240], [8614193486045733639042523522843265284416869394211185095021099328842453896676268], [5445439150197745830859139909506135321307313326464281187469993703676785634055972], [10438651198678113988676461024510870742873907406104081132026486677824217794746004], [-11168409713800764475945101303390468954390887908701150524449615708759601788447690], [-8301899616733221329755164997503497940503676549976068524984246136089298254645982], [-8852356572989000937102160383420381942967634781681463707657472724106795699342118], [660742168008025976804591427299139655147118816903616483389921503564745961541904], [-9688076891756938060400745810107849211005190095147137855705144555346031264998242], [-794603166389129633401616500276958394713131853183662863529565366686309204050486], [21131185734410531445938956006415755389884971672903621237724040401402497144278030], [-16850242719758514559676313481661152400335804764531750140238361945789023127321288], [-26983397885055719802642088105007044509320454754368185550907902425609797072143882], [27884521474523559194626490682323492435529466361885989723439470992141342550913100], [19813440375739540198166194754263134836118930415414570985654693709023382329872622], [26553578534771573866915361214178915760543581029155878558295942416574516900109764], [25073195610403470441223403520823116557296844326446265026294104883903518030879952], [21163768989844036507000356946386203257901210341595693783670293854410965058659934], [-38517305922949275645745743661482158497475345773392094194074263077585971714810068], [-10151082903087437185707611120437868579764050331141178535688919624361949254202246], [-5000943822552661385675043130218627625523486012719128414182671167864513924414138], [3305124336753272194084925624437555389337172412797978240279394931642251504010928], [292350786770276563405871960953386123007667516163850999472467136900617344999230], [-10729517924239406199970370957750315288564973377436120675751026385386692839552662], [-35367102913474547470020470625341095461466169505301179859208370939615092213985120], [20858538528603966088793471147246139294022029475126163553709845974011449389571972], [-14524345093745389802480740129940301977293253708523198496481482161855954596544366], [6467847801225262583915424530897774310060680790616354419373528076337130484992968], [-1237806805498968956913815956261298679161633579009634883964842641718975552479346], [-69235756105549760982656098450961714455015844704536612977653546772170299905990598], [55507100614736841573566787110387885408661438934509181813610810443992385828086384], [-2374027838760786903884707252236054725225045052898238566851495375142818299247660], [-22094858226456371437257838256427966994817727777096477363863772090008494980916276], [-45961768459766478620458140583440342528539928289726705867094379005211155635350502], [-51701941461405229361705242020685323415730787372270115718758533046969576049497626], [8478362605991980048305047257197429078189836278816497186289911734330198179632248], [84391441521578522384361721706867242572913361909020018913729776321120931502630122], [12846626067065952306833200348836007149775469245246819777842405710503916654739852], [1149137267794123955454825278216236107188889530801318522902285073694691493614340], [-53320956704925145627059870761442681128931696648107312438900562017789427788627952], [-130261673417641703853176971711583370409782127544619128281453128081127069954450530], [-109748412886741038527297786183463131776053286860534692759730620528668615627982008], [52916770978787435824440919832025965905696688738017937940000120910347121011215894], [-209392906016408656596440205101864027997282839967523650131643398633253760744222500], [149139449563243332007507260544589560269269458274622182398636851002688981017406432], [267923986976586039723671621652535249280368369763236599914383753137168659183402978], [-212127867588687685234887787535937935141877104606678069545788186552717487070987310], [-283105714126804477739563611782349596788715124798848240774665838718381760295517046], [87921326354441699576646252784067448030089810691881771974966294521448471039724502], [-468716193815191864413114526651649103267132462024231520829740849296238031288194182], [113431664009451850132022844904185823665836824850150165405376252349407214138143464], [205124118249319341448401934245558141991812804728944195205149020555632244232465314], [463535394145111484241883928210874719236004294398919053530866498473479335857872140], [423582976013322608578123636815444228998634937604630962311066380718378353670688728], [-178740194760634763111537843516803143973257225741882132876411394697967433388476528], [231783659917309755679556656850024175612834405929861754994229325300117218339266334], [-68578503549998444245202131258796842753510110177246311536384943317728433941675532], [-477525588834669067278213096414337471663526635725872319089419210448686958143472256], [-494542392422104281107076704223026626367693646017122354822310470863616041615614590], [572293428055327594800874091435622506326978806253818431464457054282840307033806478], [209379562457843764350905484440289712693464046131600612431554737236385119052911460], [404996045252498142253504029554310842063492588521214080320003955414383406441024604], [25417023556848732240714873445401284785990103951721539486931305840467612291398312], [406840821390282074483405743894721101768408145751188911246283390484013270591671338], [166853207643539310287005030662063931763829820208587207625095281069876096773821280], [193273597777113885319072948547798386160541713365060165750192065649809851178229530], [-1001205564626392095945231966535723389890876664184162382010623251524884484206585788], [-335436225184660107169009807816939901991422914959608595210871995338268536743679778], [-412018339472184114985610960681084943080340860652943130180323292887439892946626730], [582296073309605434728562685598586427052884031520206868720299605092064980251002178], [-881155651332232019989389955288867547750481668678982593271692796877451151077749456], [-774982296989759212136385610373444829624049356679199955979695696634544013732076566], [1076496812274707587050288618497619833487470890417775554666537347369766497270320430], [-1606925740670338899642902360098517044511288680426161830149340867215502747680215208], [-146870605648347323945005555765904166465641032328179602645259366893915915348019546], [-31268863266944532391340477109659709277869784888588086435194225878929493412464878], [427854864577364556000558130095607182849256837738767052443727681106194526804090108], [203305197878662286715516653238620788221787073613220054516041512396134519604082540], [-2451473154589796882776188922087485043713684051310915145283988904651300083840057102], [678332672308325088710478242965558918332349656721497305092466649673441769586985854], [348943331804126179789857372369490624858755088820835188945884390067659933093092948], [1047200225464284049005630578190856980718950228244427848600463438016108248748392012], [-2714474810595891397230155266566134728261940727378461847093977861018764315592691046], [-746606224164900248770055697742368925124582174648150806417625891232099132093404058], [3187366557089471381953973601336650622716003303352064467863224271107992314542000320], [143903885374700945098911200819652589127854066165135502152697663034223255373370104], [3098419483646534163217956779037961895226744848482693984355454189559744993830650034], [1974362892477727488281286154559950005865004471043715791099954601087655077972111848], [-3752638583685897483707079902912841817835293511574112316754091547722696298393913930], [1355733276944526787972491521874341808991968306139125988522887189585463110421207214], [-1531814017238955589436172467053743235113268006860553458154245855225192880247953776], [130194926320632203752027153597414722099276102869153520936473166592777328169814260], [-2895558122177869460525149029141700181739677147028788835859777126104063772588705222], [-1786579594480823574925289268535051479107243416070774968530181105899676671613892346], [-124463124291498980798847259042711340609656428147720466879809441388234474140249252], [4570309253256733971579924265970749569002040640081781524167825945091358823592750890], [3936211248508539453384421627684370983571765023776656956755535462757329839791120852], [-2286371829332527534905678248202820187690257410653364403403538404062055569094008440]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_2_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_2_48_a_a();".
// 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_2_48_a_a(:prec:=1)
    chi := MakeCharacter_2_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 48));
    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_2_48_a_a();".
// 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_2_48_a_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_2_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,48,sign)));
    Vf := Kernel([<3,R![196634580372, 1]>],Snew);
    return Vf;
end function;