
// Make newform 75.9.d.d in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_75_d();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_75_d_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_75_9_d_d();".
// 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_75_9_d_d();".
// 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 := [8995759125454185640000, 0, 2262672788809149782000, 0, 143709036159536320436, 0, 3308855301815965532, 0, 38935163332201981, 0, 266849787342054, 0, 1117319469691, 0, 2854629536, 0, 4245491, 0, 3278, 0, 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, 0, 0, 0, 0], [-494528547384072231332272309952864741059921050045282976347200, 0, -123446343818740173884386881453906546436381859318362672764720, 0, -7492214178150533461000264324684616906214827834506894586148, 0, -153234141947166357005234848515078695475833309027824532864, 0, -1527607847712825921901064886269527931700876508333811757, 0, -8421554213265091056769977787688017831197705181942659, 0, -26487947560029659058715369110181227825659297134742, 0, -45983085010602087389614382337775653713631759030, 0, -39494745263990663481407109252723490991816553, 0, -12944724138071772764374601380601530549127, 0], [-1843945737626593085069231445883218283883065224274407942400, 0, -447234647499479036460548366172808280743804847053273411840, 0, -26655509917794087115413023955576309506254381399300049024, 0, -527584676357666282110240413864170657500175190429670652, 0, -5085422211028483676125302446026357185875851702706136, 0, -27168705714057417425115216615248434509941939733207, 0, -83116976021173842213816584776614195517425406756, 0, -141048804161212232818251629790265501775329030, 0, -119193015694790429301411517859095646022284, 0, -38633392552616450640940641218696367071, 0], [7910508707150126450500778226436771635412208498964085637985434341262400, 838491625903677136597642524926531344169164820912486016004733397753600, 1944267128171855263225788076587837751773096323134520248451512523173680, 204102901125731027502514408913007170725820236987859082261108229090624, 117182300711751216328494450788470604178272973029534515026769930012452, 12252479301038138112685101919517627097476284693479540638884395840752, 2398330189971907363399815711787595509611918913958488215394507342656, 250281316976394106232675225714128803368388812362137989249032674016, 23942492849034329750149991757617625004977410239501591212586812333, 2497411630051189404351687054566403435956832015141162049091643372, 132114055770191105971062146516482602684085456747243920867809331, 13789860918942402105678437187684270759937637579042101582366476, 415662214597008122486485389328469820701002664019962701185078, 43446661518429263988910650685403856521571183845618648311560, 721503886034838991480821017657676800189497231458582403830, 75538950790767762190612732750819086393020724503774740504, 619544294636733690746248169065904995497448824128459337, 64953912933943003679519484448164370578155254277087516, 203011942917872273694058303883832504623065021324503, 21306057703380233760716836919170775879245083003580], [68253978723611843692151479983284684641037278183602742786328376314782400, -1953169409330283196793326720447017179297589138058553297672256158534400, 16703582834518123847993128779980339621997399527092350510300256869400080, -360238841374927713930245110346058444975373005483962051209699692242496, 1004762761977550425453790433100120438873353731167756733754091540849612, -18144915473229513208263541124375053263783069515305093203772843993008, 20568175402149098927360906863432422651252525848388583501073481292736, -329769612776339497497213082697211998079074126911281670622889961824, 205412438556953318156353473254854115659741358175230620047983943423, -3015164430151123185522441217164101951717460052075253194023049308, 1133754402628210619539602915914270518657841611938855916545241761, -15631710632932855552935010261725683123976315533507233950641724, 3567374267258992511205271811528241520524321978184890084538418, -47226107497395518016399047659581486150978334885049561221800, 6192018519133265576695090842818197970903550367216081852530, -80060339494701398852594997102126091420505841854793855096, 5316620179589821366215336886072247626191396751862085747, -67876354593735314919969175533046164644115835129668684, 1742029375161702523325452324850485808491531173318893, -22088210033777505779935625809269837445216724319660], [397635093536292876040941935945680213229727406093774835642129480250190400, -14431939786486254022228961695710024930593024508674059337060830593600, 98073305057900695557324048483692199483614874464985760613177674383457200, 48127272022863661991562418313394837379936516913248770525587888781776, 5904516811448221315593759499313759016498034948994442147082478121896580, 4248336839143768914229503146307544485559071563793701707841827380508, 119968094644392513130508114866296023747265010153783935278091001363520, 94698427490171237483196441470153201607993366838788889094891246744, 1189417755782344724324927053349769827829868369090877375292419269605, 981878587119805678350201823076155094196901503810323969191088403, 6528089981067693256059337783786389046232565727219353969113746875, 5552378029036050464288920399680314988102846026441075891509539, 20462142940215054038168705599639497074853664575218991554625350, 17807613305550209529878569150925843134157088190986722124210, 35433712359350421995544645264144420057981670431578976441990, 31391524808029011290314228495687419345080541822954020486, 30383909843570352775897757052217120482376343533786060065, 27254049771930929886679515165529858331714907926811679, 9947964612219047559425748614411397007886929862798015, 8998371432345176840903497992151881750328509518255], [-161885391856913081552752473157475426084397359286531959762341508713380800, -1174389505737596449905625795100995164015245813217783334631984508864000, -40353085670339709281709031271312880192833443802653877781792912891953360, -266279853755945594368769878918570321475196735729230022012401986476160, -2448735443300794739104695445790322083136683717598410198119274418187484, -15458828100148188403395219849619589953828753313081885594638370852960, -50158626188388440718103691320629544856039829350872805863100631695552, -311997582983822621656084732487488676009837256140355385017387979840, -501207352981949944120854900515928651955361601326519829935529987411, -3081782311462989491630542750879016102082478314241028650281091320, -2770700744023273122064775547385271307965804702925794665393571277, -16832102702992606035476364939678018866275457766219519973416600, -8739029493636416973126534908645036000226744834365319872852426, -52434752207196162926509694550050444948031975621194661664080, -15209194564010154158109144622106335985029717998896001798410, -90214858392900647272580954520970647196084276648005217840, -13087680322594244404592131181525976355797810472606609079, -76955080240332070742173055864663454447416795920663640, -4295244578881958794480187647075708608566202681519401, -25099206374678050491317900925712381727419821533560], [0, 533051442164687410568020395263021878467358217381896000, 0, 122586452453835227285219056212968953456955293707131920, 0, 7155031601091990959559723142281665225903504536051060, 0, 144288146900449331441668580932069270529951344282080, 0, 1429372201307518060395788982429626524640647856185, 0, 7861640266193276477098087265861057425960275105, 0, 24725954479181545723568172222213454513087750, 0, 42971018419399946828097731451855681775370, 0, 36952426895454570676881057505990493005, 0, 12123651280477478894713425391791525], [-275193168237245808975419623291187588683175355600600899268852907900902400, 432305083042862071185359375193811610575951160407566840837637168868800, -67878667400154028889915992080035400037605716412037966725830762578858240, 302796017817943537634515842886353386337250787058332192397878913837392, -4068860249333839076851280946271434818041809914009275129372924247248064, 20567784276128867594225155706263387061833736259473777347645486308412, -81652383076445527124982359606224636192614945576787613995433853766592, 458373324857622411401279954965368377153583895938937531111307484336, -799335940295623801780591442618568134167944652963347801972799687536, 4923598449791918343419201461666260538498412543739775351276774635, -4337102014257866441470739939700980939525493824806849695982276992, 28952581173829969263195821060154253527370748807932765737710961, -13462163053697439470319722184743335001913215323068041821795936, 96145849452728824323586717999664024631735355419823208405674, -23131069546541996854356783959208778387736548060758388685440, 174239218084810005001883410234718994928575050187751872242, -19726491438342090020816409562556031775358275223856871664, 154173976373657466843436567418683153843898944342359679, -6434801811787989507090123666755784511767153768345536, 51549016316377757503849424569519943757655984201869], [-117455347112297132390824835817702151676193221620569289089139581473124800, 888309242292944993560033710020829977667667035251397159078342000478400, -28935085681877641886790526102801223912892331476911081245245517558672400, 208649610016346680375471432727568681068737617747107660815344293063056, -1735814568045708542478237948857368707542041208380892193247265151804940, 12440326910213414738066452803422642514442628216259140853398509422956, -34898159126216910283281598792565794078950457460409121009940321121820, 250319669691679462517170203267062484553444626576387296411437830768, -342318626275787183362282728431830862962747715530516354058314744935, 2460175473496717994537595428783348170552433856188158140842914215, -1860993329864279262871889996182241032428910908967321924818556320, 13403386853540190014625648670869385036689287427073648068229893, -5786714828587349645823360513883484675129342662475014104502310, 41763626532283659175407538374085727625718798118490879758642, -9957802241279632937682343229851622202451127871567697873400, 71994959831129623399999097923838761465632476383723522906, -8501384517689229244318908426395575278696731898599894815, 61545200600657605836440112679394298879753914729069387, -2775245267980461546391729252674167350035336270589060, 20109402520982650017677785935638130907599154461777], [20141124859274208488831308880850092533416992456254672471292371696987200, -888309242292944993560033710020829977667667035251397159078342000478400, 5004248018199372558167469937216476105910526729107902117669863730756720, -208649610016346680375471432727568681068737617747107660815344293063056, 298615556621210995947402524278348701478863748623745371439196971819092, -12440326910213414738066452803422642514442628216259140853398509422956, 5928032412005853279209581010546524017357015327984685987776605761476, -250319669691679462517170203267062484553444626576387296411437830768, 57349343872024717528012992877453204121224610951157546928085098833, -2460175473496717994537595428783348170552433856188158140842914215, 307557677264653957863479973668249437333836003436102923172582176, -13403386853540190014625648670869385036689287427073648068229893, 944366698261370089336500578488182825827264999059006806395658, -41763626532283659175407538374085727625718798118490879758642, 1607732531991365489496048749752766991417146158811496469320, -71994959831129623399999097923838761465632476383723522906, 1361861201481815766089296354882440608982405713328541017, -61545200600657605836440112679394298879753914729069387, 442155637913533207153332580703724905848240613583708, -20109402520982650017677785935638130907599154461777], [-17639735639011826531868726274470990671555458587389031318191809355056640, -1759741567038877899653467761295270828578463964730714432367056506113600, -4356335731221582229852453845144019707527993036736084317346585727391360, -406411025696818449784644796987940035132520958787327198508019345408944, -260815924518327704803894907816408012248934535349307190069722625993952, -24058950614153812567621176350659365524516832776166748807550427199876, -5218859685036604905249778926275730056405930239824141801482692874656, -478306140436614694189275245551761426088346568065057967754676820048, -50928551526265673779035740050585149087815089411419025850878784088, -4641375269462306117047012982136734292598367659333814811539138373, -275474398884473598774806506675985934845274994573477813042807056, -24977008207463265240704644240768854223954342532315087138170143, -852613444987830644079084992812636443137382853893454837195568, -76953811135554073070799105851973323766166831705909608279286, -1461432228350223771157996960218865497893558354518086404960, -131403769242387107683095785486037023556453900630054270254, -1244126890593480223429455809461246975876467868662059992, -111558202417676810977367172822371489301243913078938865, -405338068124221405947296841789893711722480325720368, -36276926822004945491646773493445226676051827164611], [-157521243001467391313442478317309730743872339080911256818206697966636800, 1748490288674203174675734655464344744073883894215994508507304842884800, -38939972186686611769736016109596448299153229807983597481002104731280960, 399152229472901842473779418009808483795884774316068449759573184930832, -2331194891470259636839142548270702770101676972437521627566421168117936, 23511148476638467961946690179868752521604550338599060208052699435852, -46638995730312367825653214854953404537696849355377477894182708093808, 463417341138785206959231804896852397409318111339913551042544259056, -455048938371213583783263456091436722140176776984023063811556987964, 4455391484441552869028227731850092926927367623972147164774678335, -2460950591966883973928720613339404992724101996811827452082331808, 23757164541051855381673542173455576991004854317760281139310381, -7615609183425687544455046054741796783894998583040713090047064, 72571516516211909550788458587841236109319655351861507453954, -13051862652643050781829198277844549189357177369632373052960, 123013002295805681605160845244943357306579865871792419882, -11110042200637039598426749743511591365936684471065063836, 103870069895251210513691804464760083662401302159472259, -3619417908945192597144046407292883229878657929407664, 33649008008698042462507574574891203249954172658649], [-189179799747757366512444200089447096182777980037745401019575366063016000, 2515474877711031409792927574779594032507494462737458048014200193260800, -46304542215007224859867817620718881942989220758148941185483374639759920, 612308703377193082507543226739021512177460710963577246783324687271872, -2780345672426863966374576535885327260458758911366328277911414268158308, 36757437903114414338055305758552881292428854080438621916653187522256, -56643954096519986825520249147105722880105906029946845934924156733504, 750843950929182318698025677142386410105166437086413967747098022048, -563750632389564848899618792740369037263338856447538576635375342717, 7492234890153568213055061163699210307870496045423486147274930116, -3106362862290067747109754944868542147796698051090955322080509859, 41369582756827206317035311563052812279812912737126304747099428, -9772049297650239139556743401362427821655243080108848589809942, 130339984555287791966731952056211569564713551536855944934680, -16972627504176172130314325913713889069513629078746639201110, 226616852372303286571838198252457259179062173511324221512, -14584830371666806990241294022175826907350535483958553433, 194861738801829011038558453344493111734465762831262548, -4782151604842984140114053254217312194967364768691207, 63918173110140701282150510757512327637735249010740], [-1730151844536009813198892616497634971736375914344754875302750498081843200, -12520713979836290347173470234023565321131689022379959656044925480913600, -427067531504072577228182454955264951970757527957805271310438749196147200, -2975535511908228080088090400521948169987098031993947867028166306468624, -25578753240789023178050890280273278029004703695745997807054853703169920, -178273092774352890875488985528846592724038913309385636443812090151564, -512303405660010781697767157347712627309376973772625786196337439638720, -3616141370417233629465708650650692498840938197508005275101123838192, -5004518893007979642127036352558662219419125529461227124045249714400, -35837335016609701283667225380116684630266574251846721322534249295, -27097304567604748347450120417845050675316438076714279260076332880, -196796243447648234147492346897020969760771185588192117946666717, -83947457064483736734511753371755034018423738463071013381786240, -617557981097037454855785391718190844186416996314233072810978, -144006757873730481546665084963622603850370610559964185768480, -1070860189735175423184499422741945157392909930059093198474, -122665795383209022725597982285456221900243967598140801440, -919293802327398485187726840193605726607874388102970963, -39980936381233648232903826634530211163261527217360720, -301241026393558872966032994988089008402120571259593], [-2636836235716708816833592742145590545137402832988028545995144780420800, 4273788684734014424616750305689275350750364681426760964251706479276800, -648089042723951754408596025529279250591032107711506749483837507724560, 1148394897573835169673041513716255518328929166543869744620806648910912, -39060766903917072109498150262823534726090991009844838342256643337484, 71718144979028100295293587317411477373675177681302658824002432045616, -799443396657302454466605237262531836537306304652829405131502447552, 1477894615642964432692288045400387850446836452247853358074601074528, -7980830949678109916716663919205875001659136746500530404195604111, 14781476971814710365718492429896692040744669235622655852545391996, -44038018590063701990354048838827534228028485582414640289269777, 81652548074658358762820781971881622403720766032339658882417308, -138554071532336040828828463109489940233667554673320900395026, 257215194042091442049926413023871348051176065894409641230440, -240501295344946330493607005885892266729832410486194134610, 447088034916197205239736779062721972882421594302085885752, -206514764878911230248749389688634998499149608042819779, 384353107822923673167598951971789094650916329993485548, -67670647639290757898019434627944168207688340441501, 126054733800773199412941405519643386756281340457100], [-68253978723611843692151479983284684641037278183602742786328376314782400, 24878562619587385174331234077201985834115685131140999214479212569580800, -16703582834518123847993128779980339621997399527092350510300256869400080, 6171053994648465166150215974870171018250874578127528581145763638657472, -1004762761977550425453790433100120438873353731167756733754091540849612, 373934422159990906397659720300189013855458040676040207240527822911056, -20568175402149098927360906863432422651252525848388583501073481292736, 7679232530468271901948394140154909709709367868677133985346155606688, -205412438556953318156353473254854115659741358175230620047983943423, 76902007731486937753731544528960807998901164432441932376909538596, -1133754402628210619539602915914270518657841611938855916545241761, 425643838773224011828774979744170981194028086995840016685085508, -3567374267258992511205271811528241520524321978184890084538418, 1343067061092340929628741774273341922539299548174747184748120, -6192018519133265576695090842818197970903550367216081852530, 2337186085809866991247012450924084673156157342265997841032, -5316620179589821366215336886072247626191396751862085747, 2010648859292440802824654326808213693856852301737131828, -1742029375161702523325452324850485808491531173318893, 659705636474389974563003155604194990690625931794900], [-7910508707150126450500778226436771635412208498964085637985434341262400, -29102262308701498524159671923747924565028810104609344441951199512684800, -1944267128171855263225788076587837751773096323134520248451512523173680, -6822620504805340485846805139030516739230865816532734795795161795287232, -117182300711751216328494450788470604178272973029534515026769930012452, -402309970783255905970199602043082496494939974236595117335576888199056, -2398330189971907363399815711787595509611918913958488215394507342656, -8156365007842904852371869265245131076140611961788574996086885364768, -23942492849034329750149991757617625004977410239501591212586812333, -80926910480808182949637390214189966322710196615958244715129620916, -132114055770191105971062146516482602684085456747243920867809331, -444564011564371920680531959637871955771009043792956253169826068, -415662214597008122486485389328469820701002664019962701185078, -1394104965373184006879994867643499078615797249398228452151480, -721503886034838991480821017657676800189497231458582403830, -2414214208438950268635864657406498972070539172925247931432, -619544294636733690746248169065904995497448824128459337, -2069881693136629697481789129210974688636900542201382148, -203011942917872273694058303883832504623065021324503, -677589245391143174746376148790397364164636210608100], [-131202664786099421520087247035896731050286683557241838594792932106323200, 26920759166001976876155026578745326323375641026350307419944456826830400, -32346591794034580007194145746855819723594755582618118898078113339916480, 7002674878759102336041651181117309225151261652141070990476310526805936, -1937977844967797616134307325986897699016082486420059486587770760546448, 420226227762346949320140323842682252985661650799564798315146745089156, -38844040819210706040324319014016018866160603904715380731685198024464, 8318747649477000127039348959435123372793570081826866638515421868368, -379769191959335405764123964596102390361911401091046766117386193492, 80124982991961350466087478188238574373562032044690677346353258245, -2057964624883818560687486792243551217706368876805685217903055984, 427689622241249623460174612505239926602063903133067249100413343, -6380375454843383891120968991936724995264311221653569674929672, 1307369898765074594443352770470159070366662563420266221044982, -10952133172890691677882481212479786397828865207492655440640, 2217126608891291365682726355991881639746257208644842266286, -9333430692286123560809915120788172292846359850210164788, 1872693565081519143916388950499048363819362443873632817, -3043062493678226717406125102202664682478348065840032, 606790004757904443302742794960812784902758025462467], [58068883792379903460276954233146169580932024725846173532875605812454400, -44098315288143117034966866477998865157233205984027997348042621256702400, 14303834977320416288375340755997180303183181993851938736474432680958720, -10935252059673852364134697881544860608583021346263612305470141812763216, 857292022447985569416380037630585112262497432031194340942309463707712, -655321546892904407756902566473662586145780299352584948392280369496316, 17197927737746129184799914465551129150097185536770017485318977225216, -13121275579940298717842542597203305964329462260406865631164598076848, 168298542095780814211023076313093011761582451708332800993459488848, -128129021588080205247614548071708239737053343135430534069518461915, 912852418448423042500313683702390920395454260247993790197358896, -693527858454621390520137270139145083072967405260115030372305473, 2832561228249204853948837673270089258280569391279955054627168, -2147963915332036212766254656154423327005303526224137853391562, 4865701734676754833324992541288415102063312880798292952160, -3683959641795711897545669401439383380821151578867061490066, 4148742310534948668157517064756703235436793452370009872, -3137598154666171315240682813062638988648390481504447407, 1353144882245115468358588665151953602114764834359408, -1022560233670760306582050457312578342516882787936797]];
    Rf_basisdens := [1, 118241233344565425059338196560714785185143802894032742400, 60698785084479170975019608090716008821942403949708800, 897176412508864429335576332401055819709787811904591956006242713600, 897176412508864429335576332401055819709787811904591956006242713600, 224294103127216107333894083100263954927446952976147989001560678400, 299058804169621476445192110800351939903262603968197318668747571200, 116982184829368952864926995059845870181776231224064, 448588206254432214667788166200527909854893905952295978003121356800, 112147051563608053666947041550131977463723476488073994500780339200, 112147051563608053666947041550131977463723476488073994500780339200, 179435282501772885867115266480211163941957562380918391201248542720, 149529402084810738222596055400175969951631301984098659334373785600, 224294103127216107333894083100263954927446952976147989001560678400, 897176412508864429335576332401055819709787811904591956006242713600, 299058804169621476445192110800351939903262603968197318668747571200, 897176412508864429335576332401055819709787811904591956006242713600, 897176412508864429335576332401055819709787811904591956006242713600, 224294103127216107333894083100263954927446952976147989001560678400, 299058804169621476445192110800351939903262603968197318668747571200];
    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_75_d();"
