
// Make newform 276.2.i.b in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_276_i();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_276_i_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_276_2_i_b();".
// 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_276_2_i_b();".
// 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 := [529, 2829, 9558, 22582, 24401, -2574, -12995, 4348, 7737, -8312, 5829, -3731, 2817, -1682, 800, -363, 169, -58, 18, -4, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [729664591802354384352025888595026342239766, 3025954934748169846532178384602639236760186, 29003779509230298169489259344830321136831738, 16438674875347079387031718276191587712128678, -17409176748427090285636298734959208187688003, -17560867013555023473079151476238872953003183, 37905229876299198898468709206805697611284971, -33197844719012551084540899420877128192030255, 23141826463318267645432434154132305205447756, -15354902030056267966434665138386450995750905, 9974192898287606171647499692047504087923783, -5498021068564008469027941384357416538398340, 2620117479041376762693097381328842739274419, -1171765105493493778109044196789346811285255, 494268378128646290657442385182277176645307, -169673665582026540328407347068065896961794, 50290386953701197008257165736307367075145, -11837949890926263193532086734972853932373, 2445672518601972801824873269842819061473, -149331951694058051382837470503848390402], [876164404020942730654742671796849463043780, -15820161043357135209873638469232472783093206, 14709313427263065617575935062660746617660350, 51066162957442684487099027860870810790698457, 14010476353253964521619577492791618123276987, -55829599196661382687985866904900909931522701, 39195163518930579181256605590274433553199447, -12469964560152264107187397670087468135676358, 3889926440148574879980904862390498336588457, -1934089106953156821197671895033499269557817, 351747737723584635346639701279829992280066, 1265449921917474467400772048108187896055299, -1148264844244805039433692182448525225855173, 609194142555443515545999412314927121637893, -331022453178379209236404368546290553384208, 182816070540812774552219913984977040937181, -68163082858670247756217443583574457693159, 22382234196790047837752567173844277649899, -5367980651726390979634371516982173101014, 1379328150855112257754302246871505372854], [-805518392480008938082562185764289792615373, -4232226926036098806216243067938402303658254, -7898653748533933576962297657348218899664064, 37045489988134267560869099775786943661700357, 12273437142882261910021771931720796764223000, -13812162023730503852016598922096657562701561, -15965887830042441295540947818366162085655907, 30908178707917872042690736527316575034147342, -25372154712369454821243831027512309703397434, 17103602439685310310053557049180839776309081, -11377900517589812663789867244825927436901139, 7427026165222226148027311686174397745747369, -3999480745679890215305358800976248205143725, 1861231310494798888547373141892291230200284, -833880960044200543345343056075414953949463, 347617475796279806787571346191619228084075, -114546687749503408476737335244398146166567, 32789282197449647977862481933519658936530, -7302381886576953501458026653675555852927, 1432999957211007131585387825023128106452], [75545346791775080051372099409756152502219, 6655495202929063455538892080903353572581182, 71431532216836652891266867788885605470472291, 49429305375216284779875457933298179050816037, -17731640931563288363594132128443126232251599, -35753622254007878252786497164315020034685722, 37528961260853748909955349729023818925057818, -13590877202694919558588285410766921942593765, 4446761459923808810351748187039484849619137, -2501971009525593192933052536281418550029666, 1745761283666624355993210523439869926753122, 290018898207038288623899568207124849293904, -699982179394378869212304734205129244618350, 384294302685491612545110154910278494240137, -205129549667318008947721798293139174031956, 142792836502144059455120905576329594763486, -55528424350453033324195375862943116057216, 20106561524841120006077170593502546731339, -4657876356437453647866878229905339134496, 1522719078412115194863066513732116810237], [-5303304931197280819965955714759250044718968, -8691705984784200108335727010317333540707894, -29123451508216678965558892568519938129083700, -51631704287795736238172296937207911466897127, -14718158137733644206422257304660703433295995, 44695647096741627587577244213055571580165026, -14858806189852552155526788852835463068194168, -15440975099172085801636705198484465527878507, 17566933501442026504382217995785917927410639, -12584400791129740083466309817862215522954744, 8656391065147828896264958478438040499455939, -6661002424777640679948940892545387643787068, 3941843215120208343456494231724187608771997, -1888304924830423412432616915076518144664116, 872684838306837592783881698123603021170700, -399523638969857649374917065214902438609289, 136918359701576138929404578618466273229867, -41763672695007512202765529959427164044396, 9416654281568650487472912202771171684792, -2195000345806954728757482457378408570109], [-2706917994722120530555958847080595479214681, -13698169287206776531257554708241066669432423, -22039388260762449237071882152664110258780489, 100666808405356812186039719659645401186251231, 72395887823564397165140860280348723452258115, -53725470916117430515201377472429309200254007, -73883490506419658422623563161700655562510251, 131508985416402078568787063386033777314482086, -107164432689994577299213788264750883577745199, 72730899781991791883703976975377913582990172, -48411712496564787627486324998830742460509553, 31169368228820812129951517182492416362777326, -16650881793434463720201636098884590851274970, 7740274112505033028468982990316130894203008, -3449636366853945760029738350405134636960485, 1421540586007733322108173124848245737986886, -465356743671809547727877315125186616688618, 132147422906151951367711292929598792728211, -29241705786189836926642705699506116323037, 5609653374093554885443572688858508754004], [-5652872686472282339958617743441092005906299, -18150141674688500658673263522187968516230058, -79449348629230426836235209789724194881093184, -156065909891610392903037364175793175704013275, -15159632688265513386258719809076485122572553, 89718215217596932989606778837343991033412083, -9834614309193084911134229762157347465309403, -65819665691561569006112108887045648634700470, 63781848688223727992920664954367715300001114, -44038758940590753088938842066632550302101993, 29163917592960300350373668982711643619455891, -21044983900400105604369182252950286139507513, 12107492589165276313149190499245348454337822, -5727051626092793347216198603623440373489673, 2607050343818638739582222128083319312601973, -1168546499650614864499718373433215955571317, 396547665310046648805044714217233588259016, -119654771677395585820980093580060837408951, 26799740127739509647668402985376044104019, -6149890069368600881355408716966310512485], [8162763170264980856350086628987054740113222, 33437064901804578445591113332395133359057511, 112916446966765030649728192674598675685100649, 178045916315886965233732701557966408100724828, 23719242297555143603775184266679305622376113, -107018600774293842025364269872703795934432112, 3875305139377274319467541227943523600412095, 89950607400399831307926476997756275599781492, -85553062719431024162693779366843967666878115, 59285927834216912365751514674584607377069989, -38999285212570717980523144680753967409936562, 27683529472653617164768676175202211799206571, -15831246677162990334198223348064783855931436, 7472315478885200408518286192430582442903287, -3382691299397394107939508561680475444345010, 1505857288353382789623172633431285610690223, -509207501279658581681056807217765528115050, 153151564486905829442845041908355651849011, -34135746485417812935729428661658204928373, 7820336935589559892874210050760741745110], [-16438741005016228040344727393410982164323106, -52658590441660448610029965272747267932429007, -114969376470530883635610151856660920177003565, -213957642067698778770389918772400842783075148, -32315884535027383310474922465609507621269785, 101511138335866799864992723591473079912481954, 43677707273733841827812145851449917908304625, -153012623194701590931140638175725361466965989, 134862437254636984222996377350891399178312075, -92365148004520172347619290680770106268019735, 60224764265263415966566313548473785254540297, -40833258512221790718254124267785402044479407, 22749641597971856702797791660096893583417726, -10659074500025319880382723310976624411784098, 4771609444615180581778902987498770097925368, -2070473538516857391776210126302109276508881, 691696111270853463451577396141276392502022, -204805491569168614686559479104317826307693, 45308637732767613803514294381115011222857, -10006824819123299883840905245859796708241], [19669446473357779928873514420786481915832674, 66696942692886553694619944334445868917086236, 174756257822406523641735476126484686850387817, 229905553820952271271818357810349618572729597, 18890908168760907680975410546155175332326418, -145135644717090102732951353150182257644986208, 28148381877852067327308427973109521607165109, 95131527551864260349517566512028484271438343, -95913456723288148732912479763190923219937848, 67092996819304633999443703017817376058372507, -44064841173921411453659679591537376144442020, 32182693860078129080401857650394900984903061, -18750609072796068666086184991116326415396260, 8892805717244124277042415860330408381804300, -4038653487787651482357226941316240370996785, 1831168895377077950979019920384653905663715, -623222436417960796811509256719420552690332, 189869374057657600883289930852424292299048, -42295604740493388150050153268412435373277, 10025151098671608355323167702758506700792], [-12080438344271965768061953105779610471877541, -22687054276822644251334673748668919282332914, -85244432274584464943740529741762097788190967, -245588470190014564831756840791502127422076978, -62212554924629721755101141650921739949852889, 148698660737751325001422013459731998914746748, 19357112873449123610762260213166881070086882, -146459118962772023766568728245490076074475661, 132860456048261094884281055078886532822126865, -91452376741253180803339231981800727366956490, 60914299577579851181657656356501730891939274, -42209841091608413083779485741728441423407849, 23700835857938500144589346135698897375256015, -11155818111640615813243647827049053915106773, 5047549874299836961673590284338918031457870, -2202474856262439305616020893123745023038155, 739440434844488923661433456755076596090549, -219147014903733993805050481212105072660377, 48893728908478486249662537211794983525009, -10685959709777471342076782123707168253131], [3405953621146419409092850846419600740449232, 29222497203016172615993498238253586567556024, 123401037432204849925334049188232802687755254, 266022682386251564932268750679825858003899786, 27049100414533843900149801548897879445352513, -130930052406994028532537861857745949647140563, -24814989807194556735442402148493608509147104, 151572581056167818873250815631905766000988779, -137074744823446906551966441079145801021007683, 93735586495210530203257563498256388073034376, -61503738382163953851306311221421641704935742, 42578266858880589821341705988481359520431756, -23963013057805864997854834453001214887177072, 11254826819808842425148976445108860833406012, -5075168425587879425071186042959480785718662, 2225451465306700266402476011592490179592200, -748060761332785332111204050565137465689677, 222695683473097233729625514142411216681618, -49613300426992269987640385808972354590929, 11054959004831599225777150280308536334259], [22522387584538119173236841372734709387207745, 61024323574756168071527098400998571955107090, 46274359744466057158391100354449761957469905, 195401414162225229151905135529077103460671462, 106951046102980957912320635931879650801608841, -106622357646579790138515308472990576172236861, -111443305090657656681396989188927182935205367, 231192991734449742812237629407084152588581988, -193312883757659068690131760172694447925056496, 132321869942707825383199711491759026290005833, -87170592235406653719477365618352529212193135, 56907233313729316070235390651347561487798423, -30854717937785296803605641868016105093332043, 14390654905567134088196317378414246683907333, -6402112565600791393255229699560153186923729, 2687395864790136918033829066693834208520751, -885011274917267028477510101199192352972593, 255697569391900781357067882536057121128240, -56270359465463508420386704814746084151290, 11528037083468822032584388051154734169785], [3541675415409636345481021392536331038647890, -29839532299748511173912117997444767755016266, -35110412843420255151082324396451295605685841, 242591771589321429537143761082492474848080096, 119446906870077499015186084695098025158138659, -112793051829749033090972224152391102439749726, -134118125118513452767130457382840538256317384, 255718528387512192154959676686770493608024640, -210151795250753259113995367493605113562761112, 142276205279226992474906273888582511902221030, -94557401356270365671686856278133026988645472, 61454201795488353273260908799416449443097527, -33037555920846870001032270892319374477958878, 15371858518580639664767882638557033200458915, -6869392369309694283873357914289844063420382, 2855064853727103582859254588794818951743971, -938738135588497671823939129381190199191264, 268298202804780921305601177596521931392195, -59546251340303382691891898739746227139725, 11663926392865290956728971797545379560236], [-16477761181939604250329678294459149671313932, -70252341746894558079059745109152528066118968, -239334978568427671354014882308160932939651841, -347749057105752641770586323732842133786016063, 1798268891729357983607273270480770695560666, 191105938760850441646914887485820266335609990, -39213043753693818049800071962275955650980060, -128816299591789463091541077904294066717335752, 130016868941230117496238986620762854407565702, -90175239735171523248203146818068833400880026, 58897004751845258513195229817120168169443160, -43300795918185299789693046995325262991610770, 25312525227587517713723002966969982863611651, -11992375827225922859569258474207086742481170, 5455572230364911782047303270191041998966276, -2484785924659639701880001538766095338145392, 847888014207016744929590516229719234722755, -258867582684467678578854455998575559703548, 57849668823828003315037849135021658466487, -13784312045729588396585033327803533736032], [-16689923321384896628686581133084527129462199, -81429937403866712670248860168406451672706215, -224271288916304981147044452981961625206038624, -370320110821844555268367602149523693316331084, -44488190817637541220467538545016175764870544, 208518098918554433758036612253326775301854464, 7509111070241122989533459953327075329586746, -198992501016693041213659975260878993114940500, 185910410462159153927632295150822125140523725, -128347082590647767012067424211208003117306963, 84219267723329158178733431325757727560247157, -59188762866665216559299573198553096052591916, 33673811152868212872410332643441229692333408, -15870273482652670882932188044098205111200625, 7165714251883130258648466390225725582329093, -3175286926898756936866949191078378443081850, 1071052482725106644255974907707124731773507, -321369923310705291106003706954686672738880, 71485097401028492628001264250861913405430, -16294173062567152392101525696908841268060], [26110025129189202070277641509982078039964997, 176324804644089540432448728061932064482110224, 592129995822361962552982384188144673668662984, 738231232209992042213469500550215244824128125, -61604919290870632908838925389265819147668097, -393629705817979707884455107151181031710374279, 127195850368378613223769233539627962099357554, 223084672100174773787055418128179953434556218, -238952184550572553617370593139524726200966216, 166409380032629471474175700773462030515457794, -107585664951714745806409868439422847291563278, 81473868918801435823263016184537008454050105, -48515996249835296074988666867954861789741670, 23057931877549863134754734558264192139998685, -10512027246196985742336447896183816001939285, 4877242669078643180373774959349992394828103, -1675008529849239995576683791668171629116364, 517601691863001244245081878150434027915381, -115698527134244753738868273518602743690231, 28466796577146187725431549742192630900886], [-15128180271390136842777091065119760896589170, -77377418481376777108843341855167633892671154, -382826978150604043715106745127608797285593117, -813574283192120262965809867989694901714978944, -135633937116607253053359528446347001751174056, 477584400815009998054154176782827565418539753, 11703064069186275139982857936558058061591721, -422398052584678937391701248381662862703347528, 393653996735406984997075990757995876924052711, -271218726981814846651802147309702413112120748, 179775265635411439443361069758685705122188928, -126568542658077972656494179718716879439414594, 71825862889868696222002221238347500228747304, -33858167681070552588229614740514281043099803, 15348274373265259676461657651210081051576152, -6776168126608031923486648168953847156866486, 2285919231434968816237776267120137618920001, -682954084799285624807934115018138464181641, 152598642987197818861823031287890094172125, -34173246503544857031501068865618413745621]];
    Rf_basisdens := [1, 1, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693, 7989528225661655046412429056340582240994693];
    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_276_i();"
