
// Make newform 693.2.m.j in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_693_m();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_693_m_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_693_2_m_j();".
// 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_693_2_m_j();".
// 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 := [121, -1155, 13084, -43696, 67756, -33295, 11660, -15494, 26062, -3393, 15808, -1174, 4638, -153, 662, -10, 94, -3, 12, 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], [53063002987423605530855234277785053527, 1564896817804557547581995359358122058372, -6004390836218034158081244068038324794157, -304027596895514137390943125014733189518, 140302320559510172833035281179019949080, -159503070822840279774053028034431283162, -3044458967223047239625102991137888701149, -1678690000605728923056299449055344531459, -2063929883340563683640539955089148676382, -832251302976513252183026356320894656887, -596232397194570622732902037927167083921, -230535085665327178182851364959401382129, -86372838844577540214079253819739871629, -34451536450558034219492799507983006839, -12688850963001045359766019216402617718, -4589031231440773967128953333424714419, -1551333216081358298995644039580409869, -607771028134903567345849576029204130, -139551816782867927089054348724235996, -46027894089776630928277367439968250], [7371935727070328171126486492695710779995, 359253292886798667756486283838159669019, -4213790297039908166609698244100589897465, 9130147673132381845814954590828424708089, -3567701602883834686078457924736956425036, 1774240015900799974652245289659901229386, -716500321457623935626500863128968438817, 4079310794955575570225392577783777747530, 239293926429891930936365849169416003221, 2423794616669228384517046963609144771677, 2561456188715950147182599495455901452, 708253036007327488190831289081809916424, 2709622651268170950780561293445348756, 101293831370485149478950140814598468438, 2084776535826508624539426999650437607, 14331473717880945599230810564727779557, -20170432253115456992273495479382356, 1831586529129285920914319599164633369, 30648910783394773511672637573038522, 151573837035108593980017276633763862], [22785480309529611604141748552106773262427, -129164329297257507990321856138470630949115, 207441239937645877877449654443210271180374, -325305477238924825948711816791176606630612, 158857528445155024754287691716971561083533, -89735831806122541498582681236968932451259, 56276061655804376764114433324027721003709, -148423954522040201187786768210311004987536, 7212760134197290004731420071790584830344, -82814915571430491052949153641128485755387, 3127383649248247666645366352912007782099, -23323392850533142256182742390232327520485, 359091231505299045969292918548651760192, -3333005358563413940905259401552583834432, -2240249920917963155822819142412719039, -470512145451242115825351359172820420517, 7786246777995225903974354921256496441, -59421982334528207777094398866277563440, -506306834987542940211051041839650750, -4823909362493055048259566752525913957], [-68341033544962418306570407900607114152, -1136945284702477101671462264457270166886, 13312264696534624773535985274641476008243, -29740418121072794518713028605082589772398, 14823588161845224146797613953672756648181, -4787040624127826127594124674392821985798, 4153066310292572264842785932287136532348, -12770781443104473224427713651703541897508, -396932056195214787679413779466616920485, -7712316807640476474056076325025041365399, -24634898620528210511608366061400874500, -2272705296103248464944339413192423777749, -10848586462574910289754734212064992603, -325850614900831688575836024218365907053, -7263685479770168455202654892277727249, -46016595665642301499863556333818973565, -80745284683899255263356279049993648, -5911409078556210179368332194797842187, -128694972904375865293888597625818679, -491210013262644301809858848568436548], [-19682206653948302040575977738593718821706, 227723464652997988974638312291196552596561, -598620035857316906098925182258174711131450, 584015385132340521503863258737085380082983, -259513329763544607177831892422931393270218, 118125224970878458318235277629802042856948, -236740048032844451763432295624375926933596, 157552294313562686963329900308196541968249, -105915587322050467152270784484980903957365, 97941294140516545010760035981760704972756, -32293610382752631213652611624690548102007, 28695730419960375632801202636668721030183, -4534918412307262210780130121746833019879, 4032987114882993685079098980748754961045, -568310764635667514959017672308924267535, 583116997616337773720977475717456318080, -83663963558198971511207219933850931553, 73138210074374503634389488590414664515, -5403310145889087319908447334252802028, 6212821231360219846051855263691555832], [-294560382515394354575937329944368934956, 3192701589507532096764700511510322876915, -15604953937581234001663471580462804624631, 34787103064259879964272792616777336294384, -17073142081515664682107966156997492596889, 5883904401650229432681775618866082229883, -4691415687019817233253890081910160079300, 14992274020223791972518724483282195636811, 503110806591617194236602529354495807792, 8951034686282107549308180423455812760012, 43683984126656831724800706760867421994, 2628153628292282229459681618196793976666, 14684747096428411455694025742107666353, 376824735943836708437582225548597568197, 8670749255524296055227142912930995107, 53190639513899390256642202431410391474, 133369190422291057713219303625598034, 6823518265611374226316073819729179862, 151573837035108593980017276633763862, 566072446235664954400366765179678445], [-78790089742826700858069448130437473027574, 910894949973540908333657605541055371413697, -2418318527054094769248824069817068177580892, 2424233423189376138069808806020988472239659, -1069014341399743732656967169707450884213174, 487815060428269463566104666864290123709162, -951109196048281314659075454336975291364602, 671542943995001257804825758977566492306135, -418392128014984194563244256252739803829911, 416186304369925113759222179617985390325976, -128023375645751957879453451448633550238271, 121935882273257154793074506886993472024363, -17952038807582674039808010204486217054597, 17159514632575421752523558524413624996849, -2229451282348285109841365684345732791411, 2477108419408238023243446624668650574718, -331769353175776408786249191000659038103, 311136426179355584647143191922562118869, -21003441293922925321362056502765771682, 26386354910052426582187018890732819284], [4190877320466445833938285982454813475685, 178711692580371856460934905796011253216723, -787442818510656931079377242056280662746992, 1626580280531787678373831438428542268423197, -826857773022761570386485322783178885413107, 260628432909100026284700778840019310181060, -249986673658767391011346120698264236923103, 703428099701253940860064327187457925051464, 7602892651400178944557679157900867968704, 423790571716607221252283472479877189258702, -2527936368155165682502631777534278041978, 124358900773187895846303301217888922541331, 48004956758991406439003437262896245779, 17822557625919045686541181519603353213529, 317314868729807515935848472250633456254, 2518619420771651504374673504591761567998, -5275948855200616576687914331443276506, 323005911315089126798439095436828422434, 6226796908592314498404034416976462895, 26778216592308577688721575449488084996], [14876581518274232803532138640469227169688, -186319863489486636278607025179708926504870, 22782058437903065652861907436460034332358, 1228000740400166768511008359910700025384703, -895670965251873266706417937886360331717048, 87523076178477022748395716278370177733281, 84482319456762421999529976683541049066580, 775456485651198352510378415248331453986792, 249279209870109368716959552433899317156574, 468257521462723644916440903010201355084619, 70438797953086881055344085800703050413793, 137958882247173032422698001574051533746692, 10571419976290176330137101391199311312831, 19970398482365278349948958939710845851639, 1842786979182698180891477028711467946109, 2792984395985266606002067031047637196013, 187802806893843713223399282540732876893, 362721894873690463321389917464479642554, 23224148009164185403339000802344439179, 29722208479982667846053309247816923775], [-898264220575522807684690069559148939291, 6392890763334112946083298627492875155467, -74724903347808880515334343862562557774246, 171927858212389658310383151097658783605106, -103059024879746025518811041363980611405797, 12322940719278723681157181830389850764131, -34093048525947641316265572526614862798671, 70795685493273165092677729102720827078536, -14526067997823820573532752848698525380, 45330084644863223628109314393142667971983, -224477270295504702912943159871551841205, 13626785170489058452728654290915555409873, 10071352910112024202951504195197851266, 1955543392694798702206085156645716054006, 37686153477623063284739165576819628473, 276849537412219738548284017569467830725, -144099069137362862877266158046426709, 35808638361029697266992900317395787164, 778828212624372276303008233994491828, 3002191965824800055339705741021122221], [-74118789383906654378698458660717489411247, 188127634286952544025775777558830951903096, 243991246820950247507085917699353753423936, -1813378094050684552150876747662697228795044, 1131688363872998953626823378862312051580045, -201882160396087639381210540824007664630030, -26496022320960874054319637767444080280517, -1036843070183334961826827910970312856097813, -259178304580325528911592673993648049392995, -623290316484676983257535354924609261054108, -70145519294947593064348813164753478391191, -183197568585860965501574076677301424163516, -10678191803040134949749898677125098248502, -26448767091604564149085903460142254359548, -1966499466565728491542134923110440089687, -3708215133686266952034687060031785192534, -185813919572189842439002276705741458425, -479784138576934672424390070885048023943, -25310587698315226538052656547493696575, -39406051653956875336181007804749876252], [-4383510756813062778512035926996904567083, 70533553546348420441975871450946345263834, -393619217796256278471452123669650258688987, 642459714603305713892939820090630921431856, -329250294444349216426124046005769372161338, 62470018477147859618395403798527475995374, -179303430110483000326118552669576643820967, 214682612778144736197006674969471174766511, -46690820539591614239695736196261134226068, 140061783626837148335469698166128988468963, -14688841502165676164562972353339980267445, 42354381658958272480419026315258601222445, -1980663014738353408298165394431699072445, 6042493886383316088531406619132479714227, -166052869366777370637346489968699251818, 861468963966821043463516793531019291869, -37327544586762738216058825573392436885, 110869732224313808205141326827231699308, -629770760672648725277476755347790132, 9401740787449525048980733070068978692], [45428686704149975679780699696817987327999, 115015253185123789660927370619749494581987, -1297766459069422821574399232774322827138753, 2932086146184445030973908942782386585795153, -1595084682738850606900610398367524996574050, 321456255316219570358874433779652306410216, -480664505890194563602316113515314247643625, 1234099684508526895104860273943047180244436, 26385176950951955484878232344152411448417, 770140531781280576020466901507543636118323, 612705387753730035009904220126366246198, 229513525289283109298411635957071566475224, 813005211688161546790420346814840511914, 32922420712512024091765536293650612951242, 709304588932689124471425167104276897779, 4656198228842754822430776158952749206375, 5529868644247065584398467757664482122, 600474406976507654097136399977112414071, 13216978260382107411616147798752415136, 50140533573528774312002908802475036216], [3341200985483020132286313320840291175156, 208976975413056257833131510778641303249516, -1005372928018960958031831537589605326089701, 2826672151640361782636344335827332101190296, -1641424020312783921199950017591219744898345, 486616462007685304083220837506708738559494, -160036373672912779446018533146429797583382, 1493366534557621716440652961422728866232698, 228681957175985632420793961669731499602719, 877132327077542366161342463369716293641639, 57898520855974137596362325748291584849242, 254624237340605903459101490453720165934593, 9194948674945157261291538320315518103083, 36647878045079359897338553617600851806053, 1920297597019305936457655333213734195871, 5149126533702798443729187741935972441643, 154906858124966052237934612618367893328, 661464794002991537091926306071904057695, 26231353983800530066999211854212994547, 54169253442400600620836216424711473050], [-66497874419377277045572780410767280565986, 725522150355203569477751645856821891649299, -2566167936585929632456135314605601270390842, 4147330119858367034372728326933693051325167, -2157359505461008236444412923820944628197682, 660934393034702667276004394395187848059526, -896248211865059045225568914313051247392824, 1668071133230543833880991568548826041282717, -147347196734430240928553990377053337575721, 1015583958674850081836561244082231164862396, -53537712161979880037016526554138809745745, 298382540108610213174746852764202551163721, -6682295510607577658805389504873186880721, 42654441386373393565495986253984106834581, -193671045331807213880603078059411854517, 6048735860349439742279237772317002102362, -134418310642923177530898406341190751959, 773812066100019532855554463300733565403, 5003019769391047037001911693563099170, 64393465475517493781779905277888128320], [62751112580176997604953883394215688483790, -732228770599066280650645775584630850937741, 2512415673769214632959159336366107265774454, -4159997807209289245967494391915321379947447, 2175670545211810682942520257038425605085102, -669370633326425494221716302891220247729892, 890965854959277815042354576172692795784556, -1687116608847799191131690843966033304973379, 138352282997674580165359522106382650070547, -1025304797186099301354817962520664638494486, 50792624100822583357544421898213626880701, -301059756072847549711121121695657101740475, 6281022562765684673913223845077147753901, -43044061194584766409019924620438367636801, 130594718272392173718920937849952271441, -6102238714354652655288865214468008922832, 126860033798252909930798778470046749827, -780671621167297048387958664678845168329, -5764086372092621995258101536164151412, -64926675567753521302194071509163650130], [-52014330991869678780973090272790909879228, 1102090737156952867325138916636980034858664, -4656295945904226266828115039472646720893666, 7451492625227924808694107844801349966177457, -3671092214451544350498244651032830503686378, 1139227562768344075715835500427862961954727, -1711457490707569193296058807495383141609258, 2812190599983918482521038999399619435362704, -364057264997799804549177636764600239052120, 1732968117199624064899454505902785090497945, -126196610504468745779543612312658434008309, 512310483374360918062486836660213065003744, -16450494696674033158139689872593305805007, 73144116625545147349726789876724703731651, -1020310030637684617270772207929484156327, 10390963450010625922874884807388006842225, -322886061150108557162788187628396165055, 1329790427650551536855314479571553757824, 1082941597413472818987858031793400747, 111252869142754835427822681268730902015], [-147961877365662194434583923579342494580954, 1660151655509494251982457628302350184746815, -6082360066930151938768151491963229225061814, 10564730659716131402503826730613841798167591, -5461706623247582323399645248210008473007776, 1703819191142189722776797219283910912349992, -2088819465906868730116418859732328903491110, 4338895198036840326745894387797391451267889, -249544682986530063003414549102844165174287, 2630426595088586219038452059459261093576868, -100560957531127486604433603548293962824919, 772258667443626895142717010431862629862559, -11850358058712315222659890277335434552823, 110479523657047075148375885403394639882063, 263127183593017901284978425042710398403, 15649113425417198765899334750844382038386, -249892204926444719066493544706540205479, 2003338461936729334919471481091558318653, 20929006800638742663262615667243640898, 166483536304069943312966112790343037450]];
    Rf_basisdens := [1, 1, 1860107623266210907652232717820612967960, 1860107623266210907652232717820612967960, 20461183855928319984174559896026742647560, 1860107623266210907652232717820612967960, 20461183855928319984174559896026742647560, 1860107623266210907652232717820612967960, 20461183855928319984174559896026742647560, 20461183855928319984174559896026742647560, 20461183855928319984174559896026742647560, 1860107623266210907652232717820612967960, 20461183855928319984174559896026742647560, 4092236771185663996834911979205348529512, 20461183855928319984174559896026742647560, 20461183855928319984174559896026742647560, 20461183855928319984174559896026742647560, 20461183855928319984174559896026742647560, 20461183855928319984174559896026742647560, 20461183855928319984174559896026742647560];
    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_693_m();"
