
// Make newform 230.3.f.a in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_230_f();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_230_f_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_230_3_f_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_230_3_f_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
        poly := [88804, 1329080, 9945800, -4419956, 34721, -4380588, 40544632, -36894604, 16970128, -1833716, 460536, -439644, 250686, -18724, 1352, -1316, 1020, -52, 0, 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], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [10688815452472003980334249595793098530530435308, 78657824190183874641743908311749075307832281984, -56356072234775410583024782701565563502493098676, 167077200152368023228280349734098700802694622668, -76891272539441105945633731617636492918971199389, 330797719640300608654675605774430998552085961218, -291275103290397301448087368731969316369996939173, 147439806001299347449262032753666067394673770127, -16693489520255817126608873734813396835687218149, 3919076635604918178826553102762725510884367214, -3342629452053242792639562653827756553684362873, 2174745323263797646693223559887096351268231311, -166877405860601484196126860147433571654109607, 12481746385157622573151997363654811254222142, -9339065096118140338541842713123897506011991, 8883025289704211285452414459518950720892141, -459105795116673615680060926755509199676443, 3654821481287472075164392598509678607362, 2420076267756835405959818460134865890833, 8830610457517080857854730964001399371961], [-22367216549800729814127042942695106124234627415758930544, 48600457127958834876537846697233653667915882686573038884, -20392948151918752840516677728751056701451214941142506184, 60122501996062625419590887230413099701207843465189118040, -224778512487215993472168128311775319497017967777358710106, 260653134681822847365655100818365128335290616022572156789, -149379416491101594184781225480238039364729513641365281051, 40191316621059324454529312710018649004404078109041695295, -5808448267729331638150443706151001985361731438968552073, 3093170343269167994593979943969197901748328942405553554, -2009820478637811525204672002291983069570695312948529400, 547720319291630187017252712423636512092882285005784884, -41305716222868608882658405222929123614542155062854070, 9380398314516524155675027480653721132900574774038959, -7302794712312536996984589807635583655340248338910341, 2106173325817853168490769146913536687306168101329057, -94478305783167973790557419311743060146999888689867, 628626012167642362407628979370402923636098859074, -4781151766075120976639004343119345228842122630804, 1819753578324712504526576413817241569743454316624], [-27209760415267016604117630998048116551450689250563480, -4868700979621354021952619076206640169658388911203772, -34308024516045692319204033135242086021497937535246404, 49562166367249288973728141123704814658166639972633690, 104843792064889575228898960263558778852688314199988518, 93583496054418221788577826527287980220908464697707786, -153696551430753657510602025863560107039450712408229892, 102031758086603565394449027130083872737156137635478602, -10674824188607993972297184915824502297530309698127244, 1025726160885384676261519600483190678163994905526105, -1569634924236151005278599851836804377983000696882146, 1542965410795817034105593897729803729320817230637201, -119516556424496923548702442629718920394798779314402, 3223492881752742619912898513005306797235400457246, -3258856661862252516337412556466007982400860055396, 6399240925409583851901134598220063035051141745182, -343228852378795311904303616611347167084657636208, 1211942074335769451912498080825811989245193343, 5320375767630452368450465708124746674370287278, 6549367733730658879150074290359380865184284841], [97712727383084661921618541085071851696604054182717971460, 355755857999798043713586228464740870823341053234178875932, -160032902732759014853096978487276860846273626935411992628, -975023067457456720628079047558038973317551348127611327204, 1045378290817888826267962191604727350725265157880275252807, 642127228545030422419103274116552705709990426557115557997, -1000723997850818301393417571075130583446159281837712735218, 504589533389873722991158067596644490471130398963581687067, -42273442866616739263028481121074420581657899818332796551, 5953690621097672698881967470691401561519257469309885007, -11687846658628281395492273037807486548094972192590803148, 7626565229772043018531026928145563675487552537525362619, -533583790176148126864220614289290740187059915951457419, 11249756788600071514204751542448281048435573534832507, -33444041729695388200321865678331084011507480359143558, 31291262983302262640399604963262129001788735151768037, -1599408570682637805857386563661510742867449406422777, -21672506879490156466693066920051446093594404001203, 6027719678905438126737386722564346577483185794832, 30962513938623937084555984750512239529095221012081], [1563106292841652517399858849638300935350619153428166268, 321380640714833141335538609740942113247240188343686140, 2012944023166442210184810571466683313018586991993657296, -7215699774424909608498808615308969151325572417087425236, 8348151298769199078543411919780576313153154853528879535, -14396227813753488465207241190034351140761006338704301605, 10968958620247789642683069501289397180663598482141918530, -4970213600619315400673192221830594862560766619491049787, 618848318166917947395742781968281793586193266438852397, -171661505298177393306454315288984612692607566686152275, 130488604598353247978083095781195878347696797199546588, -72476107854228385865324361012797501143654078140433027, 5696078680598251232948699676956547584098466011522669, -543530700342900271488232999969654414380749175179395, 391293828098158981234336898077031836045335857692830, -293930613906984437206980020964713104783495016373101, 15095742610924371430015097789132896194543257514411, -139432318902531867990888855054733040477203877265, 4718994377849284974489292784938470539806073596, -288087466273575350965900517091632089483526486489], [28613845604987291734804390327323337966678560614138487652, 47904669711049550933658805737113836818139359696598529964, -31324498189059719127857809922523827478116704204034786292, -27257376477826181892315614667947761054351235634742400012, 164982228084839213044410217709234947743103863934486223559, 77189620648787149079133161804876116547258548725881816359, -151619468859720570567151303911057653870525170492032280486, 97028828236771714428357396365682950175003742579541025266, -9239522564229160979638414460973442388825254541596683364, 745199931909413119457883662212535227592669310904181444, -1590258340191791960105218975360584352060864994420890529, 1472102866199263334934990008095794592490746976114027505, -110217645883162232419935264753882885839704686341537027, 1896369133139375408219873118799635452110265884475169, -3547723676911097149277326194392472673638058854441486, 6100353659327041145737711786772656032237176914773790, -323866968448424516834202767329793009821300004376560, -604578393968679292537281116008291883192080555316, 4506596269953035489387740534533222515710834698293, 6211663782696898587751013758858559185149041028591], [12116042654675171554525534260167997502215860721224, 186767559338813846894334416833672529641317115136124, -104163116903317514697426940745319096702502808714120, 12079494845499678561404770776490139750427626904144, -127851438591024641314050775609947430035366946719806, 770537723672804251078831103272573374548688712330513, -683645734698279857704262067165441271251374043823215, 306833917852658760984719920885408577973674098645945, -33470271137237269135495154452243420371273025263954, 8757421441409031875914056533152165298405622006005, -8208724269251208060649355460243413950896890459551, 4520731160517519536940645207817988907922356132821, -337660754258512315507994428532738219369583580210, 25638632262647356906100294050014301690270196955, -24925049183355788619317430674038319741604292877, 18361345960656015341791588453437175738438105467, -933125782374779294710644090103287209876897334, -360591363895768475488012950560095017734117, -1315760958170045047820354913636208506422189, 17934254114885912718681626838579024380084623], [-6593168083127156478165875700954946503686980078154830124, 1733308178833784735620843660857587662877010815558354048968, -764169307017140745663717411306684428428289345587751538180, 77321560853010594788464986337852859907734565118043578852, -827270353556642550788701895650034428024342992395339304377, 5424781621361021375707088623784097424810418212023274354528, -4780171909216277113639609832510270670280352961561101544672, 2153119651752237810775939540524856982875518100434820951729, -233482103397269205614742286028295503049198655411240590305, 62041859309887049192046673091023041327445861883520703738, -57254247022834685030096802435945079425391987839023005056, 31737738625065038606240625847128705489050786317214328517, -2363052625325620529803238107465171416288696785046188723, 183752975716010714277294043138769774757171176340063448, -173189067298776374534029572544652852305516119360945192, 128950621238283338981500412988649660940884903389082891, -6540578946761894625440521306655238978111914577079111, 4982147877713448024755133101774625650107199601518, -6896732493782219138077996465969104688091695434540, 126050512079513211642473357496678736354691814775571], [398261367760152221047915771531070311266733097607402928, -119253301303236392275942571679467012888438941419028402380, 45193467103225765823144984329358751289571484283963912592, -9213297331562310543890489659234170486060391605961826880, 95322437604781606754329432079488074564699815565414013946, -445577638929129147299274759594463024361666388571025988415, 381323162022926092626859493147244009707447422545009363915, -167979944755470186967908157282465990483597141718200565539, 18469244534658809880482624046425643250867418413691851338, -5106993819947514813325445939487313143527559671582310635, 4600608742667927173803242837170520397446392047414085945, -2470754583284588991113547242639339212075147039561679873, 184303036957285215626250697498348989718494689882271994, -15129362571458226127766385429275601266077650572859141, 14092279917022992192104096359795009606205638779645197, -10023192232924528557074572775884118485939691619109257, 507091334892425670275303796207915938834799475094634, -378164109813754300454391005837859805107307402621, 1198161929658621322122580820693024506783451286071, -9764805026722161330822538132998830633103310055251], [-47645035812091313438758648706584932195135896825729812984, -1101683589397914616033062986098763380526698052709116998012, 299801453809582182991911304567630713568719884105364025080, 163500400742083524636200925606018390642181946532215835812, 970224672426290137008051436411392385043337219775893725348, -6474292066617726778914579587520665542799292624865219483357, 5771212656866604432940650156233390308546972577812761306573, -2584409632277013359333149535408388214451884270770672888121, 280548608924194572914270035119464113495345834045176080390, -73386721150335095385876567385593410342477156296840235047, 69464424421939666793957450597632113649596961272555659199, -38094854779346411656148556776382202664807591047306750813, 2839639250358602063265030817168343778142501383208624652, -213550617559595854936638044827048851842052000989455027, 211496113247901215138614675021137708331497219030427983, -154710121089088901580690956855356101652010983852067599, 7857910208490205928328835289397661849673522451594634, 7888735010769867056973635260752293661559892823763, 12952941077768189394010872667632245027986080919005, -151015567491022627881778689825268037741737068942599], [228331782688554909767988635973256313600492633578916477100, 1690724896959589041903314718489254242502564992427312300828, -1040356677310205638976104281407940551788551703776543628692, 885021066856554841108285560447338275940360227258530124284, -1342590541076471180343737839662777074245958984973841492327, 7023124470688259953088922709277775024259785501750704501103, -6202578507077332805458757319521463227734685666619941021872, 2877982505066037514221716374995086769054571592573533505158, -318808571735162534960128198257884229503296753507343863079, 80841263595627197576268522302845260300405565008593890123, -73531395621972190741299624518190443247609073401434549252, 42447652730176157623785555406768067881293704583601895636, -3202054064135068196026893202580542376481322666740468261, 243042830496546817646282981909613175565749521447636653, -218393914245739415764961725878624138563958386333411712, 172746756886519781214563635172067349716047467557794538, -8829842018967295670894704303751224107154630786558393, 20699902765567196326400203829975625223269190184693, 5903763378980564760064323467139874328135723688608, 169677254212111464886933351534643769822288941485624], [3632887822301001567932668245118908445201776135867741100, 55929454158350608074006070072705844280115034744761203060, -44321585444400348954994093923923296692225586569423326956, -5232996495530224622901905855622056860412384245451050530, -40361195693876253903075487195583885871646328695600696027, 250799076505475759158838466845578900026337094735685573674, -225156165545146057291036569955077740928257057076016569705, 98989628493685587400408477360710224405917384645515739070, -10738844920867168640341608247393858671803992746145259013, 2814118636827216736135223969560380737068246716713855179, -2725118429187986866303084159752998465877484359893958065, 1456297939874868636590733408341638504207271841726570985, -108397140405163565922006803015085043806088516791408953, 8028917723208438251311152269651067904954051383851574, -8389807626971427074851420681327070158918534074623599, 5905920238952538144485760078698810142146654449669410, -299630380277024972512410984498781831375980195997947, -892089108339020163313737369577883805225162466675, -856777588924188429184254740208369431135529797227, 5746619449293440210595525703664717233438170016661], [15747772988256942996962774191035832450581937555573321616, 117534626295091148250811452042990191481178322727401660460, -57215996539772508701227188695007099640223848888392147056, 28093646026193850691056198735352666369076073561300761628, -61611722400303900632253294318290404547194094915438700914, 481497361766224978523519941845154738019190089974476699445, -435868143580371561242750596079533459733079311597867593593, 203380548831433644156580920900145698473384986667609347603, -22174935694477509979585347539638064583877015302131610030, 5506498772331288938543540781145309405994628847419538031, -5164173542344336744813536802657164061329827653569285283, 3005072025686561871242705255899281121199736022501884623, -225569525539722217904803148091393792962065250870071162, 16390514492355575178130296448787652994061585271787383, -15304885366016673453708844265269648620539815369453991, 12236656143227679942382864116728424720420872270668809, -625385710115446532306851119127611854459928447380670, 842010228241299836456577623176103337524505292441, 554071253167970396402796207454719534829882509643, 12025357705077370765462454116618267914397639817473], [-148132544131037681658862707242623817505700030945846699792, -2643934210582281755767102937791155084314842416975948253184, 786461825925385595336266780138177064194388873493389123772, 92599457751613427975816753688146651551077000677221839092, 1774405450299266584515425887794768188580412094058250903666, -11050045752127139745415235753430748077780966004185704210644, 9744838879412442944963858639669291504065461398803825340156, -4388314001441622093161626507571195164855624508237247340326, 478553559639153066112820959384510396280604400629694922649, -126143782333194466636591643191443945828115450556249674209, 116860963868005848973091671493445380827534842977939091199, -64729252645621825694638878733723607677361777331974292185, 4833059270090407087792939610688658777116139421187292202, -372301793174012340553853665609111632404830878703167044, 353812369969450090331302109506062883611661325743184676, -263047380872483330485808327716670579194043400066390310, 13362606427168227156380066285843201172703117380856215, -5558814587762754190517650142395763353746649523739, 14812797768807010908571694598631284694212017034497, -257140432373413603208171452980241693167476638872811], [-194451960730200379031753560113743703437954483595850189916, -2634380131102991058465322082003366404225881340106226011584, 846961587528599355859139318329984374984331671792116112504, -111591819130780488555781975705979395020120482002340216720, 1915051745825903288843067347122644561036697558584159274691, -11456419823629866215020285290052719479527970950887326962364, 10068793689286337894002540785649852097702241651386503356151, -4540911873297122757213960721221286391683716144878952348435, 495769023262002321158851804729282608221493935938647499578, -131060032488020550133852211675611576082150868962316599499, 120673067465503776068035290806851808996603980940639948180, -66955513769431109448856598490411959906761276762711311154, 5001134355341334512168598418397040526106239513568310085, -388105075879894624330419264290689395885066462247825624, 365012551169790918237605420189439370975656989178264861, -272085142943206227987771172517033535339885268347169697, 13821059146711742244008401515596640433452656542302222, -10338924092416154009615080501960950198109479877989, 14094824670023840821073342949329888485857032408284, -266028646442241197321993150190705804668183350133894], [-215709214761485689619106811572117273241028138418466594168, -3317665838616884407220274879790326241326414339882822186588, 1659174509386515196455008423234228118557161874823512114436, 714774754038397470648704583216125418226303722140229213032, 2489551954346398926176137394368064802907126528857937623162, -15792847458084998539593663148508544925679393663345373145033, 14048080141097674033684377807545800858818596316495830777047, -6195510365945676532968322429193396166185395937065152307871, 671922635668144254854550953471529359649877862690812553752, -178247295820887793526831689816414230857519124125701694663, 169814078601368293810983767667758540808635105355219929249, -91245584213204295345220105507548522643388375217986915619, 6787416941459136988638309276262134113065841279831781062, -514106587442735315470795929285854272413921613417532343, 521312871014658096717651586919693045528134039937989197, -370235131823842728916753019672067822415305741943006057, 18768809380626750471246804886720128287885971633015592, 36463083857595589637265679242320607485001345252227, 47754852167420552405195688039644012485854947617591, -360553410020086529677876847722052001393546668700885], [6394790764076782468770007587540275964311204686974549392, -1656328466550314948968286813881919865845301829567501877444, 723679020648156851420967824067763928706885521493512106560, -157301207003032250723621733748407991313778509023953054056, 1622845332419087696115536465421987802235282915423009495616, -7346353595578790507563140472404795690240857987938443288429, 6311106654684607096448747411012986942972596593714647211286, -2774849346892304230185450797411479613249159508242199129972, 305942887868657021833689328648977956557258846070224468120, -83985607695234219608332680959255310056439761216728624879, 76230323764101129001480371704352045120069574550036823568, -40804333841877157211325484538885907600934460129623889446, 3048218794247691790817753521757057677222658517850487204, -247547659214500449535108619665606128870541671516329399, 233921594097130670576701041605583793625470200053243246, -165502310491860642564259996777165541497059698886012428, 8380497653926483898271237153145708027421332510452068, -1558477276958390787462094754108921800955070034409, 21317265141026365576003218654382015708588939376900, -161169878969497309620638001380822313680621203426778], [31656885550941545675154578470335866270159211323680600760, 237073197468675144671381318624537166079036098596482820632, -102494126260579040273073202974447377834267085182621341928, -18456892760746985461530164237205054595699284814067598084, -98705501413684173585212086501369074018925726910800273618, 965099898296577501922579922476780828719094287248631021682, -879648463290717885216024693031060658811245816601378074258, 403111420044752287237662490476172459607672463277334907957, -43467553813407101069318359859990728158953649932642500546, 10943167008105805506459174341907411968456686626907595272, -10495985594630738542257731573824863192214959089187042068, 5955566632663396157744771607110823192786626830133581239, -444311614058265554227572901832453772172885588913640754, 32011818432522962800249002459037277528576249915736262, -31491006416217820611799328909709342251679244019696258, 24228818745450732481025847280458782641678798797588807, -1234492796406671995563294000498501058853147452621442, -425725631924169762515614370184199494351449431648, -265561258041620015642207954861286812490472992088, 23740322076729619370834391555988834109231943729681]];
    Rf_basisdens := [1, 1, 87365741068502462884296048260864869566007389816, 5139139823704624134228823553868288382637029313247387120, 8047869970007241373512699077646089189811902727680472, 35973978765932368939601764877078018678459205192731709840, 241436099100217241205380972329382675694357081830414160, 5139139823704624134228823553868288382637029313247387120, 13017495419206866969760111190868865565335101082584, 35973978765932368939601764877078018678459205192731709840, 2398265251062157929306784325138534578563947012848780656, 35973978765932368939601764877078018678459205192731709840, 35973978765932368939601764877078018678459205192731709840, 1199132625531078964653392162569267289281973506424390328, 2398265251062157929306784325138534578563947012848780656, 35973978765932368939601764877078018678459205192731709840, 35973978765932368939601764877078018678459205192731709840, 35973978765932368939601764877078018678459205192731709840, 11991326255310789646533921625692672892819735064243903280, 1713046607901541378076274517956096127545676437749129040];
    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_230_f();"