function MakeCharacter_276_i()
    N := 276;
    order := 11;
    char_gens := [139, 185, 97];
    v := [11, 11, 7];
    // 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_276_i_Hecke();"
function MakeCharacter_276_i_Hecke(Kf)
    N := 276;
    order := 11;
    char_gens := [139, 185, 97];
    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], [0, 0, 0, 0, 0, 0, 0, 1, 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 := 2;
    raw_aps := [[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], [1, 0, 0, -1, 0, 1, 0, 1, 0, 0, 1, -1, -1, -1, 1, 0, -2, -1, 1, 0], [-2, 1, 0, 0, 1, -1, -1, -2, 0, -1, -1, 1, 2, 2, 0, 0, 1, 0, -1, -1], [-3, -1, -1, 1, 1, -3, -1, -5, -1, -2, -3, 2, 3, 3, -1, -1, 1, 0, -2, 0], [0, 0, 0, 0, 1, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 1], [1, -1, -2, -2, 0, 0, -1, -1, -2, -1, 0, -1, 1, 0, 1, -2, -2, -2, -1, -2], [1, -1, 0, -1, 1, -1, 0, 0, -1, 0, -2, 1, 1, 1, 0, -1, -1, 0, -1, -2], [3, 1, 1, 1, -1, 2, -1, 5, 2, 2, 1, -2, -3, -2, 0, 0, -1, 0, 1, 1], [0, 2, 2, 0, 0, 0, 1, 3, 2, 2, 4, 0, -3, -4, -1, 2, 0, -1, 1, 2], [1, -1, 1, 1, 1, -1, 0, -4, 0, 0, -3, 3, 0, 2, -1, 1, 0, 0, 1, -1], [-1, 1, 1, -1, 1, 1, 2, 0, -1, 0, 2, 1, -1, 0, 1, 2, 0, 0, 1, 1], [3, 0, 0, -1, -3, 3, 3, 5, 2, 2, 5, -6, -4, -6, 3, 2, 0, 3, 3, 2], [-3, -2, 0, -1, -1, 1, 2, -1, -1, -1, -3, 3, 2, 3, 2, 0, 2, 4, -1, -1], [1, 0, 1, -1, -3, 1, 1, 2, -1, 1, 3, -1, -3, -3, 0, 0, -1, -1, 2, 0], [0, -2, 0, -1, 0, 0, 0, 0, 1, 1, 0, 1, 0, -2, -1, 1, -1, 0, 0, 0], [0, -4, -1, 0, 1, 0, 0, -4, -4, -1, -4, 2, 1, 2, 1, -2, -1, 0, -1, 0], [0, 1, 1, 3, 1, -1, 0, 1, 0, 3, -3, 1, -1, -1, -1, 1, 4, 0, -1, 1], [0, 1, -1, 1, -1, -1, 2, 2, 1, 1, 0, 3, 4, 0, 1, 1, 1, 3, 0, -2], [-4, 1, 4, 4, 1, -6, 0, -3, 0, 0, -7, 6, 2, 2, -4, 1, 4, 4, 0, 0], [3, -2, 0, -3, -1, 3, 2, 0, -2, -1, 1, -3, -2, 0, 2, 0, -2, -2, 0, 0], [-5, 3, 2, 0, 1, -2, -1, -2, 3, 3, -2, 1, 0, 1, -2, 4, 4, 2, 2, 3], [-1, -1, -3, -3, 1, -2, 0, -1, -1, 0, -3, 2, 1, -3, 0, 0, 1, -1, -1, -3], [-4, 1, 2, 2, -1, -1, -3, 1, 2, 1, -1, 4, -3, 4, -3, 0, 3, 3, 2, 1], [1, 1, 1, 3, -2, -2, 2, 2, 1, 1, 2, -4, -4, -4, 1, 1, -4, -3, 1, 1], [-3, -1, 0, 1, 3, 2, -1, -4, 0, 0, 1, 1, 4, 2, 1, 2, -2, 0, -1, 0], [-6, -3, -3, 0, -1, -5, 1, -7, -2, -2, -3, 0, 3, 2, 1, -3, 1, 5, -2, 0], [-2, -2, -2, 3, -1, 3, 0, -4, 0, -4, -4, -1, 4, 4, 1, -2, -6, -2, -2, -2], [5, -4, 0, -6, 0, 0, -1, 0, 0, -4, 1, -5, 0, -1, -3, -5, -6, 0, -1, 2], [2, 3, 3, 4, 3, 0, -2, 1, 0, 0, 4, 6, 3, -1, -3, 3, 1, 2, 0, 2], [5, 2, 3, 3, -1, -4, 0, -2, 1, 4, 4, 0, -1, -1, 2, 4, 1, -1, 4, 0], [6, 0, -1, -6, -3, 9, 4, 12, 3, 0, 13, -12, -10, -8, 3, 3, -8, 0, 3, 3], [-1, 0, -3, 6, 2, -7, 1, -2, 0, -3, -3, 6, 4, 4, 0, -3, 7, 1, -2, -3], [-8, 0, 1, 2, 1, -3, -4, 0, 1, 1, 3, 2, 3, 3, 0, 2, 3, -3, 0, 2], [1, 5, 5, -3, 1, -6, -1, -2, 3, 4, 2, 3, -8, -7, -1, 5, -4, 2, 4, 0], [1, 3, 2, 0, -1, -1, 0, 0, 3, 2, 0, 3, -1, -2, 4, -2, 0, 1, 2, 1], [2, 5, 0, -2, -4, 5, -1, 9, 4, 0, 7, -5, -10, -4, 0, 4, -5, -6, 4, 1], [0, -3, -5, 0, -2, 8, -1, 4, 0, 0, 3, -7, -2, -2, 5, -3, -6, -1, 0, 1], [7, 2, 1, -6, 0, 0, 1, 5, 1, 2, 14, -7, -5, -14, 1, 4, -6, -7, 1, 0], [-2, -5, -2, 7, -1, -5, 2, -8, -5, -1, -10, 7, 8, 8, 4, -3, 5, 3, -1, 0], [-1, -2, -2, 5, 5, -9, -5, -5, -4, -4, -10, 8, 10, 8, -6, -4, 9, 3, -6, -4], [-6, 1, -1, -3, 5, -7, -5, 1, -4, 2, -11, 7, 2, 6, -5, 0, 7, -2, -4, 2], [11, 1, 3, -12, -2, 9, -1, 8, -2, 0, 11, -8, -13, -9, 2, -2, -9, 0, 2, 2], [1, 2, 1, 4, -1, 1, 1, -2, 1, 0, 3, -5, 2, 2, 2, 1, -4, 5, 2, 1], [1, 3, -2, 0, -3, 2, 0, -5, 3, -2, -5, 1, 0, 7, -5, 3, 2, 8, -2, -5], [-4, 1, 1, 1, 2, 0, 0, 3, 0, 3, -2, 2, 3, -3, -2, 1, -3, -2, 1, 1], [2, -3, 0, -2, 3, -6, 1, -3, -3, 1, -2, 6, 3, 2, 1, -2, 0, 1, -2, -3], [6, 0, 7, -1, -4, 1, -3, 6, 3, 8, 9, 2, -14, -10, -4, 3, -2, 0, 4, 4], [-1, 2, -2, -1, -2, 13, 6, 5, 4, 0, 6, -10, -4, 1, 6, 0, -2, 0, 4, 0], [-10, 0, 2, 6, -3, -8, 2, 5, 2, 2, -4, 6, 1, 1, 0, 6, 8, 9, 5, 6], [-4, -1, 1, -3, -1, -2, -4, 0, 0, -3, -11, 6, 3, 4, -4, 0, 11, 2, 0, -3], [-2, 0, 3, 3, 2, 1, 4, -9, -4, 0, 1, 6, 2, 0, 1, 2, 4, 7, 0, 3], [1, 5, 2, 1, -2, 1, 1, 7, 0, 4, 7, -4, -9, -3, -1, 3, -3, 4, 4, 0], [0, -4, 0, 1, -4, 1, 0, 7, -2, -2, -4, 8, 8, -1, 0, -4, 0, 1, 0, 0], [2, 3, 0, -2, 2, 7, -1, -2, 2, 4, 8, -7, 0, -2, 0, 2, 4, 2, 2, 0], [-1, 3, 4, 0, -3, 0, -1, 0, 3, 5, 0, -8, -4, -1, -2, 6, 4, 6, 4, 1], [-2, -7, -4, 1, 5, -3, -1, -6, -4, -3, -14, 3, 13, 13, -2, -4, 10, 0, -5, -5], [12, 3, 3, -8, -6, 9, 6, 13, 1, 6, 11, -12, -11, -17, 10, 6, -7, 3, 10, 1], [-4, 0, 3, 5, -1, -3, 0, 1, 0, 3, 1, 5, 10, 10, 0, 2, 3, 0, 1, 2], [12, -2, -2, -7, -3, 7, 3, 12, 0, 1, 0, 2, -12, 1, 0, 1, -5, -5, 0, 0], [2, 2, -4, -7, 1, 5, 3, 2, 3, 0, -3, -2, 6, -1, -1, 3, -1, 0, -1, -1], [8, 1, 0, -3, 0, 0, -3, 4, 0, 1, 11, -8, -4, -11, -5, -2, -3, -10, -3, 2], [5, -2, -4, 0, -9, 12, 0, 2, 0, -6, 7, -11, -3, 0, 9, -4, -7, -3, 2, -2], [4, 0, -4, 0, -6, 6, 2, 8, 8, 2, 9, -9, 4, -2, 2, 0, 6, 0, 2, 0], [3, 1, 0, -2, -3, 9, -3, 5, 4, 0, 10, 3, -5, -4, -5, -2, 6, -1, 1, 0], [-1, 3, 3, 13, -3, -12, 3, 0, 1, 0, 2, 1, 2, 2, 1, 0, 5, 6, 1, 1], [-1, -3, -6, 5, 1, -11, 3, -15, -6, 0, -14, 9, 12, 10, 2, -2, 8, 11, -3, -6], [-6, 1, 0, 0, 0, 10, 0, -7, 0, -7, 1, -1, 5, 8, 0, 0, -5, -10, -3, 1], [-5, 1, -9, -6, 2, 4, 4, -2, -8, -8, 1, -2, 7, 1, 9, 1, -5, -2, 0, -4], [3, -4, 0, -3, 2, -4, -2, -5, -3, -4, -4, 4, 8, 6, -3, -6, 2, 2, -6, 2], [0, 4, 5, -7, 6, -6, 0, -4, 0, -4, 5, 7, -4, 3, -6, 5, 6, 0, 0, 4], [-1, 2, 7, 3, 1, -5, -2, 3, 4, 0, -3, 5, -3, -9, -6, 3, 4, -2, 2, 7], [7, 0, -3, 0, 3, 4, -2, -6, -3, -3, -3, 0, 9, 9, 0, -4, -4, -3, -6, -4], [4, -1, -1, -2, 5, 2, -5, 4, 0, 2, -2, 3, 5, 1, -2, 2, -7, -9, -2, 0], [-13, 2, 4, 12, 6, -5, -4, -7, 7, -2, -3, 5, 6, 14, -4, 2, 4, 7, -2, 0], [11, -1, -6, -5, -4, 11, 0, 19, 0, 0, 8, -9, -10, -14, 4, -6, -18, -7, 1, -1], [-4, 2, -5, 6, 3, -6, 4, 2, 4, 4, -1, 2, 7, 7, 5, 2, -1, 10, 0, -4], [-3, 5, 2, 0, 0, 0, -2, 3, 2, 5, 0, 3, -3, 0, -2, 1, 0, -3, -2, 0], [16, 8, 10, 0, -1, 1, -6, 13, 8, 16, 13, -12, -11, -16, -1, 11, -15, -5, 10, 9], [18, -2, -2, -8, -5, 10, 5, 20, 2, -1, 6, -16, -7, -13, 4, -1, -10, -6, 4, 2], [5, -1, -1, -6, 1, 10, -1, 9, 4, 5, 5, -2, -16, -3, 1, 5, -9, -8, 1, 4], [13, -1, 2, -2, 5, 11, -7, -3, -5, -3, 3, 0, -5, -2, -2, -5, -5, 0, -5, -5], [0, -7, 0, 2, 0, 0, -3, -12, 0, -7, -12, 0, 12, 12, -8, -1, 2, -13, -3, 5], [2, 1, 0, -2, -1, 1, 4, -1, -4, 4, 4, -1, -8, -5, 9, 5, -3, -3, 5, 0], [2, 5, 5, 0, -1, 1, -2, 7, -1, -1, 4, 3, -2, -4, -5, 5, 3, -2, 0, 2], [0, 1, 2, -5, 0, 0, -6, -6, 2, 1, 8, 0, 6, -8, -6, -4, -5, -3, -6, 0], [-11, 0, 5, 10, 9, -4, -6, -10, -5, -4, -20, 22, 10, 14, -4, 2, 4, 1, -4, 0], [3, 1, -5, -8, -8, 12, 10, 13, 9, -4, 11, -18, -5, -3, 10, 0, -2, 1, 9, -4], [-5, 0, -6, -3, -3, 9, -6, 3, 0, -6, 14, -3, -8, -8, 0, 2, -9, -11, 3, 2], [-5, 8, 3, -3, 9, -6, 1, -4, -1, -6, 0, 5, 7, 5, 1, 0, -1, 5, -1, -6], [-11, 0, 2, -6, 6, -16, -8, -17, -5, 0, -14, 17, 9, 5, -6, -5, 5, 0, -6, -6], [-11, -2, 0, 11, 3, -14, -3, -12, -8, -2, -10, 14, 16, 5, 3, -5, 4, 11, -5, -10], [12, -2, 0, -12, -6, 17, 6, 24, 3, -2, 21, -17, -18, -4, 1, 4, -21, -14, 4, 4], [6, -5, 2, -10, -6, 16, 0, 2, 0, 1, 11, 1, -1, -9, 6, 2, -1, -10, 6, -5], [-2, -5, -1, -3, -3, -3, 4, -3, -2, -1, -2, 2, 1, 5, 4, -2, 4, 0, 3, 3], [-10, -4, 4, 14, 1, 7, -10, -18, -5, 1, -6, 8, 4, 10, -10, 0, 1, -7, -5, 1], [10, -1, 1, -1, -7, 5, 3, 12, 6, 5, 1, -8, -11, -10, 3, 0, 5, 1, 6, 5], [-5, 1, -3, 2, 11, -7, 0, -8, 0, 0, -12, 7, 4, 12, -11, -3, 4, -4, -11, 1], [8, -1, -5, 1, 0, 0, -7, 9, -5, -1, -8, -8, -9, 8, -4, -16, 1, -5, -7, -3], [-6, -3, -5, -1, -3, 0, 6, 3, 3, -2, -4, -4, 4, 1, 1, -8, 7, 10, -2, 0], [7, 4, 4, -4, -1, 3, 1, 6, -1, 6, -5, 4, 0, -3, -4, 6, 1, -3, -4, -1], [16, -2, -2, -8, -12, 8, 12, 16, 0, 2, 8, -1, -17, -3, 8, 2, -11, -3, 8, 0], [-14, -6, -4, 10, 2, 2, -1, -5, 3, -6, -3, -2, 7, 16, 0, -5, 0, 7, -6, 0], [-1, 6, 6, 8, 0, 0, 2, 11, 6, 6, 13, 1, -11, -13, -5, 4, 8, -4, 2, 7], [-2, -4, 0, 2, 3, 3, -6, -11, 0, -7, -9, -3, 4, 10, -10, -10, 11, -6, -10, 3], [12, 1, 0, -2, -6, 10, 5, 10, 2, 2, 8, -4, -4, -15, 0, 1, 5, 3, 0, -5], [-4, 10, 11, 10, 1, -20, 2, -8, -2, 10, -15, 23, 4, 0, 0, 8, 16, 16, 10, 0], [-16, -1, -1, 16, 4, -14, -4, -14, 2, 6, -5, 12, 16, 8, -7, 6, 13, 6, -7, 2], [0, 0, -2, 3, 0, 2, 0, 1, 1, -2, -11, 3, -2, -2, 0, -1, -2, 12, 1, -1], [3, -1, -7, 1, -3, 11, 7, 8, 2, 7, 10, -10, -9, -3, 7, 0, -8, -1, 2, 7], [1, 1, 8, 11, -1, 2, -5, 8, 6, 0, 3, -4, 2, -1, -3, 0, -3, -6, 1, 8], [18, -3, 4, -10, -8, 11, 0, 18, 0, 9, 15, -1, -15, -25, 8, 4, -3, -3, 13, -3], [-11, -10, 0, 11, 4, -14, 5, -27, -10, -1, -17, 14, 12, 5, 5, -5, 17, 7, -5, -6], [-2, 7, 8, -4, -2, 10, -3, 7, 7, 7, 0, -6, -14, -15, -8, 7, 5, -7, 0, 3], [8, -10, -4, 0, -3, 14, -5, -9, -10, 1, -9, -1, -10, 2, 7, -11, -5, 1, -4, -7], [-14, -7, -6, -2, 4, -4, 0, -17, -11, -8, -11, 9, 19, 14, 0, 0, 0, -2, -11, -8], [-4, 0, -7, -13, -4, 2, 1, 3, -1, -7, 8, -13, 2, 2, 0, -3, -2, -5, 3, -3], [-1, -3, 13, 12, -4, -12, 1, -9, 1, 2, -7, 9, -3, 1, 1, 0, 8, 11, 1, 2], [7, 1, 1, -12, -7, 12, -3, 7, 4, 0, 13, -4, -20, -16, -2, -6, 3, 1, 1, 1], [-2, 5, 9, -2, 7, -4, 0, -8, 0, 0, 0, 11, -3, 4, -7, 9, -7, -3, 4, 5], [-11, -2, -7, -13, 0, 0, 5, -11, -7, -2, -2, 11, 11, 2, 10, 1, -13, 21, 5, -5], [2, -2, 8, 5, 0, 0, 3, -2, 8, -2, 0, -2, 2, 0, -1, 8, 5, 12, 3, 4], [7, 2, -4, 0, 7, 3, -6, 6, 2, 2, 6, -3, 1, 3, -5, 1, -14, -8, -4, 3], [0, 6, -8, -5, 9, -5, -1, -2, -6, -1, -11, 1, 6, 10, -8, -6, 9, 0, -9, -9], [7, 0, -2, -20, 1, 0, 2, 0, 1, -2, 6, -20, -5, -5, 0, 4, 0, -6, 0, 4], [16, 4, 3, -2, 2, -1, 4, 7, 4, 1, -1, -2, -8, -3, -3, -3, 0, -11, 1, 0], [-9, -8, 0, 9, 7, -12, 1, -5, -1, 0, -23, 12, 10, 7, -6, -7, 4, 3, -7, 7], [9, -7, -15, -15, 0, 0, -3, -8, -15, -7, 5, -9, 8, -5, 14, -11, -15, -7, -3, -17], [1, -8, -3, 9, -1, -5, -7, -11, -1, 0, -13, -4, 11, -6, 3, -9, -3, 4, -8, -3], [18, -3, 4, -6, -11, -5, -2, 19, 8, 5, 16, -5, -13, -18, -2, 0, -8, 1, 8, 5], [19, -4, 10, -8, -5, 13, -8, 9, 1, 0, 14, -11, -1, -19, -8, 0, -13, -18, 1, 0], [-1, 1, -9, -16, 6, 8, 3, 0, 3, -6, 9, -6, 0, 1, 0, 3, -5, 0, -6, -6], [19, 9, 13, -3, -5, 4, 0, 22, 0, 10, 17, -1, -28, -26, 5, 13, -9, 1, 16, 9], [-3, 7, 8, 7, 5, -7, -10, 0, 7, 7, 6, 0, -8, 9, -8, 7, -2, -3, 0, 10], [-15, 8, 5, 6, -4, -14, -5, -1, 4, 4, -7, 4, -1, 14, -5, 8, 0, 1, 0, 5], [11, 0, 0, 0, 0, 4, 0, 17, 0, 0, 17, -5, -4, -16, 5, -5, -11, -16, 0, 0], [1, -3, 2, 9, -1, -7, 2, -2, -5, 0, -10, -5, 6, 11, 11, -4, -4, 0, -3, 2], [1, -9, -9, -8, -9, 4, 9, -3, -4, -5, 2, -13, 8, -12, 6, -5, -6, 0, 6, -4], [-14, 4, -6, -5, 12, -3, 0, -17, 0, -9, -3, 2, 10, 27, -12, -6, 0, -9, -10, 4], [-14, 1, 0, 14, 8, -10, -3, -22, -8, 6, -19, 10, 8, 2, 6, -2, 14, 6, -2, -9], [0, -3, -2, 7, 0, 0, -4, 0, -2, -3, -3, 0, 0, 3, -3, -19, 7, 6, -4, -1], [-6, -7, -6, 5, 4, 1, 2, 0, -4, -11, -5, -11, 12, 3, 7, -4, -8, 0, -4, -4], [-14, -1, -1, 10, 9, -6, -9, -10, 4, -2, -11, 2, 1, 8, -15, -2, 1, -14, -15, 4], [33, 0, -1, -23, -2, 28, 2, 12, 10, -1, 25, -23, -28, -28, 0, 5, -28, -13, 12, 5], [6, 0, -7, 8, 0, -5, 4, 0, 0, -7, -4, 8, 5, 5, 0, -3, 5, 4, 0, -3], [7, 4, 0, -2, -3, 0, 3, 7, 5, 3, -5, 5, -20, -5, -1, 0, -13, -1, 3, 0], [2, -1, 1, 3, -5, -1, -6, -18, 1, 1, 6, 2, 1, 6, -1, -1, -5, -3, 0, 6], [12, -7, -4, -1, 0, 0, -7, 3, -4, -7, -16, -12, -3, 16, -1, -17, -1, -6, -7, -6], [0, 7, 3, 11, -2, -3, 0, 8, 0, 6, -2, -6, -7, -4, 2, 3, -14, 5, 5, 7], [-4, -18, -12, -7, -4, 7, 3, -8, -16, -8, -10, -1, 12, 1, 10, -11, -3, -1, -8, 0], [3, -4, -5, -11, -2, 1, -2, 8, -2, -1, -9, 6, 3, -3, -2, 0, 7, 2, -2, -1], [-4, -2, -3, -14, 1, -2, 2, 19, -4, -6, 5, -25, -3, -6, 5, -4, -12, 0, -1, -1], [0, -3, 2, 3, 0, 3, 3, -4, -6, 0, 0, -2, 1, 14, 16, -3, -2, 1, -3, 2], [-19, -12, -16, 0, 4, -11, -4, -18, -12, -12, -18, 6, 27, 19, 1, -17, 15, -1, -16, -12], [-8, 6, 4, 0, 6, 1, 2, 8, 6, 2, 8, -13, -5, 9, 0, 4, 2, 7, 4, 10], [1, 0, 3, 18, -1, 0, -2, 9, 2, 0, 0, -7, 14, 2, -3, -1, -6, -8, 0, 3], [17, 0, 2, -14, -5, 14, 6, 7, 2, 2, 8, -14, -21, -21, 0, 2, -14, -1, 7, 2], [3, 4, 1, -18, -3, 3, 4, 14, 0, 0, 7, -8, -22, -5, 4, 1, -5, -7, 4, 1], [-23, -3, 3, 17, 0, 0, -8, -11, 3, -3, -5, 23, 11, 5, -14, 4, 17, 1, -8, 6], [-4, 14, 8, -5, 8, -14, 1, -3, 4, 4, 1, 1, -7, 5, -8, 14, 9, -4, 0, -1], [11, 2, 0, -11, -2, 8, 4, -7, 5, 4, 0, -8, -7, -6, 1, 6, 12, -1, 6, 6], [-1, 1, -6, 0, 5, -11, 6, 0, 1, -12, 0, -5, 17, 8, -8, 2, -4, -3, -6, -1], [5, 0, 1, -3, 4, -7, 3, 3, 7, 1, 0, -3, 5, 5, 0, 2, 7, 3, 3, 2], [7, 9, 9, 3, -12, 4, 12, 14, 7, 7, 17, -11, -3, -11, 10, 7, 19, 29, 10, 7], [-23, 0, -3, 11, 3, -21, -7, -28, -7, -6, -23, 24, 38, 17, -6, 1, 31, 10, -6, 0], [-2, 5, 3, 23, 0, 0, 8, 3, 3, 5, 0, 2, -3, 0, 7, 1, 23, 18, 8, 1], [13, -5, -6, -1, 0, -9, 4, 6, -4, -4, 10, -11, -5, 11, 6, -5, -2, 3, 0, -4], [-19, 3, 4, 6, 8, -12, 0, 1, 0, -4, -11, 9, 16, -2, -8, 4, -8, 4, 2, 3]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_276_i_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_276_2_i_b();".
// 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_276_2_i_b(:prec:=20)
    chi := MakeCharacter_276_i();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 2));
    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_276_2_i_b();".
// 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_276_2_i_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_276_i();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![1, -55, 1781, 220, 23904, -28028, 101650, -224180, 321751, -196064, 10438, 34562, -13639, 2024, 1781, -858, 111, 44, -1, 0, 1]>],Snew);
    return Vf;
end function;