function MakeCharacter_693_m()
    N := 693;
    order := 5;
    char_gens := [155, 199, 442];
    v := [5, 5, 3];
    // 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_693_m_Hecke();"
function MakeCharacter_693_m_Hecke(Kf)
    N := 693;
    order := 5;
    char_gens := [155, 199, 442];
    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, 0, 0, -1, 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, -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, 0, 0, 0, 0, 0, 0, 0, 0, -1, 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, 1, -1, 0, 0, 0, 0, 0, 1, 1, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0], [1, 0, 1, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [-1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0], [0, 1, 0, 0, -1, 0, -1, -1, 0, 0, -1, 1, 0, 0, 1, 0, 0, 1, 0, 0], [-1, 2, -2, 0, -1, -1, -1, 0, 0, -1, -1, 3, -1, -1, -1, -1, 2, 1, 0, 0], [0, -1, 1, 0, -1, 1, 0, 0, 1, 3, 1, -2, 1, 1, 2, 0, -1, -1, 1, -1], [-1, 0, 1, 0, 0, 1, -3, 1, 0, 0, -1, 1, 0, 0, 0, 1, 1, -1, 0, -1], [-1, -1, 3, 0, -1, 1, -1, -1, -1, -3, 0, -1, 2, 0, 2, 2, -1, 0, -1, 1], [1, -1, 1, 1, -2, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, -1, 0, 0, 1, 1, -1, -1, -1, 0, 1, 0, 0, 0, -1, 0], [0, 0, 0, -2, 1, -1, 3, -1, 2, 0, 3, -2, 0, 1, 0, -1, 0, 0, 1, -1], [-1, 0, -2, 0, 0, -2, -1, 1, 2, 2, -1, -1, 0, 0, 0, -1, 1, -1, 0, 0], [-1, 0, -1, 2, -1, 0, 0, -2, -1, 2, 1, 1, 2, -1, 0, 0, 0, 2, 1, 1], [-2, 3, -1, -1, 2, 0, 0, -1, 0, -1, -1, 0, 0, -1, 0, 2, 0, 0, -2, -1], [5, 0, 0, -1, 0, -1, 0, 1, 0, 0, 1, 0, -1, 2, 1, 0, 0, 0, 0, 0], [-1, 5, -4, 1, 0, -1, -5, -3, 0, -5, -1, 2, -1, -2, -1, -1, 1, 2, -1, 1], [1, -2, -1, 0, 1, 2, 2, 0, 1, 2, 1, -1, 0, 1, 0, -2, 0, 0, 1, -1], [1, 0, 0, 0, 0, 0, 1, -3, 0, 0, 1, -1, 0, 0, 0, -1, -1, 1, 0, 0], [0, -2, 2, 0, 0, 0, 2, 2, 0, 2, -2, 0, 0, 0, 0, 2, 0, 0, -2, 0], [1, 3, 0, -1, 1, 0, 0, -3, 1, 1, 1, -1, 0, 1, 0, 0, 0, 0, -1, 0], [-1, 0, 1, 0, 0, 1, -2, -2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [3, 0, 3, 0, 0, 3, -7, 1, -1, -4, -3, 1, 0, 0, 0, 1, 0, 0, 0, 0], [-1, 3, -1, -3, 1, -3, 2, 1, 2, -2, 1, 1, -1, -1, 0, 1, 0, -1, -1, -2], [1, 0, 1, -1, -1, -2, 1, -3, 1, 0, 2, -2, 0, 2, 1, -2, 0, 1, 0, 0], [2, -1, 2, -2, 2, -3, 1, -2, 0, 2, 4, -3, 2, 3, 0, 1, -2, -1, 0, 0], [-6, -1, 1, 1, 4, 3, 5, 3, -1, 0, -2, 3, -1, -3, 0, 3, -1, 0, 1, -1], [0, 2, -3, -1, -1, 0, -1, -3, 0, -1, 1, 0, 0, -1, 1, -1, 1, 0, 0, -1], [1, 7, -4, -1, -4, -3, -2, -1, 2, -4, -3, 2, -4, -1, 0, -2, 4, 2, -2, 0], [1, -2, 0, -3, 0, 0, 4, 0, 0, 0, 4, 0, 0, 2, -1, 0, -1, 0, 1, -3], [2, 2, -3, -2, -5, -2, -3, 1, 3, -5, 2, 2, -3, 0, -4, -4, 2, 1, 1, -3], [9, -3, 2, -3, -7, 2, -5, 0, 0, -6, 4, -4, 2, 4, 2, 1, -2, -4, 1, -3], [3, -3, 0, -2, -1, 0, 0, 3, 2, 0, 3, 1, 0, 0, -3, 0, 0, -3, 4, -4], [4, -1, 1, 1, -3, 1, -8, 1, -1, 0, -4, 1, 0, 0, 0, 0, 0, 0, -3, 3], [-9, 2, -2, 0, 0, -1, -2, 0, 0, 7, -4, 3, -2, -1, -1, 0, 1, 1, 0, 2], [2, 0, 0, 0, 0, 0, -1, -1, 1, 1, 2, -3, 0, 0, 0, -3, 0, 0, 0, -1], [-2, 0, 0, 4, -2, 0, -2, 0, -4, 0, -4, 4, 0, -1, 0, 1, 0, 0, 0, 0], [-2, 3, -2, 0, 3, -4, -2, -5, 0, 0, -2, 0, 2, 1, 1, -1, 2, 1, -2, 2], [-6, 5, -1, 1, 4, -2, 4, 1, 0, 3, -3, 4, -2, -5, -2, 0, 2, 4, 0, 1], [1, 2, -1, -1, -1, -2, -1, 2, 2, 4, 0, -3, -1, 2, 2, 0, -1, -3, 1, -2], [-6, -4, 1, 0, 6, 0, 3, 1, 0, 3, -1, 0, 0, -3, 0, 1, 0, 0, -3, 0], [-1, -6, 2, -2, 4, 4, 1, 4, 1, 4, 3, -4, 1, 3, 1, 1, -2, -1, -1, 0], [1, 0, -2, 0, -5, -2, -1, 2, -1, -5, -1, 0, -1, -1, -1, -1, 2, 1, 1, 0], [6, 2, -5, 0, 0, -4, -3, -1, 1, -5, -2, 0, -2, -1, -1, -3, 3, -1, 0, -2], [-2, 2, -1, -1, -5, -4, 0, -5, 1, 0, 0, 0, 2, -1, 1, 1, 2, 1, 0, 0], [1, -2, 1, 4, -3, 2, -4, 0, -1, -2, -1, 3, -2, -1, -4, -4, 2, 2, 3, 1], [4, 4, -2, 0, 0, 0, -6, 0, 0, -6, -2, 4, -4, -2, -2, -2, 0, 4, 0, 0], [9, 0, 1, 0, 0, 1, 4, 2, -2, -9, 0, 0, 0, 0, 0, 0, -2, 2, 0, 3], [-8, 1, -1, -1, 2, 1, 9, 1, 1, 0, 0, -1, -1, -2, 0, 2, -1, 0, -1, 1], [3, 1, 0, 1, -1, 0, 0, 1, -1, -1, 0, -3, -2, 2, 2, 0, 0, 0, 1, 0], [-3, 0, 1, 0, 0, 1, 8, 4, 0, 3, 0, 0, 0, 0, 0, 0, 2, -2, 0, -3], [2, 2, 3, -4, 3, -2, 6, -2, 1, -4, 3, -2, 2, 2, 0, -1, 0, 2, -3, -1], [4, -5, 4, 4, -8, 4, 2, 0, -4, -8, 5, -2, 3, 4, 1, 2, -4, -2, 4, 0], [-6, 1, 1, 1, 4, 0, 2, 1, 0, 5, -7, 0, 0, -3, 2, 4, 2, 0, -2, 1], [-1, 0, -1, 5, 4, 0, 2, 0, -2, -6, -2, 3, -1, -2, -2, -1, 1, 1, 3, 2], [-7, 0, -2, 0, 0, -2, 8, -3, -1, 6, -2, 1, 0, 0, 0, 1, 0, 0, 0, 3], [0, -2, 2, 0, -1, 1, -10, 1, 0, -7, -1, -2, 1, 4, 3, 0, 1, -2, -4, 0], [3, -1, -1, -3, -2, -2, -1, 0, 3, 0, -1, 3, -3, -4, -2, 4, -3, -2, 2, -2], [-1, -1, 0, 3, 4, 1, 3, 2, 1, -5, -1, 1, -2, -1, 0, 0, 0, -2, 4, -1], [0, -4, 0, 3, 6, -4, 0, 1, -1, 6, 2, 1, 3, -1, -3, 0, 0, 0, 1, 0], [-8, -5, 5, -1, 7, 7, 6, 7, 1, 0, 0, -1, 2, 0, 0, 0, 2, 0, -1, 1], [-3, -2, 3, -4, 1, 2, -1, 1, 0, 1, -3, -4, 2, 1, 6, 5, 2, -4, -1, -4], [-7, 4, -2, 0, 0, 0, 0, 6, -3, 1, -3, 8, -4, -2, -2, 2, 3, 1, 0, -3], [6, -5, 2, 1, 3, -2, 1, 1, -2, 3, 3, -1, 3, 1, -1, 1, -2, -1, 2, 0], [-1, -2, 4, 1, 4, 2, 2, -3, -5, 0, -2, -5, 6, 2, 6, 3, -3, 0, -4, 5], [-2, -2, 2, 0, 3, 1, -4, 1, 0, -3, -1, -2, 1, -1, 1, 2, -1, -2, 0, 0], [-4, 2, -2, 4, 7, -1, 1, -1, -4, 0, -1, -2, 2, 1, 0, -1, 2, 0, -3, 3], [1, 1, 0, 5, 5, -8, 0, -1, -3, 5, -2, 1, 0, -2, 0, 0, 0, 0, 3, 0], [2, -2, 3, 2, 4, 2, 4, -1, -1, 14, 0, -2, 1, 2, 0, 1, 0, 1, 1, 1], [-3, -2, 5, 5, -8, 2, -10, -4, -6, -6, -2, 1, 5, -2, 2, 1, -1, 3, -1, 6], [5, -7, 4, 0, 1, 8, 2, 2, 2, 1, 4, -2, 3, 3, 1, 2, -4, -2, -2, 0], [-4, -16, 7, -1, 7, 2, 7, 5, 0, 7, -3, -4, 2, 1, 1, 7, -3, -4, -2, -1], [-5, 0, -1, 0, 0, -1, -7, 5, -1, 2, -8, 3, 0, 0, 0, 3, 4, -4, 0, 2], [0, 4, -3, -2, -8, -4, -2, -1, 5, -2, 6, 0, 1, 0, 0, -4, 0, 1, 3, -5], [15, -5, 4, -5, -10, 3, 2, 1, 0, -10, 3, -2, 2, 3, 2, 2, -4, -2, 0, 0], [8, 1, -2, -4, -7, 0, 3, -2, 0, -2, 2, 0, 0, 6, -1, 3, -1, 0, 4, -4], [-3, -8, 7, 0, 0, 3, -5, 3, -5, 4, 0, -5, 8, 4, 4, 7, -6, -2, 0, 2], [-17, 3, -4, 5, 14, -1, -2, 1, 0, 14, -5, 6, -2, -5, -2, -2, 4, 2, 0, 0], [9, 12, -10, -2, -2, -4, -1, -6, 2, 0, 6, -6, -2, 4, 2, -4, -2, 2, 0, 0], [13, -2, 6, 0, 0, 5, -1, 5, -7, -14, 1, 0, 2, 1, 1, 3, -1, -1, 0, 3], [-2, 0, 2, -2, -6, 0, -6, 2, 2, -10, 0, 2, -2, -2, 0, 6, 0, -2, 0, -2], [2, 10, -4, -1, 2, -4, -2, -7, -3, 2, 4, 1, -1, 3, -3, -2, 4, 2, 3, 0], [-2, -5, 3, 3, -1, 0, -4, 2, -3, 0, -7, 7, -1, -3, -2, 3, -1, -2, 0, 0], [-2, -2, 3, 0, 0, 2, 5, -5, -3, 5, 4, -4, 2, 1, 1, -1, -3, 1, 0, 2], [6, 2, -1, 1, -5, 2, 5, -3, 0, 9, -1, -4, 2, 3, 3, 1, -1, -4, 0, 1], [-5, 11, -4, -1, 11, -6, -2, -7, 1, 11, -2, 1, -2, -2, -2, -2, 4, 2, -1, 0], [-13, 2, -4, 5, 1, 2, -2, 3, 3, 1, -6, 7, -3, -5, -1, -2, 4, 2, -3, 0], [6, -5, 5, -1, -4, 0, -2, 5, 0, -5, 5, 0, 0, -1, -2, -2, -2, 0, 8, -1], [5, 8, -3, 0, -9, -2, -11, -1, 0, -11, 1, 4, -2, -3, 0, -5, 4, 4, 7, 0], [10, -1, 1, -3, -5, 4, -4, 4, 3, 0, 5, -5, -1, 0, 0, 0, -1, 0, 0, 0], [0, 0, 3, 0, 5, 0, 0, 4, -1, 8, -5, -4, -2, 2, 4, 3, -2, -6, -1, 1], [0, 9, -3, -4, 5, -9, 10, 0, 5, -9, 5, 2, -1, -1, -2, 0, 1, 1, 1, -5], [-4, 1, -3, -1, -12, -4, 5, -2, 1, 0, 1, -1, 0, -1, -2, 1, 0, -2, 0, 0], [5, 1, -1, 1, -5, -3, -6, -3, -1, 0, -3, 4, -2, -5, 0, 5, -2, 0, 1, -1], [1, -2, -1, 2, 3, 2, 4, 0, 1, -6, 1, -1, 0, 1, 0, -1, 0, 0, 3, -1], [-4, -8, -1, 3, 5, 0, -6, -1, 0, -4, -1, 0, 0, -3, -1, -1, -1, 0, -4, 3], [-6, 2, 1, 0, 0, 2, 3, 1, -8, 1, -3, 6, -2, -1, -1, 3, 2, 0, 0, -1], [0, 11, -9, 1, -10, -6, -1, -8, -1, 0, 1, 3, 2, 3, 2, -3, 2, 2, 4, -4], [-2, -6, 12, -5, 2, 6, 3, 0, 1, -4, 1, 0, 1, -1, 2, 1, -1, -1, -4, -1], [7, -4, -3, 0, 0, -5, -6, -8, -4, -3, 2, -6, 4, 2, 2, 0, -2, -2, 0, 1], [4, -1, -1, -7, -2, 4, 5, 6, 7, 0, 9, -3, 0, 3, -2, -3, 0, -2, 6, -6], [-14, 5, -2, 3, -1, -2, -1, -1, -6, -1, -7, 9, -3, -5, 1, -1, 2, 1, 6, 0], [-1, -6, 7, -6, 5, 2, 5, 5, 0, -1, 9, -4, 2, 3, 0, 1, -4, -4, 1, -6], [0, 0, 2, -4, -6, 0, -4, 0, 2, 2, 2, -4, 2, 2, 4, -2, -2, -2, -2, -2], [2, 1, 0, -1, -8, -3, 0, -5, 0, -8, 7, 3, 4, 3, -4, 0, 0, 0, 0, 0], [-21, -1, 1, 4, 20, 2, 8, -1, 0, 17, -2, -4, 2, -2, 5, -3, 1, -4, -3, 4], [-2, -8, 4, 0, 4, 8, 6, 4, 6, 16, 2, 2, -4, -2, 0, -2, 0, -4, 6, -6], [2, -2, 2, 0, 0, 1, 8, 3, -3, -5, -2, 2, 2, 1, 1, 5, -1, -1, 0, 3], [2, 13, -10, 0, 0, -4, 2, -7, 0, 0, 5, -7, 1, 7, 3, -7, 1, 3, -2, 2], [8, 9, -8, 2, -2, -6, -4, 2, 2, -2, -6, 6, -7, -3, -1, -4, 8, 4, -2, 0], [7, -6, 2, -4, -14, 6, -2, 10, 4, 0, 6, 0, 1, 3, -4, -3, 1, -4, 6, -6], [-6, 1, 0, 5, 3, -1, -1, 5, 1, -1, -4, 10, -7, -8, -4, -3, 2, -3, 6, -1], [-8, -4, 4, 2, -3, 0, 9, 0, -2, 0, 0, -2, -1, -3, 0, 3, -1, 0, -2, 2], [6, -3, 0, 0, -7, 0, 4, 0, 0, 5, 4, 0, 0, 4, 1, -5, 1, 0, 6, 0], [-9, 4, 1, 0, 0, 3, 4, -6, -2, 7, -2, 4, -4, -2, -2, -2, 0, 4, 0, 5], [0, -3, 2, -1, -1, 3, -5, 1, -3, -17, -4, 0, -1, 0, 0, 5, 0, -1, -4, 3], [13, -10, 8, -10, -7, -1, 4, 0, 1, -7, 13, -16, 6, 11, 2, 4, -8, -4, -1, 0], [-1, -15, 8, -5, 7, 2, 4, 3, 1, 7, 4, -5, 8, 0, 0, 4, -8, -4, -1, 0], [-3, -8, 14, 0, 0, 10, -4, 6, -5, 5, 5, -6, 8, 4, 4, 6, -7, -1, 0, 1], [-5, 11, -8, 3, 3, 0, -1, -8, 0, 4, -4, 0, 0, -2, 2, -1, 2, 0, -5, 3], [6, -10, 2, -2, 3, 3, 1, 6, -2, 3, 2, -4, 3, 0, -1, 1, -2, -1, 2, 0], [7, -10, 13, 0, 0, 8, -10, -5, -1, 4, 6, -16, 10, 5, 5, -1, -5, -5, 0, 4], [-1, 5, -4, 2, 12, 1, 3, 0, -2, 0, 2, 1, 0, -3, 1, 3, 0, 1, 3, -3], [10, 2, -1, -4, -12, 0, -15, -1, 0, -17, -1, 0, 0, 5, 2, 3, 2, 0, -5, -4], [5, -2, 3, -6, 3, 2, 4, 2, 3, -6, 1, -5, -2, 5, 0, 2, 0, -2, -3, -3], [9, 4, -6, 0, -9, -8, -3, -2, -3, -9, 1, 0, 1, -3, -7, -3, 6, 3, 3, 0], [-4, -5, 9, 1, 7, 5, 5, 0, -2, 13, -2, -4, 4, 0, 8, 3, -4, -4, -1, 2], [-8, -4, 3, 0, 0, 1, 11, 5, -2, 11, 3, -5, 4, 2, 2, 1, 1, -5, 0, -3], [-1, -10, 5, -2, 6, 3, -5, 2, 0, -6, 4, -6, 3, 2, 1, 3, -5, -6, -3, -2], [-3, 2, -1, 3, -3, 4, 1, 3, -3, 0, 0, 2, 2, 1, 1, -1, 2, 1, 2, -2], [10, -6, 5, 0, 0, 2, -5, 0, -1, -2, 7, -11, 6, 3, 3, -2, -8, 2, 0, 8], [-7, 0, -1, 0, 0, -1, 5, 7, 7, 12, 2, -5, 0, 0, 0, -5, -2, 2, 0, 0], [4, 10, -8, 0, 0, -2, -4, 0, 0, 0, -12, 8, -6, -10, -2, -4, 8, 4, 0, 0], [10, 4, -4, 0, -18, 2, -2, 2, 0, 0, 10, -4, 2, 6, 0, -6, 2, 0, 6, -6], [-18, 8, -7, 0, 13, -3, 7, -4, 0, 6, -2, 6, -3, -5, -1, -3, 5, 6, 1, 0], [-16, 8, -2, -6, 14, -2, 14, 0, 0, 6, 4, 4, -2, -3, -2, 0, 2, 4, 0, -6], [-24, 1, 4, -2, 27, 0, 17, 4, 0, 12, 2, 0, 0, 2, -3, 3, -3, 0, 0, -2], [6, 0, -6, -2, -6, -6, -2, 0, 2, 0, 4, -4, 0, 0, -6, 0, 0, -6, 0, 0], [-4, -6, 6, 8, 8, 6, 8, -2, -2, 2, 0, 0, 4, -2, 4, 4, -2, 0, 6, 2], [-6, 8, -7, 0, 0, -3, 6, -4, 9, 4, 9, 6, -8, -4, -4, -6, 1, 7, 0, -4], [2, -4, 1, 0, 0, -1, 17, -3, -3, -2, 6, -2, 4, 2, 2, 4, -4, 0, 0, 2], [-1, 7, -2, 3, -8, -7, -11, 2, -1, -5, -3, -3, 0, 1, 4, 5, -2, -4, 2, 1], [8, 5, -5, -1, -6, -2, -13, -2, 1, 0, -5, 3, 0, -1, 0, 1, 0, 0, -2, 2], [3, -3, -6, 3, -1, 0, 1, -6, 0, 2, 0, 0, 0, -4, -2, -1, -2, 0, 5, 3], [9, 9, -4, 1, -5, 2, -2, 1, 1, -5, -10, 5, -8, -4, 4, -2, 4, 2, -1, 0], [9, -7, 4, -1, -3, 0, 2, -1, 1, -3, 10, -7, 6, 6, -2, 2, -4, -2, -1, 0], [-11, 13, 4, 1, 7, -2, 1, 6, 0, 2, -4, 4, -2, 1, 0, -1, 4, 4, -7, 1], [-4, 3, -5, 3, 5, -4, 6, -2, -3, 0, 1, 1, -1, 2, -2, -2, -1, -2, 2, -2], [13, -5, 4, -1, -18, 3, 2, -1, 0, -18, 2, -4, 4, 0, 0, 2, -4, -2, 0, 0], [6, -4, 6, 2, -7, -1, -11, -3, -2, 0, -5, 6, 0, -1, 2, 1, 0, 2, 1, -1], [-8, -19, 17, 9, 3, 19, -3, -2, -8, 7, -6, -4, 8, -2, 12, 7, -6, -4, 1, 8], [-6, 13, -9, -5, 3, -1, 4, -8, 0, 0, 2, 2, -1, 1, 1, 0, 3, 2, -2, -5], [11, -4, 7, 0, 0, 5, -9, -9, -3, -8, 2, -5, 4, 2, 2, 1, -8, 4, 0, 6], [-1, 2, -5, 2, -4, -5, -15, 0, 0, -18, -10, 10, -5, -11, -5, 3, 5, 10, -5, 2], [5, -9, 6, 5, -3, 2, -1, 4, 0, 6, -3, -4, 2, 5, 2, 0, -2, -4, 1, 5], [-15, 4, -5, 0, 0, -3, 8, 14, 6, 17, -4, 0, -4, -2, -2, -6, 8, -4, 0, -7], [-11, 1, -4, 1, 5, -2, -1, -2, 0, 2, -7, 4, -2, 3, 2, 0, 6, 4, -3, 1], [-6, 5, 0, -11, 3, -2, 0, 1, 7, 3, -6, -6, -6, 0, 6, 0, 0, 0, -7, 0], [-3, 6, 2, 2, -9, -6, -12, 1, -2, -4, -3, 7, -3, -5, -4, 0, 2, 1, 0, 2], [-7, -10, 10, -4, 4, 6, 5, 2, 5, 4, 3, -10, 3, 5, 7, 5, -10, -5, -5, 0], [12, -5, -1, -1, 14, 4, -1, 10, 1, 0, 7, 3, -4, -1, -6, 1, -4, -6, 10, -10], [8, -2, 7, 0, 0, 6, -3, 9, -5, -11, -6, 2, 2, 1, 1, 5, 1, -3, 0, 0], [0, 7, -1, 5, 11, -7, 7, -4, -8, 3, -4, 0, 4, 0, 0, -1, 0, 4, -3, 8], [-12, 14, -8, 0, 7, -15, -4, -8, 1, 7, -1, 5, -2, -3, -6, -4, 8, 4, -1, 0], [0, 2, -4, 0, -4, -2, -6, 0, -2, 12, -2, 4, -2, -2, -4, -4, 2, 2, -2, 2]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_693_m_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_693_2_m_j();".
// 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_693_2_m_j(:prec:=20)
    chi := MakeCharacter_693_m();
    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_693_2_m_j();".
// 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_693_2_m_j( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_693_m();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![121, -1155, 13084, -43696, 67756, -33295, 11660, -15494, 26062, -3393, 15808, -1174, 4638, -153, 662, -10, 94, -3, 12, 0, 1]>],Snew);
    return Vf;
end function;