
// Make newform 98.2.e.a in Magma, downloaded from the LMFDB on 07 December 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_98_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_98_e_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_98_2_e_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_98_2_e_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 := [729, -6804, 38232, -56565, 57726, -43359, 25378, -10168, 7272, -1092, 1786, -282, 432, -85, 72, -23, 15, -6, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [71118173934409380488766390294, 967650595331333424467566781259, -1722228805996632815732220879180, 2099865762766593631546061645529, -719613121908098820715014186918, 864045388703495817784663010401, -105528207493893102592977311419, 187865311214703586839327158175, -14030907819417365887072158387, 44248918343919751452730754212, -8652663576611853540543729246, 7597976644312541423261696226, -2010945999033739260005960950, 1400721420122708642190436362, -756991685900368306021245941, 325008551120043300765698265, -79513806052424886535080999, 10015658002884652210594435], [-252969283425255760130639688702, 819519104662852361547822298254, -981876765226275758135851286679, 1958830447042537083700638234147, -806764686368952825190079739225, 579229036136375085942086148175, -247718221127857932097539167458, 122899553015186383044162308622, -44918138620408547170959066708, 26381419892223036176457799546, -11776823211587405847309643404, 7188519785503926976523617737, -2628749503893476320422432403, 1227462567742034605070636802, -549699265959367850084592104, 353152647227254606333909665, -115631656173465529392831096, 15063944114204749831611655], [299012126378471580200349966345, -2391585101296493082876908821764, 4922166434608488226565457025290, -4141305721548754261642900997748, 3232287070257291967556943508386, -1859597903270901280987168204118, 710485961247755972823126857588, -502146333272960582706490588632, 80979466965476241952908972741, -130209659986893343767711772013, 22887329316344477379744851724, -29533327386582844960007888247, 5985140084614291811360696948, -5040289764691277439983347605, 1821294872515576113369306640, -1052195847010030610375409705, 387797895523455927922916856, -62815927889454801852857927], [186423419104347237939913661712, -2177715190336785221727031220187, 3881913804745021304427437589816, -4280424521725472685499347598332, 3748402695380817579792521643918, -1619011690207337248963099980872, 1056477200316421390035150022577, -458083171095305193454089369645, 149105967065761886025983241600, -113305754705400741485527353272, 32470500679196980542280217475, -31540812940865832652614370335, 8031289866524510565638508707, -5437442595662024764683374562, 1757391154150724036216711008, -1277681060513850495065466555, 509686625397423499737017085, -79790146213961812095811931], [158459249151164759917846330071, 301547760906705942114951426423, -1701618818868706090540982163048, 2629307432802732653170282024980, -2373600084748988380011187627704, 1710812629708525923597234018715, -461370730082250140024008381978, 657714726776550819254319835236, 22152728143589424115919705889, 154578251845407109438646931007, 5375198066276994932517168147, 36478660645677555573372972198, -3273923422382866649085772270, 5410056698869938196449955941, -1048806029795318531280661184, 993991537625664669089712162, -513710134690333672589360613, 98969763333246802301305825], [2916261130538305140838516478871, -9515793755392223480959896372438, 11829502740318280522688051427123, -14077663871206825443078759156969, 8470683248275113603012748510602, -5287424772875720088498273289174, 2245913948175213335209512047449, -1260593030880670008680068534410, 354478537469789796475581860547, -295889525936558954919495289831, 91254008336451865810746068787, -75139252432669145395149765315, 21795816346155574604253610075, -12885493547375789552672218347, 5051961266871175080322447310, -3132234779085064200951935280, 1094564641225342853219584008, -159066520544535193773418690], [-5341502258952731104044551521257, 30035778323056040498697435753648, -44773714184151550407053964019245, 44763675219268104773850835515534, -33406654283962420673169887346468, 17932996243572920285072453806600, -8603653009008842905683377136004, 4675581567944828987415938463717, -1175823233203183953131941584945, 1148517282278454040771475431801, -293326962433446091809965274948, 291527102091441506467873014714, -71658302515741520733452493568, 50097306726768106680611266536, -17980175149818514493320435217, 11322565536858949160845015794, -4209483343114919664134691057, 652095675519196542871795597], [-1313289836088633002863511132625, -17684876524848901522597436673240, 30553955659668855663959637347964, -33040710807756924451237480483830, 28406886859194415783302948856440, -16299924489709683173265450783821, 6426381455656482425288110953977, -5131575529777253906938725781248, 497837360007037215174634889112, -1272762269651150486194911610199, 121720788286151148540328298883, -307325542141488224640708761367, 48897510171324687948306506954, -49964395161058120614287248224, 13811971795413125356853041567, -9978558587039040484734236505, 4363676946650638957290679311, -767174564215420732263019184], [1541527540639534733004814796298, -12284956765520470773159919054137, 17669712100213419119028626500323, -19224654867823521810339833388363, 14466717685448898581416495830467, -8558666517920346019336444398906, 3405484087407310968133264789762, -2478528540485846442774187457628, 352551992316802053072730869950, -607980570749327254774531898464, 90667910839903651016398730979, -147278974007369196349586272013, 28268270067575852378611631428, -24434921319251077594916858632, 7628045595270526577485998209, -5089497632412043938315804474, 2066987771319999037251842573, -347008619239033964513909038], [-829099411849744791446463014295, -10603924538017212587873068927128, 17734868724517969683509216042184, -20739573128313105829238898598548, 13910851630149773290315229295921, -10009479682654874236126375446233, 2912912447857175257441638656495, -2960263372926185044942602655038, 197439371166522114432643132740, -709825195895681463978819773141, 68140711004193595888444113525, -164582266911262014152624314254, 26603174435231520716279091926, -26011882798107695196206182842, 8218266386122571901486549355, -5377030128179898977942569905, 2185804030260565128267648045, -376709830763300081781784436], [-6021796799859956600249031072957, -3891810189241272978872109906075, 21741567124854454288818965903178, -31283514197664178912138621986885, 27777939920526632384630531298948, -20800026852696395969043220712647, 5161123144741209163824967253656, -7570664536385116860680334613572, -296369950322829420886511340420, -1842809062118817217906241882851, -60165661235447838304100986314, -424567584693029137448060028126, 37593906266479117910055547315, -63635984479569573756409324068, 13112252167699805132194127096, -11642548696489147680927800673, 5901863313019534433551105539, -1135999111334819878684742095], [-3169127160764757719929091270628, 37768236478714175214106149741729, -57715255375527326356192734205848, 60258065850169011649108815145119, -44643080670994661723351835738249, 28283212807530809035764498069784, -9731166886037695056143421396598, 8504074796401272999726166061313, -789414755279025568174553993706, 2080339711900847661274839084136, -220683858331460953999490432229, 489071118310891241511208577100, -82799739093457212672116461738, 79718389639823888938657169895, -23943337036022167648310018102, 15890065906954737976631589147, -6608421975346603613974141113, 1144925578117797213835374706], [399194744902574998993024197456, -10759358415462465757275118987470, 19059820380780799831680550094577, -20445043529637976123863361234044, 15924855852070867231916774444377, -9698745510950943289624721490702, 3668437070041578549635290560608, -2901758781353104459304903037219, 317693278291969434804005873047, -709671871934616074386818989006, 86133914916200400055765349763, -171207231102628126085142986812, 29823949936502253859097238320, -27710766992024826869381307320, 8381657248607042564669925310, -5764714992922461360150127719, 2398189227488912113376359903, -410167525896394485871536305], [-3246172494896443931124509676474, 18255592512090567921675219645582, -27076204528021685643869080856097, 28474293545697513400787513832807, -21436477038485504140091939872619, 13994542204786511655223202199298, -4482020639092148209806876802790, 4389683010419878886208530834151, -261478372132187225378147714780, 1077074400016307167486215205832, -79007425754407678220957110194, 249568208374138444004748436193, -37189455257992697407325139518, 40304008963229823832255577140, -11219602907537752005224711452, 7693130540011372505279690505, -3347128431794684072991230372, 598631590701964372287340148], [-9042950570722109757533073559023, 72190239403749442926020239581189, -121600962043538454091880878874958, 118982907487833213596041778934051, -92543960789490041951351554225422, 53966931284728730567677160248427, -21176928230395475179908675779414, 15674782108585661485756552078326, -2141569439787345017793039488469, 3858773213238277273710851321387, -567222840656126596832959662090, 929166297660030505828170327180, -174080440678512764108199345083, 153418655951200077411890039574, -49162399546204216782350080732, 31889029358726445626946229233, -12780347291338810838300272935, 2145231712704303229518601301], [-284315334545951491006305463302, 3362099146381257962649895749492, -5422723712576837018799996345768, 5709118190279399840369716801143, -4591293872023733657280018794198, 2491372962542050642159545741145, -1145139553287565507218288002909, 710987056110460637789368666725, -133133973134482591519493014184, 175533834065687368781134714664, -31818049257439064693167793541, 44057988662956524608924146172, -9146068901290900191639747632, 7375538011753096245658287157, -2325441523110191238160183909, 1594943424710984277428535135, -644903360772846763531532906, 106141212674333523451018883]];
    Rf_basisdens := [1, 1, 1173029309718312100657181531337, 1173029309718312100657181531337, 1173029309718312100657181531337, 1173029309718312100657181531337, 1173029309718312100657181531337, 1173029309718312100657181531337, 3519087929154936301971544594011, 3519087929154936301971544594011, 1173029309718312100657181531337, 1173029309718312100657181531337, 3519087929154936301971544594011, 3519087929154936301971544594011, 1173029309718312100657181531337, 1173029309718312100657181531337, 3519087929154936301971544594011, 167575615674044585808168790191];
    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_98_e();"