function MakeCharacter_75_d()
    N := 75;
    order := 2;
    char_gens := [26, 52];
    v := [1, 1];
    // chi(gens[i]) = zeta^v[i]
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    F := CyclotomicField(order);
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),[F|F.1^e:e in v]);
    return MinimalBaseRingCharacter(chi);
end function;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_75_d_Hecke();"
function MakeCharacter_75_d_Hecke(Kf)
    N := 75;
    order := 2;
    char_gens := [26, 52];
    char_values := [[-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 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 := true, 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+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 := 9;
    raw_aps := [[0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 5, 0, 10, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0], [4, 0, 2, 0, 0, 0, 0, 0, 2, 0, -1, -7, 0, 0, 0, 0, 0, 0, -1, 1], [0, 55, 0, 109, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -11, 11, -1, 0, 0], [0, 1146, 0, -141, -15, 0, -18, 3, 0, 0, 0, 0, 0, -11, 0, 0, 12, 6, 0, 0], [14413, 0, 77, 0, 0, 0, 0, 0, 0, -24, -60, 7, -3, 0, 13, 0, 0, 0, 0, 0], [0, 3411, 0, 38, 1, 6, 30, -7, 0, 0, 0, 0, 0, -25, 0, -3, 3, -11, 0, 0], [156, 0, -41, 0, 0, 0, 0, 0, -62, -19, 69, -395, -17, 0, 76, 0, 0, 0, 1, 97], [-300787, 0, 1530, 0, 0, 0, 0, 0, 0, -11, -162, -83, -80, 0, 77, 0, 0, 0, 0, 0], [0, 4160, 0, 9696, -122, 0, 0, -222, 0, 0, 0, 0, 0, 0, 0, 572, 710, -28, 0, 0], [-879, 0, 384, 0, 0, 0, 0, 0, 116, 299, -656, 1573, -28, 0, -302, 0, 0, 0, -97, -1], [0, 6475, 0, 13270, -389, 0, 0, 1685, 0, 0, 0, 0, 0, 0, 0, -1107, 906, 132, 0, 0], [0, 74870, 0, -26222, -556, 84, 816, -164, 0, 0, 0, 0, 0, -20, 0, -42, 678, -286, 0, 0], [0, 206281, 0, -31464, -1197, 378, -18, -123, 0, 0, 0, 0, 0, -285, 0, -189, 1131, -57, 0, 0], [2350, 0, 2300, 0, 0, 0, 0, 0, 2076, 418, -1874, -4784, 616, 0, -1228, 0, 0, 0, 432, 932], [143582, 0, -24377, 0, 0, 0, 0, 0, 0, -610, 2553, -276, 467, 0, -1210, 0, 0, 0, 0, 0], [0, 28425, 0, 66700, -1498, 0, 0, 1173, 0, 0, 0, 0, 0, 0, 0, 137, 4187, 4028, 0, 0], [-10046, 0, -75, 0, 0, 0, 0, 0, -1326, 1421, -2179, 15495, -2111, 0, 520, 0, 0, 0, -1077, 3791], [0, 48955, 0, 93265, -12628, 0, 0, -12982, 0, 0, 0, 0, 0, 0, 0, -6535, -2837, -7901, 0, 0], [-890840, 0, -101920, 0, 0, 0, 0, 0, 0, -2972, 270, -5134, -2432, 0, -270, 0, 0, 0, 0, 0], [0, 943602, 0, 115566, 8175, -1260, 8712, -1032, 0, 0, 0, 0, 0, 2928, 0, 630, -6513, -2694, 0, 0], [5937, 0, 5079, 0, 0, 0, 0, 0, 2742, 1860, -5091, -3066, 3171, 0, -4554, 0, 0, 0, -1740, -10620], [0, -139485, 0, -279699, 12206, 0, 0, 73861, 0, 0, 0, 0, 0, 0, 0, 31789, -15691, -4621, 0, 0], [-24238, 0, 17497, 0, 0, 0, 0, 0, 4334, 12613, -27393, 29133, 1633, 0, -13696, 0, 0, 0, 4181, 9981], [0, -40840, 0, -151146, 21698, 0, 0, 7486, 0, 0, 0, 0, 0, 0, 0, -54584, 13530, -6714, 0, 0], [0, 23639, 0, 186084, 11586, -4914, 16002, -1029, 0, 0, 0, 0, 0, -3427, 0, 2457, -8100, -4515, 0, 0], [-106601846, 0, -65891, 0, 0, 0, 0, 0, 0, 11050, 71535, -19920, 145, 0, -20210, 0, 0, 0, 0, 0], [0, -2522249, 0, -215737, -314, -5934, 10236, 272, 0, 0, 0, 0, 0, 3128, 0, 2967, 3009, -2423, 0, 0], [0, 547830, 0, 1305620, -99880, 0, 0, 139358, 0, 0, 0, 0, 0, 0, 0, 93414, 9686, 6980, 0, 0], [120006, 0, 10139, 0, 0, 0, 0, 0, -27054, 6767, -7, -259061, 11859, 0, 11800, 0, 0, 0, 267, 3795], [0, -7014765, 0, -1825649, -96106, 5322, -42636, 5332, 0, 0, 0, 0, 0, -59516, 0, -2661, 88113, 13325, 0, 0], [-131555354, 0, 41747, 0, 0, 0, 0, 0, 0, 8937, -82260, 28334, -1239, 0, 30812, 0, 0, 0, 0, 0], [50544, 0, -37136, 0, 0, 0, 0, 0, -17252, -24364, 57354, -125594, -14924, 0, 43768, 0, 0, 0, 1882, 51022], [-12183025, 0, -1275040, 0, 0, 0, 0, 0, 0, -47827, -149052, 46885, 7886, 0, 31113, 0, 0, 0, 0, 0], [0, 739835, 0, 1773261, -46046, 0, 0, 870045, 0, 0, 0, 0, 0, 0, 0, 103757, 101921, 41867, 0, 0], [0, 1689735, 0, 4006260, -57860, 0, 0, -521569, 0, 0, 0, 0, 0, 0, 0, 217187, 280087, 71656, 0, 0], [0, -27121853, 0, -5747880, -154359, -17874, 52650, -2817, 0, 0, 0, 0, 0, 4249, 0, 8937, 166113, -14571, 0, 0], [0, -6097871, 0, -4773638, -246739, -16206, -88374, 20131, 0, 0, 0, 0, 0, -186955, 0, 8103, 234711, 32159, 0, 0], [25402, 0, -12997, 0, 0, 0, 0, 0, 112488, -59567, 62890, 103582, 17233, 0, -23584, 0, 0, 0, 16236, -65482], [-114986650, 0, -1615235, 0, 0, 0, 0, 0, 0, 124108, -60687, 281100, 131701, 0, 17698, 0, 0, 0, 0, 0], [-303488, 0, 7297, 0, 0, 0, 0, 0, 199566, -55521, 11259, 592439, -48695, 0, -32532, 0, 0, 0, 48843, 181571], [0, -1105770, 0, -1861734, -251474, 0, 0, -349165, 0, 0, 0, 0, 0, 0, 0, 387566, -472628, 183394, 0, 0], [0, -10295714, 0, 1952130, 150564, 70164, 144144, -47412, 0, 0, 0, 0, 0, 150388, 0, -35082, -138234, -59742, 0, 0], [-198748157, 0, -3910640, 0, 0, 0, 0, 0, 0, -240311, -41670, -175177, -65378, 0, -44421, 0, 0, 0, 0, 0], [-494055031, 0, 4932049, 0, 0, 0, 0, 0, 0, -328360, -413922, 504509, 285593, 0, -66677, 0, 0, 0, 0, 0], [0, -1698355, 0, -3983532, 872007, 0, 0, 1627909, 0, 0, 0, 0, 0, 0, 0, -398781, 532336, 151630, 0, 0], [0, -34029249, 0, -8314524, -212577, -113562, -241974, 78183, 0, 0, 0, 0, 0, 277457, 0, 56781, 191175, 99585, 0, 0], [-588431972, 0, 5411345, 0, 0, 0, 0, 0, 0, -519436, -838275, -637892, -446503, 0, 255114, 0, 0, 0, 0, 0], [0, -24478803, 0, -13254694, -192527, -169014, 103314, 39119, 0, 0, 0, 0, 0, 372425, 0, 84507, 237915, -6269, 0, 0], [1058678, 0, -176635, 0, 0, 0, 0, 0, 333922, -363959, 560957, -1173717, 178545, 0, 38816, 0, 0, 0, 41095, -570901], [873271109, 0, -2186676, 0, 0, 0, 0, 0, 0, -110730, -1218102, 706204, 202248, 0, 301708, 0, 0, 0, 0, 0], [-962058, 0, -211843, 0, 0, 0, 0, 0, -385176, 115943, -39298, 1299418, -188217, 0, 129664, 0, 0, 0, 10956, 369186], [0, -6303178, 0, -704252, -233062, 183468, -38964, -54662, 0, 0, 0, 0, 0, -395514, 0, -91734, 195990, -17590, 0, 0], [0, -78192647, 0, -4169086, -167081, 106674, 66522, -46645, 0, 0, 0, 0, 0, -86315, 0, -53337, 160389, -39953, 0, 0], [642356, 0, 865167, 0, 0, 0, 0, 0, -511034, 759065, -1262613, -2490793, 238803, 0, -380732, 0, 0, 0, 92335, 314315], [2193767870, 0, -811722, 0, 0, 0, 0, 0, 0, 1108776, 2163828, -751274, -239754, 0, -271766, 0, 0, 0, 0, 0], [0, 15856985, 0, 31518739, -1971260, 0, 0, -5646055, 0, 0, 0, 0, 0, 0, 0, -2655165, 1200137, -711463, 0, 0], [-533492, 0, 342267, 0, 0, 0, 0, 0, -1068050, 771477, -1008929, -38797, 83999, 0, -216636, 0, 0, 0, -78677, -178905], [0, 12471965, 0, 30810566, -618236, 0, 0, -1127017, 0, 0, 0, 0, 0, 0, 0, 3494845, 1876157, -122602, 0, 0], [0, -180735554, 0, -13868078, -600778, 99732, 402288, -100292, 0, 0, 0, 0, 0, -761284, 0, -49866, 651204, -150718, 0, 0], [0, -5373565, 0, -8418742, -830016, 0, 0, -10272239, 0, 0, 0, 0, 0, 0, 0, 3349979, -1904729, 53122, 0, 0], [758606, 0, 1811272, 0, 0, 0, 0, 0, 2751260, -37730, -1300170, 545664, 556444, 0, -1420972, 0, 0, 0, 36536, -732588], [0, 12134185, 0, 23015067, -1231970, 0, 0, 8202963, 0, 0, 0, 0, 0, 0, 0, -2661241, 1194867, -1018899, 0, 0], [0, -466242042, 0, -18712816, -822218, -34500, -873420, 157070, 0, 0, 0, 0, 0, 179410, 0, 17250, 682398, 296890, 0, 0], [1077493190, 0, 22391145, 0, 0, 0, 0, 0, 0, -631557, -1040712, -3547330, -2210229, 0, 873128, 0, 0, 0, 0, 0], [0, -16768390, 0, -40021618, 2655748, 0, 0, -1210391, 0, 0, 0, 0, 0, 0, 0, -5464682, -697930, 2333522, 0, 0], [0, -92023444, 0, 128840642, 2738677, 453192, -1528116, 103622, 0, 0, 0, 0, 0, -1648126, 0, -226596, -3068895, 433840, 0, 0], [-4800047654, 0, -621218, 0, 0, 0, 0, 0, 0, 1463762, -3603420, 1982104, 175826, 0, 1630452, 0, 0, 0, 0, 0], [0, -243656493, 0, 72847238, 2037823, -589962, 876270, 50609, 0, 0, 0, 0, 0, -1894057, 0, 294981, -1793451, -193763, 0, 0], [-3773962, 0, -979497, 0, 0, 0, 0, 0, 465410, -503013, 773321, 8986723, -562457, 0, 123576, 0, 0, 0, -486037, -849813], [0, -39173425, 0, -82195196, 5130337, 0, 0, -10080901, 0, 0, 0, 0, 0, 0, 0, 4150521, -2704348, -164182, 0, 0], [0, -7602815, 0, -20414933, -2655078, 0, 0, 1655003, 0, 0, 0, 0, 0, 0, 0, -3438761, -4175641, -249979, 0, 0], [3430688161, 0, -15427819, 0, 0, 0, 0, 0, 0, -2869736, -1336368, -9234741, -5234171, 0, 1233601, 0, 0, 0, 0, 0], [0, -470391298, 0, 55040814, 2537742, -745308, -1636488, 521184, 0, 0, 0, 0, 0, 3220952, 0, 372654, -2686272, 669714, 0, 0], [7659650, 0, 3961393, 0, 0, 0, 0, 0, -921094, 2430481, -4400415, -16555413, 2081245, 0, -2059720, 0, 0, 0, 302951, -1744701], [0, -17064595, 0, -37075033, 3600566, 0, 0, 3350917, 0, 0, 0, 0, 0, 0, 0, 4354851, 187647, -3887775, 0, 0], [-10182373, 0, -1496020, 0, 0, 0, 0, 0, 495752, -177079, 106282, 21234581, -816956, 0, -820658, 0, 0, 0, 118943, -1194741], [-9847799069, 0, 15957834, 0, 0, 0, 0, 0, 0, -1789856, -2519970, 2080748, 1102426, 0, -124104, 0, 0, 0, 0, 0], [9133074, 0, 5741368, 0, 0, 0, 0, 0, 3140494, 1650956, -4872159, -16437623, 2105446, 0, -2806484, 0, 0, 0, -316613, -1494515], [-8886840772, 0, -77775118, 0, 0, 0, 0, 0, 0, 388136, 7412838, -6054284, -2227630, 0, -1599024, 0, 0, 0, 0, 0], [-4721390, 0, -8088629, 0, 0, 0, 0, 0, -373910, -4901717, 9990389, 14601643, -1800709, 0, 3889424, 0, 0, 0, 76843, -1643349], [0, 20420300, 0, 57704536, 1347854, 0, 0, 2859843, 0, 0, 0, 0, 0, 0, 0, 10017464, 5431914, 2762412, 0, 0], [-19201478855, 0, -87721858, 0, 0, 0, 0, 0, 0, 3277393, 116172, 7871667, 4090756, 0, -309845, 0, 0, 0, 0, 0], [0, 781272880, 0, 62743140, -283863, -978408, 428400, 254736, 0, 0, 0, 0, 0, -7089152, 0, 489204, 518331, 20268, 0, 0], [-17459519, 0, -10439003, 0, 0, 0, 0, 0, -3357798, -4074714, 9828327, 28836200, -4929119, 0, 5997342, 0, 0, 0, 1531038, 8722382], [0, 104983795, 0, 244513901, -12905546, 0, 0, -3758238, 0, 0, 0, 0, 0, 0, 0, 8879821, 8091213, 4669731, 0, 0], [-18250852, 0, -1721947, 0, 0, 0, 0, 0, 918674, 308291, -1075919, 37642181, -1469855, 0, -1787348, 0, 0, 0, -209923, -2009151], [0, -67882230, 0, -147016684, 1195790, 0, 0, 19355838, 0, 0, 0, 0, 0, 0, 0, 2926302, -12380656, -602080, 0, 0], [0, 1838004097, 0, -40093100, -1296499, -377574, -3420570, 695953, 0, 0, 0, 0, 0, 2894359, 0, 188787, 789333, 1203119, 0, 0], [15723856, 0, -14770744, 0, 0, 0, 0, 0, -949460, -11299612, 23073954, -19926978, -1146028, 0, 9923968, 0, 0, 0, 929434, -2546226], [0, -35907245, 0, -57245760, 3520803, 0, 0, 19081151, 0, 0, 0, 0, 0, 0, 0, 20384529, -3660646, 1365650, 0, 0], [12572498, 0, -4778676, 0, 0, 0, 0, 0, -2213252, -3832930, 8772486, -23700916, -2104824, 0, 7205260, 0, 0, 0, -2677004, 3547928], [-39934292423, 0, 65876038, 0, 0, 0, 0, 0, 0, 3754205, -2062500, -4272425, -3726796, 0, 3181167, 0, 0, 0, 0, 0], [0, 2381288723, 0, 164411094, 6624807, 118710, 576270, -135615, 0, 0, 0, 0, 0, 3497055, 0, -59355, -6548547, -211875, 0, 0], [10763958, 0, 10124728, 0, 0, 0, 0, 0, 8620088, 1764234, -7838512, -22856082, 374048, 0, -2397876, 0, 0, 0, -1552390, 7550378], [25397047, 0, 14200452, 0, 0, 0, 0, 0, 127716, 7466345, -14996548, -52626849, 7902304, 0, -8762258, 0, 0, 0, 2398341, -6801787], [0, 47223975, 0, 70818376, -14723988, 0, 0, 25423519, 0, 0, 0, 0, 0, 0, 0, -34484981, -5279193, 1410612, 0, 0], [-7043168572, 0, 75106175, 0, 0, 0, 0, 0, 0, -4517256, -2850477, -4741568, -2511585, 0, 281602, 0, 0, 0, 0, 0], [0, -149565330, 0, -357934126, 19591111, 0, 0, -14404252, 0, 0, 0, 0, 0, 0, 0, -24874916, -10321955, -4015484, 0, 0], [0, 2013330358, 0, -574641188, -15540316, -3332148, 2763996, 650050, 0, 0, 0, 0, 0, 1436822, 0, 1666074, 16556340, -365974, 0, 0], [0, -156146291, 0, 594797628, 17084217, -3460878, 4089150, 472101, 0, 0, 0, 0, 0, -10378781, 0, 1730439, -15825879, -786237, 0, 0], [3122387, 0, 27123446, 0, 0, 0, 0, 0, 10718648, 13784195, -32927714, -9808531, 7314058, 0, -18477650, 0, 0, 0, 560603, -4195245], [10594631939, 0, -246481862, 0, 0, 0, 0, 0, 0, 27652407, 19546440, 43317649, 24369396, 0, -5421143, 0, 0, 0, 0, 0], [0, -12401430, 0, -32671494, 8783200, 0, 0, -17879327, 0, 0, 0, 0, 0, 0, 0, -14638714, 6302914, 9250366, 0, 0], [0, -445295795, 0, 144140874, -4808862, -3538062, -10607958, 2947347, 0, 0, 0, 0, 0, -17175539, 0, 1769031, 3630546, 4125663, 0, 0], [0, 2375149896, 0, -895698121, -17854475, -5074500, 7950378, 366437, 0, 0, 0, 0, 0, 15816027, 0, 2537250, 20025288, -1804376, 0, 0], [-19332894, 0, -29903588, 0, 0, 0, 0, 0, 3692740, -19833802, 37821234, 74194000, -3644624, 0, 9715900, 0, 0, 0, -474800, -22119572], [-21177515449, 0, 148364902, 0, 0, 0, 0, 0, 0, 5391242, -4804392, -2592532, -3594646, 0, 4596760, 0, 0, 0, 0, 0], [0, 200866150, 0, 494984156, -8846746, 0, 0, -204245526, 0, 0, 0, 0, 0, 0, 0, 34845738, 31326484, 18232888, 0, 0], [0, 26389540, 0, 128040976, 24631740, 0, 0, 82243322, 0, 0, 0, 0, 0, 0, 0, 75459100, 29909648, -5475112, 0, 0], [0, -887373885, 0, -227003110, -17984933, 8330982, -17827386, 194237, 0, 0, 0, 0, 0, -6057205, 0, -4165491, 13625205, 4553965, 0, 0], [-15377894027, 0, -1394170, 0, 0, 0, 0, 0, 0, 6712429, 39026880, -57528197, -28054028, 0, -1420141, 0, 0, 0, 0, 0], [-24377123179, 0, 434485446, 0, 0, 0, 0, 0, 0, -25137711, -41197050, 25815733, 12277572, 0, 1260589, 0, 0, 0, 0, 0], [-30750388, 0, -32653588, 0, 0, 0, 0, 0, 9173912, -23704552, 42822148, 84529424, -11474180, 0, 17055784, 0, 0, 0, -1043848, 3201048], [0, 281345240, 0, 524990546, -12681374, 0, 0, 107517230, 0, 0, 0, 0, 0, 0, 0, -84118160, 43587674, -9850822, 0, 0], [0, 7725524258, 0, 232835260, 17788646, 801444, 4978212, -1096850, 0, 0, 0, 0, 0, 23830354, 0, -400722, -17092518, -1792978, 0, 0], [0, 2085628, 0, -832308586, -21796376, -1179696, 15530988, -2195266, 0, 0, 0, 0, 0, -4484102, 0, 589848, 24581490, -4980380, 0, 0], [16368088, 0, -17606706, 0, 0, 0, 0, 0, 8542662, -16371988, 28472645, 3440559, 8831080, 0, -2236472, 0, 0, 0, 10985961, -29870545], [10266100592, 0, -118985844, 0, 0, 0, 0, 0, 0, 15757198, 60369618, 22131180, 22201192, 0, -22271204, 0, 0, 0, 0, 0], [0, 489322460, 0, 1133740112, -63200668, 0, 0, 292152650, 0, 0, 0, 0, 0, 0, 0, 51698244, 34663824, 5532456, 0, 0], [0, -5079253247, 0, -1658635894, -35621783, 3603282, 22400202, -4934461, 0, 0, 0, 0, 0, 24313701, 0, -1801641, 38754603, -8067281, 0, 0], [0, 11657597582, 0, -397580966, -29059903, 9000012, -25551768, 1258624, 0, 0, 0, 0, 0, -13499208, 0, -4500006, 23301273, 7017254, 0, 0], [-54829884148, 0, -286980809, 0, 0, 0, 0, 0, 0, -6956217, -87977142, 50585870, 14147337, 0, 22291196, 0, 0, 0, 0, 0], [17022732, 0, 21106569, 0, 0, 0, 0, 0, 8946590, 8443691, -21360677, -31689485, 2162897, 0, -6890300, 0, 0, 0, -8108425, -299689], [-142753476140, 0, 463576145, 0, 0, 0, 0, 0, 0, 28670328, -7274475, 92778856, 48478353, 0, -4177850, 0, 0, 0, 0, 0], [-137111598, 0, -17402845, 0, 0, 0, 0, 0, 2664042, 465059, -2262139, 271525963, -17852829, 0, -3144176, 0, 0, 0, -5797221, 2217099], [0, -456602335, 0, -1067489622, 11197125, 0, 0, -60558837, 0, 0, 0, 0, 0, 0, 0, -58922289, -80123342, -4042196, 0, 0], [0, 476655710, 0, 1060770102, -56243646, 0, 0, 30495454, 0, 0, 0, 0, 0, 0, 0, -26055786, 39087496, 38183326, 0, 0], [-70313879456, 0, 270716914, 0, 0, 0, 0, 0, 0, -13926210, 18189870, -65846910, -33084930, 0, 322950, 0, 0, 0, 0, 0], [0, 2915931390, 0, 1768186480, 47237900, 8370588, -5704428, -1839458, 0, 0, 0, 0, 0, -9985230, 0, -4185294, -49583736, 506378, 0, 0], [122400603512, 0, -349662902, 0, 0, 0, 0, 0, 0, -81054190, -20464422, 6489114, 16011422, 0, -25533730, 0, 0, 0, 0, 0], [0, 207646245, 0, 525449807, 13469474, 0, 0, 95939213, 0, 0, 0, 0, 0, 0, 0, 34908387, 54998723, 33719681, 0, 0], [-59430485, 0, -62542007, 0, 0, 0, 0, 0, -37485146, -19576796, 57896165, 128158372, -10310191, 0, 24406922, 0, 0, 0, 4525762, -22375626], [82720189555, 0, -993166380, 0, 0, 0, 0, 0, 0, 53615558, -43761810, 105067336, 43564928, 0, 17937480, 0, 0, 0, 0, 0], [0, 8929834559, 0, -994461138, -43408707, 6193998, -36471546, 4013925, 0, 0, 0, 0, 0, 6454523, 0, -3096999, 36297783, 11124849, 0, 0], [0, -209039255, 0, -467398138, -119106407, 0, 0, 17194371, 0, 0, 0, 0, 0, 0, 0, 6736567, -160914258, -14248344, 0, 0], [0, -4877722556, 0, 985728502, 23533898, -23351712, -11367012, 9678406, 0, 0, 0, 0, 0, -25034390, 0, 11675856, -21536448, 7680956, 0, 0], [-68223232, 0, -41584727, 0, 0, 0, 0, 0, -108371886, 24933203, 4319537, 18978113, -27803587, 0, 44724340, 0, 0, 0, -10198791, 53820805], [-215260137817, 0, 206795022, 0, 0, 0, 0, 0, 0, 112250151, 72618708, 82860281, 41789880, 0, -719479, 0, 0, 0, 0, 0], [-29449754, 0, 51053256, 0, 0, 0, 0, 0, 7293112, 36358218, -76362992, 57816062, 20627120, 0, -49583412, 0, 0, 0, 4078090, -41206854], [0, -331686755, 0, -777427572, -32290273, 0, 0, -587362923, 0, 0, 0, 0, 0, 0, 0, -83575181, -98627624, 35858470, 0, 0], [0, 5945221479, 0, 3152567950, 106037240, -6282330, 24688590, -2020655, 0, 0, 0, 0, 0, -8057905, 0, 3141165, -100875420, -7182475, 0, 0], [137518454848, 0, -901605528, 0, 0, 0, 0, 0, 0, 83882606, -86378370, 49068812, -4610908, 0, 58290628, 0, 0, 0, 0, 0], [66634500, 0, 80177513, 0, 0, 0, 0, 0, 52133650, 27393687, -80854199, -68397363, 40647205, 0, -67390716, 0, 0, 0, 1154557, -80128703], [0, -378922775, 0, -888210325, -30152282, 0, 0, 457164067, 0, 0, 0, 0, 0, 0, 0, -5943497, -105936837, -48636723, 0, 0], [0, -16653069879, 0, -1300413031, -55637750, 21786990, 51945348, -15919888, 0, 0, 0, 0, 0, -74348088, 0, -10893495, 60664143, -20946281, 0, 0], [-165716645678, 0, 522008945, 0, 0, 0, 0, 0, 0, -20423105, 28613592, -22656054, -3786293, 0, -15083468, 0, 0, 0, 0, 0], [0, 912283744, 0, 5117956150, 192932978, -21398424, 98011572, -9202454, 0, 0, 0, 0, 0, -21093378, 0, 10699212, -173031312, -29104120, 0, 0], [0, 1144756405, 0, 2567047687, -51209470, 0, 0, 277936813, 0, 0, 0, 0, 0, 0, 0, 26826371, 177741811, 21757225, 0, 0], [-41193472, 0, -14301286, 0, 0, 0, 0, 0, -70376532, 29062758, -22937250, 80323990, 24672938, 0, -26723208, 0, 0, 0, 14091150, -95036786], [0, 11638365, 0, -105787386, 155924874, 0, 0, -61982893, 0, 0, 0, 0, 0, 0, 0, -104642607, 158252547, -26749182, 0, 0], [0, -17697347764, 0, 490544020, 47602124, 27294024, 1963680, -9425288, 0, 0, 0, 0, 0, 103511736, 0, -13647012, -51823848, -5203564, 0, 0], [0, -329358960, 0, -453332078, -43658486, 0, 0, 205955178, 0, 0, 0, 0, 0, 0, 0, 253079400, -109530278, 18178234, 0, 0], [-14101092, 0, 86493686, 0, 0, 0, 0, 0, 149412652, -6247626, -62211074, 126178074, 8358766, 0, -58782480, 0, 0, 0, -14007806, -7345718], [182394650275, 0, -461564482, 0, 0, 0, 0, 0, 0, -33648329, 172161810, -53497833, 9063328, 0, -71624489, 0, 0, 0, 0, 0], [248523408, 0, 36771273, 0, 0, 0, 0, 0, -1829102, -887933, 2690417, -571818415, 12587965, 0, 27788276, 0, 0, 0, 17680681, 100730773], [0, 1578896730, 0, 3957510682, -256643302, 0, 0, -137365011, 0, 0, 0, 0, 0, 0, 0, 385368746, 59136044, 98569130, 0, 0], [-81093516, 0, -61090582, 0, 0, 0, 0, 0, -26588224, -21477506, 56249124, 193327316, -14200474, 0, 22653128, 0, 0, 0, -6460192, -35075380], [0, 22398106305, 0, 6339170756, 113481181, 5839386, -123873594, 18699137, 0, 0, 0, 0, 0, -102799321, 0, -2919693, -135100011, 40317967, 0, 0], [0, -12438211503, 0, -534147547, 82983358, -33363282, 112315260, -7598116, 0, 0, 0, 0, 0, 134533468, 0, 16681641, -58703601, -31877873, 0, 0], [0, -1499914050, 0, -3294935340, 361541922, 0, 0, 842945122, 0, 0, 0, 0, 0, 0, 0, -154226118, 61559112, 159101688, 0, 0], [-160315604, 0, -128710023, 0, 0, 0, 0, 0, -135718856, -13941867, 95743162, 241117508, -56407693, 0, 91300260, 0, 0, 0, -24904742, 35095104], [0, -7889066397, 0, -3250496721, -73745856, -31358646, -9453708, 12028500, 0, 0, 0, 0, 0, 61066540, 0, 15679323, 77396679, 8377677, 0, 0], [0, 9162872654, 0, -3495003746, -199174594, -9434364, -45428232, 10716160, 0, 0, 0, 0, 0, -203029224, 0, 4717182, 193175616, 16715138, 0, 0], [528212377559, 0, -271184304, 0, 0, 0, 0, 0, 0, 49882237, 239890908, -203571427, -84141122, 0, -35289183, 0, 0, 0, 0, 0], [0, -1861263330, 0, -3857243726, 189871896, 0, 0, -726542802, 0, 0, 0, 0, 0, 0, 0, 256839034, -182380770, -19303434, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_75_d_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_75_9_d_d();".
// 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_75_9_d_d(:prec:=20)
    chi := MakeCharacter_75_d();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 9));
    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_75_9_d_d();".
// 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_75_9_d_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_75_d();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,9,sign)));
    Vf := Kernel([<2,R![-409079808000, 0, 48388216960, 0, -442732064, 0, 1478418, 0, -2057, 0, 1]>],Snew);
    return Vf;
end function;