function MakeCharacter_230_f()
    N := 230;
    order := 4;
    char_gens := [47, 51];
    v := [1, 4];
    // 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_230_f_Hecke();"
function MakeCharacter_230_f_Hecke(Kf)
    N := 230;
    order := 4;
    char_gens := [47, 51];
    char_values := [[0, 0, 0, 0, 0, 0, 0, 0, 1, 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 := 3;
    raw_aps := [[-1, 0, 0, 0, 0, 0, 0, 0, -1, 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, 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, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0], [4, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, -1, 0, 1, 1], [1, 1, 1, 0, -1, 2, -1, 0, -1, 0, 2, 0, 1, -1, 1, 0, 0, -1, 0, -1], [-2, 1, -1, 0, -1, 0, 0, 0, -2, 1, -1, -2, 0, 1, -1, 0, 0, 0, 1, 2], [0, 2, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, -2, 0, 0, 0, -1, -1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, -1, 0, 1, 0, -1, -11, 0, 1, 1, 1, -4, 0, -1, -1, -2, -2, 1], [-13, 0, -2, 0, 4, -2, 4, 0, 0, -2, -2, 2, 0, 0, -4, 0, 0, 0, 0, 2], [4, 0, 4, -2, 0, 0, -1, 0, 4, 0, 0, 0, 1, 0, -2, -2, 0, 1, 0, 0], [5, 1, 1, -2, -6, 2, -4, 2, 0, 3, -1, -2, -1, 0, 1, 0, 0, 0, 3, 1], [8, -1, 1, -2, -1, 2, 2, -2, -8, -1, 5, 0, 1, -1, 1, 2, -2, 2, 0, -1], [2, 0, 0, 4, 1, 0, 1, 0, 2, 0, 0, 0, 1, -1, -3, 4, 0, -1, 0, 3], [-16, 7, -1, 4, 1, -2, -2, -1, 16, 2, 5, 0, -1, 1, -1, -4, -1, -2, -2, 1], [0, 3, 1, 0, 0, -2, 0, 0, 21, -2, -5, -2, -4, 3, 3, -2, -2, 4, -2, 4], [10, -2, 0, 5, 4, -2, 1, -5, 0, -4, 0, 2, 2, 0, -2, -1, 1, 0, -5, -3], [0, 0, 8, -2, 4, 0, 1, 0, 0, 0, 0, 0, 1, -4, 2, -2, 0, -1, 0, -2], [1, -3, 4, 1, -6, 1, 2, -1, 0, -4, -1, -1, 5, 0, 0, 5, -5, 0, -4, -5], [2, -12, -3, -4, 10, -6, 8, 4, -2, -7, -5, 0, -3, 10, -3, 4, 4, 8, -3, 3], [0, 2, -2, 5, 0, -4, 0, 5, 18, 2, -8, -4, -2, 4, 4, -1, -1, 3, 3, 1], [8, -1, 3, -8, -3, 6, -3, 0, -8, -8, 1, 0, 3, -3, 3, 8, 0, -3, 0, -3], [0, -6, -6, 4, 0, 0, 0, 4, 22, 0, -2, 0, 0, -4, 2, 4, 4, 9, -8, 8], [-12, 1, 11, -1, -7, 0, -1, -2, -12, 1, -1, -2, 3, 7, 9, -1, 2, 1, 1, -4], [21, 0, 7, 3, -1, 7, 0, -3, 0, -3, -5, -7, 10, 0, 2, 3, -3, 0, 3, -4], [-2, 8, -4, 2, 0, -8, 1, -3, 2, 2, -6, 0, -4, 0, -4, -2, -3, 1, 8, 4], [-14, 6, 4, 1, -4, 0, 0, -6, -14, 6, -6, -12, -1, 4, 4, 1, 6, 0, 6, 2], [0, 8, 6, -3, 0, -2, 0, -3, 26, 1, -12, -2, -1, 10, 10, -3, -3, 5, 7, -5], [8, -16, 0, 5, 4, 0, 0, -5, -8, 3, 4, 0, 0, 4, 0, -5, -5, 0, 0, 0], [9, -1, 12, -10, 11, 0, 6, -6, 9, -1, 1, 2, 13, -11, 3, -10, 6, -6, -1, -5], [14, 18, -16, 0, -3, 2, -4, 0, 0, 4, 1, -2, -2, 0, 3, -6, 6, 0, 12, 10], [28, 0, -16, -3, 2, 0, 0, -3, 28, 0, 0, 0, -6, -2, -8, -3, 3, 0, 0, 12], [0, 4, 13, -5, 0, 9, 0, -5, 11, -1, 8, 9, 8, -16, 1, 3, 3, -8, 1, -10], [0, 12, 12, 1, 0, 0, 0, 1, -8, -10, -6, 0, -10, 4, 6, -11, -11, -6, -5, 5], [-32, 8, -7, -1, -11, 1, 10, 1, 0, 2, 10, -1, -1, 0, 11, 3, -3, 0, 6, 5], [18, -8, 6, -4, 10, 0, 11, -13, 18, -8, 8, 16, 7, -10, -4, -4, 13, -11, -8, -16], [44, 1, 4, 2, -2, 8, 4, -12, -44, 10, 4, 0, 4, -2, 4, -2, -12, 4, 0, -4], [0, -2, -17, -2, 4, 0, 9, 10, 0, -2, 2, 4, 17, -4, -5, -2, -10, -9, -2, -3], [-33, -19, 4, -22, -11, 8, -7, 2, 33, 13, 21, 0, 4, -11, 4, 22, 2, -7, 1, -4], [0, 3, 14, -15, 0, 11, 0, -15, -28, -7, 11, 11, 4, -13, 0, 3, 3, -16, 7, -18], [-14, -4, 6, 0, 4, 2, 13, 0, 0, -19, 8, -2, 21, 0, 10, -3, 3, 0, -10, -12], [-4, 12, -20, 2, -10, -8, -10, -2, 0, 1, 30, 8, -9, 0, 22, 9, -9, 0, -3, 5], [-29, -3, -6, 8, -5, -12, 2, -16, 29, -8, -8, 0, -6, -5, -6, -8, -16, 2, -2, 6], [-10, 2, 7, -6, -4, 0, -10, 6, -10, 2, -2, -4, 4, 4, -14, -6, -6, 10, 2, -10], [0, -6, 0, 14, 0, 6, 0, 14, -34, -2, 12, 6, 4, -20, -6, -5, -5, 3, -4, -2], [21, -33, 38, -13, -9, 5, -4, 13, 0, -5, 15, -5, 10, 0, 20, -1, 1, 0, 5, 0], [-14, -42, 8, 8, -1, 16, -10, 14, 14, 10, -6, 0, 8, -1, 8, -8, 14, -10, 4, -8], [-44, 1, -33, 1, 13, 0, 12, -8, -44, 1, -1, -2, -11, -13, -7, 1, 8, -12, 1, -12], [0, 8, 20, -14, 0, 12, 0, -14, -64, -9, 6, 12, 3, -10, 6, 12, 12, -7, 0, -12], [50, -29, -6, -12, 15, -12, 2, -8, -50, 6, -24, 0, -6, 15, -6, 12, -8, 2, -14, 6], [0, 19, 21, 16, 0, 2, 0, 16, 45, 9, 11, 2, 11, 0, -9, -16, -16, 4, -1, -1], [-90, -10, 24, 1, -18, 14, -24, -1, 0, 9, 12, -14, 5, 0, 26, -16, 16, 0, 6, -8], [-50, 12, -26, 23, -6, -14, 2, -23, 0, -3, 28, 14, -11, 0, 14, 12, -12, 0, -15, -1], [30, 7, 25, -4, -5, 0, -3, -12, 30, 7, -7, -14, -20, 5, -26, -4, 12, 3, 7, 4], [-12, 10, 6, 35, -14, 12, -5, -6, 12, 1, 6, 0, 6, -14, 6, -35, -6, -5, -10, -6], [0, 33, 27, -6, 0, -6, 0, -6, -25, -8, -38, -6, -14, 26, 32, 8, 8, 26, 20, -14], [5, -18, 13, -25, 13, -5, -6, 25, 0, 7, 3, 5, -12, 0, -2, -7, 7, 0, 3, 8], [-101, 2, -48, -10, 0, 0, -1, -10, -101, 2, -2, -4, 13, 0, -9, -10, 10, 1, 2, -13], [-80, 18, -16, 10, 0, 2, 7, -10, 0, 1, 8, -2, 1, 0, 10, 1, -1, 0, 4, 2], [-48, 31, -3, -1, 17, -6, 13, -7, 48, -12, -73, 0, -3, 17, -3, 1, -7, 13, 6, 3], [4, -39, 5, -11, -17, 10, 9, 16, -4, -20, 1, 0, 5, -17, 5, 11, 16, 9, -6, -5], [46, 14, -85, 34, -22, 0, -7, 16, 46, 14, -14, -28, 1, 22, 25, 34, -16, 7, 14, -1], [118, -33, 26, -29, 29, -7, 38, 29, 0, -16, -14, 7, 9, 0, -21, -1, 1, 0, -6, 1], [14, 61, 5, -25, 5, 10, -13, 18, -14, 20, -3, 0, 5, 5, 5, 25, 18, -13, 26, -5], [-38, 9, -20, -30, 2, 0, 1, 4, -38, 9, -9, -18, 4, -2, -28, -30, -4, -1, 9, 28], [87, 20, -21, 17, -8, -1, -26, -17, 0, 10, 19, 1, -11, 0, 18, 25, -25, 0, 6, 7], [32, -9, 15, 18, -3, 0, 14, 14, 32, -9, 9, 18, -3, 3, -9, 18, -14, -14, -9, -24], [-124, -6, 10, 32, 11, 0, 14, -16, -124, -6, 6, 12, 38, -11, -20, 32, 16, -14, -6, -24], [0, -38, -36, -14, 0, 2, 0, -14, 25, 6, -26, 2, 8, 2, 28, 10, 10, -12, 0, -2], [15, 22, -5, 8, -3, -10, -10, -28, -15, 17, -3, 0, -5, -3, -5, -8, -28, -10, 13, 5], [0, -56, -54, -45, 0, 2, 0, -45, -62, 0, 22, 2, 2, -6, -20, 17, 17, -21, -4, 2], [102, -1, -65, 1, -9, 0, -9, -17, 102, -1, 1, 2, 16, 9, 3, 1, 17, 9, -1, -2], [40, 32, -12, 20, 18, -24, 9, -11, -40, 10, -32, 0, -12, 18, -12, -20, -11, 9, -22, 12], [0, -34, -46, 2, 0, -12, 0, 2, -178, -19, -16, -12, -31, 20, 4, 24, 24, 38, 3, 9], [46, 2, 20, 10, -36, 40, -5, -23, -46, -29, 0, 0, 20, -36, 20, -10, -23, -5, 14, -20], [0, 54, 48, 13, 0, -6, 0, 13, -222, 4, -20, -6, -2, 10, 14, -13, -13, 6, -6, 12], [41, -5, -17, -18, -10, 0, -25, -2, 41, -5, 5, 10, -44, 10, -2, -18, 2, 25, -5, 26], [10, 28, -10, 49, -12, 18, -12, -49, 0, 35, -12, -18, -17, 0, 6, -6, 6, 0, 23, 5], [0, -1, 7, -44, 0, 8, 0, -44, 55, -9, 29, 8, -1, -38, -21, -6, -6, -10, -15, 7], [0, -42, -40, -8, 0, 2, 0, -8, 42, 3, 10, 2, 5, -16, -8, -24, -24, -7, 8, -10], [118, -44, 60, 8, -8, 16, 5, -8, 0, -8, -14, -16, 24, 0, 2, -5, 5, 0, 15, -1], [-24, 22, 4, -21, 2, 26, -1, 21, 0, -19, 2, -26, 45, 0, 28, -9, 9, 0, 14, -12], [120, -17, 13, -9, -23, 26, -32, -13, -120, 4, -5, 0, 13, -23, 13, 9, -13, -32, -14, -13], [0, -18, -36, 14, 0, -18, 0, 14, 176, -11, -36, -18, -29, 53, 18, 10, 10, 20, 9, 9], [33, 30, 2, 4, -17, 4, -27, 10, -33, 29, 5, 0, 2, -17, 2, -4, 10, -27, 9, -2], [0, 47, 77, -26, 0, 30, 0, -26, -75, 17, 26, 30, 47, -57, 4, 10, 10, -44, 1, -31], [-30, -3, -15, 4, 7, 0, -14, -6, -30, -3, 3, 6, -48, -7, -47, 4, 6, 14, -3, 12], [272, 12, 18, 14, -65, 30, -24, -14, 0, 25, 0, -30, 5, 0, 30, -14, 14, 0, 25, -5], [61, -24, 10, -30, -4, 20, 2, 22, -61, 26, -14, 0, 10, -4, 10, 30, 22, 2, 6, -10], [138, -7, -11, -22, 13, 0, 1, -47, 138, -7, 7, 14, 50, -13, -23, -22, 47, -1, -7, -44], [0, 70, 60, 21, 0, -10, 0, 21, 60, 17, 8, -10, 7, -16, -18, 6, 6, -6, 23, -13], [-135, -18, -22, -24, 11, 0, -9, 2, -135, -18, 18, 36, -49, -11, 21, -24, -2, 9, -18, 1], [47, -52, 31, 27, 80, -21, 44, -27, 0, -45, 22, 21, 24, 0, 1, -9, 9, 0, -41, -20], [0, 65, 65, 24, 0, 0, 0, 24, -107, -6, 48, 0, -6, -4, -48, 0, 0, -26, -32, 32], [-38, 77, -5, 33, 15, -10, 20, 12, 38, -50, 3, 0, -5, 15, -5, -33, 12, 20, 6, 5], [0, 31, 15, -52, 0, -16, 0, -52, 84, 32, -33, -16, 16, 41, 17, -20, -20, 22, 52, -36], [-44, -24, 14, 24, 34, -10, 26, -24, 0, -9, -36, 10, -1, 0, -46, 6, -6, 0, 1, 11], [10, -121, -13, -15, 19, -26, 13, -14, -10, -11, -1, 0, -13, 19, -13, 15, -14, 13, -52, 13], [86, 24, -31, -65, 1, -7, -18, 65, 0, 20, 38, 7, -27, 0, 31, 5, -5, 0, -10, -3], [-79, 0, -58, -12, 6, 0, -13, -16, -79, 0, 0, 0, 27, -6, 59, -12, 16, 13, 0, -15], [-32, 8, -14, 12, 0, 0, -13, 43, -32, 8, -8, -16, -1, 0, -40, 12, -43, 13, 8, -22], [4, -13, 5, -26, 15, 10, 24, 35, -4, 14, 67, 0, 5, 15, 5, 26, 35, 24, -8, -5], [0, -8, -10, -47, 0, -2, 0, -47, 160, -14, 8, -2, -16, -2, -10, 12, 12, 6, -23, 25], [-338, -68, 44, 5, 0, -24, 6, -5, 0, -2, 30, 24, -22, 0, 6, -24, 24, 0, -52, -28], [-210, 15, 45, -4, -29, 0, -15, -10, -210, 15, -15, -30, -34, 29, 76, -4, 10, 15, 15, 0], [244, 2, 71, 6, -1, 0, -18, 34, 244, 2, -2, -4, -48, 1, 24, 6, -34, 18, 2, 20], [113, 36, 28, -48, -5, 56, 0, 6, -113, -8, 64, 0, 28, -5, 28, 48, 6, 0, -4, -28], [0, 51, 20, 11, 0, -31, 0, 11, -218, 31, -60, -31, 0, 80, 29, -39, -39, 42, 37, -6], [29, 17, -26, -49, 16, -9, 12, 49, 0, -6, -33, 9, -3, 0, -42, -7, 7, 0, -4, 5], [-61, 14, -27, 8, -8, 0, -35, -38, -61, 14, -14, -28, -23, 8, 89, 8, 38, 35, 14, 5], [-252, 4, -12, 61, 52, -24, 44, 46, 252, -36, 2, 0, -12, 52, -12, -61, 46, 44, -44, 12], [94, 18, -126, 21, -28, 0, 13, -16, 94, 18, -18, -36, 51, 28, 18, 21, 16, -13, 18, -6], [0, 28, 40, 68, 0, 12, 0, 68, -294, -19, 20, 12, -7, 16, -8, -10, -10, 12, 3, -15], [12, 48, -58, 59, -76, -10, -43, -59, 0, 43, 64, 10, -53, 0, 54, -17, 17, 0, -37, -27], [440, -12, 8, 18, -36, -4, -33, -18, 0, 34, 20, 4, -38, 0, 16, 20, -20, 0, 25, 29], [18, 111, 15, 33, -1, 30, -32, -27, -18, 12, 39, 0, 15, -1, 15, -33, -27, -32, -16, -15], [-159, -12, 117, -58, 13, 0, 4, -4, -159, -12, 12, 24, 26, -13, 36, -58, 4, -4, -12, -16], [-139, -28, 38, 10, -62, 76, -43, 46, 139, 29, 125, 0, 38, -62, 38, -10, 46, -43, -3, -38], [0, -46, -12, 2, 0, 34, 0, 2, -346, -1, 78, 34, 33, -42, -44, 21, 21, -36, -17, -17], [-156, 10, -24, -6, 90, -14, 50, 6, 0, -47, -56, 14, 33, 0, -70, 40, -40, 0, 16, 30], [237, -14, 9, -62, 22, 18, -10, -8, -237, -27, -25, 0, 9, 22, 9, 62, -8, -10, 33, -9], [-126, -33, -17, 47, 55, 0, 39, -30, -126, -33, 33, 66, -4, -55, -45, 47, 30, -39, -33, -14], [-62, -165, -18, 34, 2, -36, 10, 64, 62, -2, 58, 0, -18, 2, -18, -34, 64, 10, -52, 18], [488, -33, -3, -6, -6, -36, 8, 6, 0, -33, -7, 36, -3, 0, -43, 74, -74, 0, 1, 37], [64, 0, 18, -29, -34, 18, 9, 29, 0, 14, 6, -18, 4, 0, 24, 8, -8, 0, 5, -13], [0, 2, -32, 17, 0, -34, 0, 17, -64, 4, -22, -34, -30, -2, -12, 12, 12, 35, 11, 23], [0, -45, -32, 15, 0, 13, 0, 15, 199, -26, 2, 13, -13, 39, 11, -15, -15, -10, 2, -15], [128, 3, 27, 50, -15, 0, -9, 70, 128, 3, -3, -6, 10, 15, 41, 50, -70, 9, 3, 46], [302, 129, 11, -19, -59, 22, -24, 27, -302, 16, 3, 0, 11, -59, 11, 19, 27, -24, -8, -11], [0, -12, 11, -21, 0, 23, 0, -21, -109, -35, 76, 23, -12, -82, -53, 53, 53, -34, -57, 34], [-104, 154, -14, -41, 54, -28, 14, 14, 104, -6, 24, 0, -14, 54, -14, 41, 14, 14, 12, 14], [134, 106, -68, 18, -78, 38, -95, -18, 0, 51, 16, -38, -13, 0, 54, 40, -40, 0, 39, 1], [172, 2, 118, -37, 2, 0, 38, -23, 172, 2, -2, -4, 77, -2, -16, -37, 23, -38, 2, -38], [-195, 73, -55, 36, -76, 18, -30, -36, 0, 58, -22, -18, -40, 0, -4, 6, -6, 0, 52, 34], [0, -66, -104, 50, 0, -38, 0, 50, 66, 62, -14, -38, 24, 100, -24, 33, 33, 2, 1, 37], [26, -19, 19, -39, -27, 38, -1, -49, -26, 53, 103, 0, 19, -27, 19, 39, -49, -1, 40, -19], [-266, -29, -55, 8, 47, 0, 41, 25, -266, -29, 29, 58, 22, -47, 35, 8, -25, -41, -29, 28], [256, 10, -2, 7, -14, 0, -16, 0, 256, 10, -10, -20, -13, 14, -30, 7, 0, 16, 10, 60], [0, 53, 26, 23, 0, -27, 0, 23, 245, -12, -70, -27, -39, 53, 43, -15, -15, 4, 6, 21], [-275, 57, -33, -36, 2, 24, -40, 36, 0, 65, -3, -24, -41, 0, 21, 38, -38, 0, 51, 27], [50, 51, -89, 40, 36, -38, -22, -40, 0, 24, 2, 38, -62, 0, -36, 8, -8, 0, -16, 22], [346, 52, -1, -60, -4, -2, -56, 2, -346, 53, -51, 0, -1, -4, -1, 60, 2, -56, 101, 1], [372, 9, -111, -10, 3, 0, -20, 67, 372, 9, -9, -18, -36, -3, -73, -10, -67, 20, 9, 36], [0, -32, -13, -75, 0, 19, 0, -75, -263, -27, -39, 19, -8, 27, 58, -39, -39, 28, -13, -6], [0, 82, 80, -87, 0, -2, 0, -87, -290, 40, -52, -2, 38, -20, 50, 12, 12, -49, -3, 5], [109, -82, -9, 0, 16, -18, 25, 54, -109, -50, -14, 0, -9, 16, -9, 0, 54, 25, -8, 9], [76, -2, 25, -26, 50, 0, 2, -36, 76, -2, 2, 4, 12, -50, -118, -26, 36, -2, -2, 68], [0, -53, -25, -24, 0, 28, 0, -24, -177, 12, 130, 28, 40, -22, -102, -28, -28, -50, 8, -36], [-111, -200, 7, 36, 40, 14, -4, -28, 111, -39, 89, 0, 7, 40, 7, -36, -28, -4, -51, -7], [-171, 7, -54, -14, -67, 0, -39, -28, -171, 7, -7, -14, -82, 67, 8, -14, 28, 39, 7, 12], [-50, -40, 20, -7, 68, -20, 2, 7, 0, -14, -60, 20, -6, 0, -80, -24, 24, 0, -24, -4], [-80, -210, -23, -48, 45, -46, 47, 56, 80, -42, -96, 0, -23, 45, -23, 48, 56, 47, 14, 23], [-59, -44, 96, 6, 76, 0, 27, 16, -59, -44, 44, 88, 29, -76, -65, 6, -16, -27, -44, -67], [-82, 42, 0, 10, -40, 0, -6, -47, -82, 42, -42, -84, 33, 40, 24, 10, 47, 6, 42, -62], [240, 94, -40, -19, -74, 54, 23, 19, 0, 5, 22, -54, 49, 0, 76, 29, -29, 0, 41, -13], [0, -118, -134, 46, 0, -16, 0, 46, -28, -16, 6, -16, -32, 46, -22, 35, 35, 39, -13, 29], [0, 89, 31, 30, 0, -58, 0, 30, 229, 67, -111, -58, 9, 98, 53, 10, 10, -28, 25, 33], [-50, 43, 21, 13, -95, 0, -92, 84, -50, 43, -43, -86, -23, 95, 69, 13, -84, 92, 43, 68], [338, 72, -34, 3, -22, 38, -28, -3, 0, -44, -24, -38, 82, 0, 14, 50, -50, 0, 11, -27], [-266, 20, -57, 112, -40, 0, -30, 2, -266, 20, -20, -40, -18, 40, 50, 112, -2, 30, 20, 24], [16, 26, -20, 21, 26, -40, -1, -3, -16, -32, 156, 0, -20, 26, -20, -21, -3, -1, -128, 20], [-34, 49, -58, -72, -25, 0, -48, 34, -34, 49, -49, -98, -69, 25, 87, -72, -34, 48, 49, 49], [-522, -130, 50, -92, 110, -80, 98, 92, 0, -85, -52, 80, 5, 0, -132, -24, 24, 0, -101, -21], [64, 34, 44, -10, -22, 0, -26, 40, 64, 34, -34, -68, 9, 22, -110, -10, -40, 26, 34, 8], [104, -109, 27, -12, -19, 54, -51, 63, -104, 76, -35, 0, 27, -19, 27, 12, 63, -51, 124, -27], [243, 14, -19, -3, 79, -5, 8, 3, 0, -96, 2, 5, 91, 0, -3, 23, -23, 0, -22, -17], [-30, -45, 96, -86, 29, 0, 29, 38, -30, -45, 45, 90, 40, -29, 74, -86, -38, -29, -45, -100]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_230_f_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_230_3_f_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_230_3_f_a(:prec:=20)
    chi := MakeCharacter_230_f();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 3));
    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_230_3_f_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_230_3_f_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_230_f();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<3,R![88804, 1329080, 9945800, -4419956, 34721, -4380588, 40544632, -36894604, 16970128, -1833716, 460536, -439644, 250686, -18724, 1352, -1316, 1020, -52, 0, 0, 1]>],Snew);
    return Vf;
end function;