function MakeCharacter_98_e()
    N := 98;
    order := 7;
    char_gens := [3];
    v := [5];
    // 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_98_e_Hecke();"
function MakeCharacter_98_e_Hecke( : Kf := false)
    N := 98;
    order := 7;
    char_gens := [3];
    char_values := [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := ISA(Type(Kf), Fld), 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]];
    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, -1, 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, -1, 0, 0, -1, 0, 0, 1], [-1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 1, -1, -1, 0, -1, 0, -1], [0, 0, 0, 1, 0, 0, 1, 0, 1, -1, 1, -1, 0, 0, 1, 1, 0, 0], [-1, 0, -1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, -1, 0], [3, 0, -2, 2, 0, 0, 1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0], [1, -1, 0, -1, 0, -1, 0, 2, -1, 1, -1, 0, 1, 1, 1, 1, 0, 0], [-1, -1, 1, 0, 0, 0, -1, -1, -2, -1, -2, 1, 0, 0, 1, 0, 0, -1], [-2, 0, 1, -1, 1, -1, -1, 0, 1, 0, 2, 0, 1, 2, 1, 0, 0, 0], [1, 1, 0, 1, 0, 1, 1, 1, 2, -3, 2, 0, 0, 0, -1, 1, -1, 1], [2, 1, -1, 0, -3, 1, 3, -2, 0, 5, -2, 2, -2, -5, -3, -2, 2, -2], [-3, -1, 1, -1, 1, -2, -2, 0, 2, -1, 0, 0, 0, 3, 1, -1, 0, 0], [0, 0, 0, 0, 0, -1, 0, 0, 2, -2, 2, 0, 0, 3, 2, 0, 0, 1], [4, 0, -1, -1, -1, 0, 0, 1, -4, 1, -1, 0, 0, 0, 0, 0, 0, 0], [-3, 0, 0, 0, 0, 1, 1, 0, 1, -4, 0, 0, 0, 3, 4, 1, 0, 0], [-1, -2, 2, 0, 0, 0, -2, 1, 2, -2, 2, -1, 0, 0, 1, 0, 0, 1], [2, 0, 0, 0, -1, 1, -1, -1, -1, 0, -3, 1, 3, -3, -1, 0, 0, 0], [1, -2, 2, -1, 2, -2, 0, 0, -1, 1, -1, 0, -1, -1, -1, -1, 0, 0], [-2, 2, 0, 2, 0, 0, 0, 0, 0, -2, -6, -1, 1, 0, 0, 0, -1, 0], [0, 0, -2, 2, 0, 0, 1, -2, 0, 0, 0, 2, -1, 0, 0, 0, 2, -2], [4, -2, 0, -2, 1, 0, 0, 0, -1, 4, -7, 1, -1, -1, 0, 2, 0, 2], [0, 1, -3, 1, 0, 0, 3, 0, 3, 0, 2, 0, 0, 3, 0, -2, 0, -2], [5, 0, -1, 1, -1, 1, 0, 0, -2, 0, -2, 0, -1, -2, -2, 0, 1, -1], [-1, -1, -3, 0, 0, 3, 0, -2, 0, -1, 1, 1, -2, 1, -4, -2, 2, -1], [3, 0, -4, 0, -3, 4, 3, 2, 0, 3, -3, 0, -1, -3, -3, 2, 1, 0], [-4, 1, 3, 1, 1, 0, -3, 0, 0, -4, 0, -3, 3, 0, 0, 1, -1, 1], [0, -3, 0, 1, 3, -1, 1, 1, -1, 1, 2, -2, 1, 4, 2, 2, 0, 3], [-3, 4, -4, 4, -2, 0, 4, 0, 2, -3, 3, 1, -1, 2, 0, -1, -1, -1], [0, 1, 1, -3, 0, -3, 1, 2, -6, 0, -6, 0, 0, 0, 0, -1, 1, 2], [3, -2, 2, 0, 0, -1, -1, 1, -7, 0, 0, 0, -3, -3, 0, 0, -1, -3], [6, 1, -1, 2, -2, -1, -1, 0, 0, 3, 0, 0, 0, -6, -3, -3, 0, 0], [-4, -1, 2, 0, 3, -2, -3, 3, 0, 2, 4, -5, 4, -2, -5, 3, -4, 5], [0, -1, 0, -1, 1, -4, -1, 2, -5, 5, 5, 2, 2, 2, 5, -2, 0, -1], [2, -1, 0, -2, 0, -1, 0, -2, -2, -1, 1, 0, -1, -2, -2, -1, 0, 0], [-6, -2, 2, -4, 4, -2, -2, -2, 0, -1, 0, 0, 1, 6, 1, -1, 2, 1], [-3, 1, -1, 0, 0, 3, 3, -4, 11, 2, 0, 0, -2, 3, -2, -1, 4, -2], [6, 0, -1, -3, 0, -3, 0, 1, -3, -1, -3, 2, 0, 0, -6, 1, -1, 1], [-8, 0, 4, 3, 4, 0, 0, 0, 8, -1, 1, -2, 0, 3, 3, 0, -2, 0], [-4, 2, 3, 1, 0, 1, 2, -2, -1, 5, -1, 4, 0, 0, 4, 2, -2, -2], [-4, 0, 0, 0, 2, 0, 0, 0, 2, -4, 5, -1, 1, 2, 0, -3, -2, -3], [-5, -5, 4, 0, 4, -4, -4, 1, 0, 0, 5, -3, 3, 0, 1, 1, -3, 3], [-1, -2, -2, 0, 0, 2, 0, -5, 0, 3, 1, 5, -3, -3, 3, -5, 3, -5], [3, 0, 1, -1, 0, 0, -5, 3, 2, 0, 2, -3, -1, 2, 2, 0, -1, 1], [-6, -2, 1, 0, -1, -1, 1, 5, 0, -6, 6, -2, 2, 6, 4, 5, -2, 2], [5, -4, 1, -4, 0, 0, -1, 0, -4, 5, -11, 3, -3, -4, 0, -3, 5, -3], [-5, 1, -3, 3, -3, 1, 0, -3, 5, 0, 0, 0, 0, 6, 6, 0, 0, 0], [5, 0, 4, -4, 2, -2, 2, 0, 1, 0, -10, 0, -1, -10, 1, 0, -2, 2], [3, 3, -3, 2, -2, 0, 0, -2, -8, 8, 0, 0, 0, -3, -8, 2, 2, 0], [-3, -3, -1, 0, 0, 0, -3, -3, 3, -3, 3, 0, 0, 0, 3, -3, 3, -3], [-5, -1, 1, 0, 0, -2, -2, -3, 4, -7, 0, 0, 2, 5, 7, 3, 3, 2], [-3, -1, 3, 0, 3, -1, 0, 0, 3, -7, 7, -2, 4, -2, -2, 4, -2, 0], [9, 1, -1, 2, -2, 3, 3, 0, -2, -1, 0, 0, 0, -9, 1, -2, 0, 0], [-5, 3, -6, 0, 0, 0, 3, -3, 1, 3, 1, 7, 0, 0, 5, -4, 4, -3], [0, 0, -1, 1, -3, 3, 0, 1, 8, 0, -6, -1, -3, -6, 8, 0, -1, 1], [9, -1, 2, -1, 1, 0, -2, 0, -7, 9, -6, 1, -1, -7, 0, 2, -4, 2], [4, 5, 0, 1, 0, 5, 0, 3, -4, 0, 0, -2, 3, -3, -3, 3, -2, 0], [6, -1, 4, -5, 0, -5, -1, 1, -8, 2, -8, -2, 0, 0, -6, -3, 3, 1], [0, 2, 0, 1, -2, 4, 1, -1, 3, -3, 0, -5, -1, 5, 0, 5, 0, 2], [0, -2, 0, -6, 2, 1, -6, 0, -12, 12, -1, 3, 0, 0, -1, -3, 0, -3], [0, 0, 5, -5, 5, -5, -2, 1, -2, 0, 8, -1, -1, 8, -2, 0, 1, -1], [0, -1, 0, 4, 1, -1, 4, -3, 5, -5, 8, -3, -3, -2, 8, 3, 0, 5], [10, 0, 3, -6, 0, -6, 0, 2, -5, 10, -5, 2, 0, 0, -10, -2, 2, 2], [6, 0, 2, -2, 0, 0, -4, 4, 0, 0, -9, -4, -1, -9, 0, 0, -4, 4], [10, 6, -9, 0, -9, 6, 0, -1, -10, 11, -11, 1, -1, -10, -10, -1, 1, 0], [4, 3, -5, 7, 0, 7, 3, 2, -2, -3, -2, 1, 0, 0, -4, 4, -4, 2], [8, -2, 2, 7, -7, 5, 5, 3, -7, 1, 0, 0, -4, -8, -1, 1, -3, -4], [0, -2, 2, -1, 2, -2, 0, 6, 0, -6, 6, -3, 0, 0, 0, 0, -3, 0], [-10, 3, -3, 5, -5, 3, 3, -3, -4, -7, 0, 0, -2, 10, 7, -3, 3, -2], [-5, 0, 0, -2, 2, -4, -4, 3, -3, 3, 0, 0, 2, 5, -3, 5, -3, 2], [3, -8, 8, -1, 1, -5, -5, 2, 2, -4, 0, 0, -3, -3, 4, -5, -2, -3], [1, 1, 1, 1, 5, 0, -1, 0, -3, 1, 2, -2, 2, -3, 0, -4, -5, -4], [2, 0, 4, -4, -2, 2, 0, -1, -1, 0, -14, 1, -4, -14, -1, 0, -1, 1], [0, -1, 0, 3, 1, -2, 3, 6, 6, -6, -1, -4, 6, 13, -1, 4, 0, 3], [-10, 0, 1, 0, 2, 0, -1, 0, 9, -10, 9, -3, 3, 9, 0, 4, 2, 4], [-7, 0, -2, 0, -3, 2, 3, -8, 0, 2, 7, 7, -8, -2, 5, -8, 8, -7], [-4, -3, -3, 0, 1, 3, -1, 1, 0, -6, 4, 4, 1, 6, 2, 1, -1, -4], [0, 3, -5, 3, -2, 0, 5, 0, 3, 0, -1, -3, 3, 3, 0, 4, 3, 4], [-2, -1, 5, -1, 0, -1, -1, 4, -1, -12, -1, -3, 0, 0, 2, 7, -7, 4], [3, 0, 4, -6, 4, 0, 0, 7, -3, -6, 6, -6, 1, 4, 4, 1, -6, 0], [-14, -3, -2, 2, 0, 2, -3, -4, 12, -9, 12, 0, 0, 0, 14, -3, 3, -4], [5, 2, -2, -7, 7, 0, 0, 0, -5, 5, 0, 0, 1, -5, -5, 2, 0, 1], [-3, -8, 5, 0, 8, -5, -8, 1, 0, 2, 3, 0, 3, -2, -7, 1, -3, 0], [0, 4, 0, 3, -4, -2, 3, -1, -2, 2, -11, 0, -1, -7, -11, 0, 0, 2], [0, 3, 0, 3, -3, -4, 3, 0, -7, 7, 1, 5, 0, -3, 1, -5, 0, -3], [6, 1, -9, 0, -3, 9, 3, -1, 0, -1, -6, -5, -2, 1, -12, -1, 2, 5], [9, 1, -1, 0, 0, 2, 2, 1, 0, 11, 0, 0, -1, -9, -11, -1, -1, -1], [-14, -3, 10, 0, 0, 0, -3, -4, 9, -13, 9, 3, 0, 0, 14, 1, -1, -4], [3, 3, 0, -5, 0, 3, 0, -5, -3, 8, -8, 7, -4, -10, -10, -4, 7, 0], [-3, -5, 3, -4, 3, -5, 0, -2, 3, 1, -1, 4, -4, 2, 2, -4, 4, 0], [0, -1, 0, -1, 1, 5, -1, -2, 10, -10, 9, 1, -2, 10, 9, -1, 0, -1], [1, -1, 4, 0, 7, -4, -7, 3, 0, 9, -1, -6, 4, -9, -3, 3, -4, 6], [-10, 0, 4, -4, 10, -10, -5, 5, -5, 0, 1, -5, 4, 1, -5, 0, -8, 8], [-13, 1, 0, 1, 0, 0, 0, 0, 4, -13, 16, 1, -1, 4, 0, -10, 4, -10], [0, 1, 0, -5, -1, -2, -5, 7, -5, 5, -12, -5, 7, 7, -12, 5, 0, 8], [8, 0, -4, 4, -4, 4, 1, -1, -8, 0, 4, 1, 1, 4, -8, 0, 4, -4], [-1, 0, 0, 0, -3, 3, -8, 6, -9, 0, -2, -6, 7, -2, -9, 0, -3, 3], [-11, 2, -2, 8, -8, 1, 1, 0, 7, -7, 0, 0, 1, 11, 7, 1, 0, 1], [0, -5, 0, -3, 5, 1, -3, 1, 3, -3, 3, -1, 1, 11, 3, 1, 0, 2], [11, 4, -4, 0, -7, 4, 7, -1, 0, 7, -11, 4, -3, -7, 9, -1, 3, -4], [-14, 0, 0, 0, 3, -3, -8, 3, 0, 0, 8, -3, 8, 8, 0, 0, 0, 0], [7, 4, -10, 4, -4, 0, 10, 0, 7, 7, 5, -1, 1, 7, 0, 1, 8, 1], [-2, 0, 5, -5, -1, 1, -3, -3, 5, 0, -8, 3, -2, -8, 5, 0, 5, -5], [-3, -4, 1, 0, 0, 0, -4, 4, 4, -12, 4, -7, 0, 0, 3, 2, -2, 4], [0, 1, 0, -1, -1, -2, -1, -2, -15, 15, -18, 1, -2, -11, -18, -1, 0, -4], [-2, 0, 0, 0, -8, 8, 7, -4, 3, 0, -2, 4, -5, -2, 3, 0, 3, -3], [6, -3, 3, 0, -6, -3, 6, 1, 0, 4, -6, -2, -4, -4, 11, 1, 4, 2], [0, 0, 0, 4, 0, 3, 4, -5, 2, -2, 0, 6, -5, -8, 0, -6, 0, -9], [0, -1, 0, -3, 1, 1, -3, 2, 6, -6, 9, 1, 2, 12, 9, -1, 0, 5], [-12, 0, 1, -1, -4, 4, 9, -4, 17, 0, 9, 4, -6, 9, 17, 0, 2, -2], [-2, 3, 6, 3, 0, 0, -6, 0, 6, -2, -5, -1, 1, 6, 0, -1, -1, -1], [1, -1, 7, -9, 0, -9, -1, -4, -5, 16, -5, 8, 0, 0, -1, -2, 2, -4], [13, 0, -1, 1, 0, 0, 4, 3, -15, 0, -2, -3, -2, -2, -15, 0, 3, -3], [-1, -2, 2, -1, 1, -4, -4, -1, -9, 1, 0, 0, 0, 1, -1, -5, 1, 0], [14, 0, 0, 4, 0, 0, 0, 3, -14, 16, -16, -1, 3, 0, 0, 3, -1, 0], [-12, -11, 11, -6, 6, -12, -12, 7, -13, -3, 0, 0, 4, 12, 3, 4, -7, 4], [-15, -5, 5, -4, 4, -9, -9, -1, 3, -2, 0, 0, 0, 15, 2, -7, 1, 0], [-3, 5, -5, 6, -6, -5, -5, 0, -8, -1, 0, 0, 0, 3, 1, -2, 0, 0], [1, 1, 4, -2, 4, 1, 0, -4, -1, -4, 4, 1, -1, 2, 2, -1, 1, 0], [6, 0, -6, 0, -3, 0, 6, 0, 9, 6, -14, 0, 0, 9, 0, 3, 6, 3], [0, -4, 0, -5, 4, 4, -5, -4, -2, 2, 10, 6, -4, -4, 10, -6, 0, -1], [-1, -7, 7, -7, -4, 0, -7, 0, 10, -1, -8, 2, -2, 10, 0, 1, 6, 1], [-8, 4, -6, 0, 2, 6, -2, 0, 0, -7, 8, -2, 4, 7, 10, 0, -4, 2], [0, 9, 3, 0, -4, -3, 4, -2, 0, 13, 0, 4, 2, -13, -9, -2, -2, -4], [5, -5, -5, -5, 9, 0, 5, 0, 3, 5, 5, 3, -3, 3, 0, -4, 2, -4], [23, -6, -1, -9, -1, -6, 0, -1, -23, 12, -12, 7, -2, -3, -3, -2, 7, 0], [13, -4, 4, 2, -2, -3, -3, -4, 4, 3, 0, 0, 2, -13, -3, -4, 4, 2], [14, 2, -8, 0, -11, 8, 11, -6, 0, 1, -14, 6, -10, -1, -2, -6, 10, -6], [0, -3, 0, -4, 3, 8, -4, -2, -6, 6, -1, 1, -2, -13, -1, -1, 0, -5], [6, 5, -11, 1, -11, 5, 0, 1, -6, 11, -11, 1, -4, -19, -19, -4, 1, 0], [-21, 5, 3, 0, 0, -3, 0, 1, 0, -26, 21, -4, 5, 26, 21, 1, -5, 4], [-3, -18, 18, -14, 14, -12, -12, 1, -8, 8, 0, 0, 3, 3, -8, 2, -1, 3], [-2, -6, 5, 4, 5, -6, 0, 8, 2, -6, 6, -5, -4, 8, 8, -4, -5, 0], [-14, 7, -7, -1, -7, 7, 0, -4, 14, -7, 7, 7, -1, 2, 2, -1, 7, 0], [12, 3, -5, 3, -15, 0, 5, 0, 0, 12, -5, 0, 0, 0, 0, 3, 3, 3], [0, 3, 0, -2, -3, -4, -2, 1, 4, -4, -11, -1, 1, -14, -11, 1, 0, 0], [-10, 3, 0, 0, 1, 0, -1, -14, 0, 3, 10, 12, -2, -3, -8, -14, 2, -12], [0, 7, 0, 8, -7, 7, 8, -7, -2, 2, -2, 4, -7, -16, -2, -4, 0, -11], [-7, -3, 3, -3, 10, 0, -3, 0, 10, -7, 8, -1, 1, 10, 0, 3, -12, 3], [0, 2, -4, 8, -4, 2, 0, -3, 0, 6, -6, 5, -1, -16, -16, -1, 5, 0], [-9, 8, -5, 4, 0, 4, 8, 5, 18, -8, 18, -8, 0, 0, 9, 2, -2, 5], [-9, -18, 18, -12, 12, -12, -12, -5, -1, 4, 0, 0, 0, 9, -4, 3, 5, 0], [-9, 2, -2, 2, -2, 0, 0, 0, -4, -14, 0, 0, 0, 9, 14, 8, 0, 0], [-17, 6, -7, -3, -7, 6, 0, 0, 17, -14, 14, 4, 1, 22, 22, 1, 4, 0], [-13, -2, 2, 0, 0, -4, -4, -5, 16, -2, 0, 0, 1, 13, 2, 3, 5, 1], [-9, 7, 1, 2, 0, 2, 7, 2, 8, 7, 8, 4, 0, 0, 9, 5, -5, 2], [7, 4, -1, 4, -2, 0, 1, 0, 7, 7, 21, -4, 4, 7, 0, 3, -4, 3], [11, 0, -1, 3, -1, 0, 0, -10, -11, -14, 14, 2, -7, -2, -2, -7, 2, 0], [-11, 0, -5, 5, 3, -3, 1, -4, 3, 0, 16, 4, 4, 16, 3, 0, 6, -6], [1, 3, 0, 0, 2, 0, -2, 12, 0, -3, -1, -8, 11, 3, -16, 12, -11, 8], [16, 0, -3, 3, 2, -2, 3, 4, -16, 0, 8, -4, 8, 8, -16, 0, 2, -2], [-11, 0, -3, 3, -3, 3, -11, -4, -15, 0, -1, 4, -1, -1, -15, 0, -5, 5], [8, -8, 0, 0, 4, 0, -4, 10, 0, -4, -8, -8, 10, 4, 17, 10, -10, 8], [9, 9, -8, 9, -4, 0, 8, 0, -6, 9, -4, 1, -1, -6, 0, -6, -3, -6], [12, -2, -6, -3, 0, -3, -2, 3, 2, 25, 2, -5, 0, 0, -12, 3, -3, 3], [7, -1, 4, -6, 0, -6, -1, 11, 6, 9, 6, -9, 0, 0, -7, 0, 0, 11], [0, -3, 0, 1, 3, -6, 1, -1, -12, 12, -12, -2, -1, -1, -12, 2, 0, 11], [-8, 5, -5, -1, 1, 2, 2, -5, 9, -3, 0, 0, 2, 8, 3, -3, 5, 2], [-12, -1, 1, 0, 0, 3, 3, 1, 19, -2, 0, 0, 3, 12, 2, 2, -1, 3], [-1, -2, 2, -7, 7, -6, -6, 3, -16, 7, 0, 0, 7, 1, -7, 6, -3, 7], [0, -1, 0, 9, 0, -1, 0, -7, 0, -16, 16, 2, -5, 4, 4, -5, 2, 0], [0, 8, 0, 7, -8, 12, 7, 5, -2, 2, -4, -7, 5, -18, -4, 7, 0, -3], [25, 5, -6, 5, -2, 0, 6, 0, -5, 25, 2, -1, 1, -5, 0, -8, 2, -8], [3, -1, 4, 0, 0, -4, 0, 2, 0, -16, -3, 1, -2, 16, 0, 2, 2, -1], [23, -4, -1, 0, -1, 1, 1, 1, 0, 8, -23, -1, 1, -8, -18, 1, -1, 1], [0, 11, 0, 9, -11, 13, 9, -3, 7, -7, 13, 0, -3, -2, 13, 0, 0, 3], [-19, 3, -6, 0, 0, 0, 3, 8, 11, -24, 11, -9, 0, 0, 19, 0, 0, 8]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_98_e_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_98_2_e_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_98_2_e_a(:prec:=18)
    chi := MakeCharacter_98_e();
    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_98_2_e_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_98_2_e_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_98_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![1, -47, 736, -2217, 10982, -9074, 15670, -7337, 11566, -7200, 7631, -1885, 277, -29, 12, 9, 4, -3, 1]>],Snew);
    return Vf;
end function;