
// Make newform 14.16.c.b in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_14_c();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_14_c_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_14_16_c_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_14_16_c_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 := [51761574501460447109413728819456, -108333121326673799746890760320, 238785864099387585455090736, -89586690298994071428648, 122945882607722292337, -20531463882664153, 48610066963550, -3342530557, 7979102, -1, 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], [-780431516194130061738056993208632402204738678864669774737828440601023112209995136, 1721682462118365757111063859306121819443871146873365224813136749978406587790032, -367455711822278750224537486570000611721682913048763987978699038595206764790, 892480347692418225302721302634031562059208102773902013092925970212012223, -150448871246768740311300741635143298035629339888276676849534010591693, 361195863980986815597013126146089817489091945920629190143508256324, -24661159054765929102534162311733193143389418867824399152339793, 58861540277155589149854783982809193249147374462857845528588, -1078466206200386284873385120399163402920566330963832543, 7430547034351080503266555978774854714489178000791137], [72023860711567804726101198106916035656509149559973637031624585489859656480316480, -172522657488024849389474718329342073959927877479366281829985581154842642310528, 369939817073604170544370658524121615287378433490071279083099990676269287600, -79095534497846762099932328522133659679060903639173169602209373715912745, 148144372284405045347038514119719393722285033982516391732641240751897, -14840131606318427757306702377866553735629807598658296637795666326, 32033464104402784187786239235607068405721179794633695915442621, -1234873839326056062946531036137499327181989091994135604262, 3005458582306678645255023072866635587983979948591605977, 56742151757005819168216829406650599313181398446943], [-13201948255034642127499867255181395818048790667139141724395002868326942518445833632400674619776, 28444674707586554701579903326878671613097955268166343107977510573460531933675852326190077712, -76434999176187215386158092843081622930784953969273683782697595031527608278181174216514684, 11962661805791519586435882946403990055074461086846532889295989273074467191157604151243, -1370284602020815587338936549924501635076755541058465929424623079791373844227858263, 2456513990712684071249988037977786708900552713891265084776966237883134711504422, -148223358626804871897187432627041833246633705446802159912615236396285649363, 357483584741477087565727316188737370026416320795037710294163047189383958, 779896696640395225051465018879575635266798931186241395251734110136997, 20929038719256126033984761057236133976875625099127966840331487767], [-1115045695500310173119515465794800433875737242741960388019988944806213784602572960, 858257568532110984603324675366358741683909528640445552004171574821576747913344, -1840359130375927639978448624680967260333046192493313788758568786053785654800, -1283688277590543845913630543406116273523573385636281809255617996053268893, -736981626644342597855189875188338541604595567226104133277393496929931, 73825985842001428598902933178299390358766714118960759896939000898, -153466885211810379611807045498310319766343631026787888691841191, 6143192054976658472864921404704407264885249193798946467826, -14951413412777627756563336173612905871542640324889805771, 11387459646180866614505904351638441632732571339970347], [349736860085013809273454996886626200283743625473395518540616276793850401901704079511207753386912, 2395054468384152815445734447491499806921438235159839634386160064302080219114171620581620254336, -1356107759467156567395583337724254771835569869421943959668704126004940943381176109332898450, 5762201075994812235600851867383547247385623032832106742375778845949820789915359197314229, 347849423789551018817749241475621658132214522267199486943549982027015956880526383281, 2411178807490962304094246460932228102429368881773037039033046840803814737645727972, 73010492483338665096147434571681465171146887656648278114529317072240018622901, 453535962095622996360571893832441013707544667253213941533826083860328465884, 32657307048048489067214698410014828542668231192063152559741916450795291, 51724060418061378481598680157622533036708822114762556724175789569571], [348011905850174664067071505226737162576554262960836164298042236439294951705063816190997019946376352, -178060728901439185813439144980373812077250750667132887615306563602339520023295233477738202527784, 191561538350995258990349297266298748594779727063703183214828437096620724583104482382684456350, 15613931441922458189649640509864169712046708768635499567357697204542740678163192277000159, 95787813175054344754624086827027639374752826482062575760274915129994607617890168517031, 20422875145885368736721757449694351198856406698561104217277512796923697132076568592, 16565340416622271291938535174457517355517110443299052345945719159911374020329331, 7473234271640159342423441287809507036102589850825310063372203829065791597664, 2796491312768003877196008429154503179842570477220794307377794625275319601, 927435909549137641384595209061552895644895222159984915506893013558701], [-165744205053653731645382801256139370901082512724462728367684297547503639483571913198189378267004608, -239338907537740029940057830534633415316484113005595818921861912627984533339746494749468507360384, -100498955456292758998547621870923385388981345995625157036538376641579664643893039044078543520, -161206758895355362644896831947094573896780359795518651400633690901389404940867309435739621, -67933903965583814057222332027458634946949644306857782645316580340471960296381867218619, -61885894007968636299177699912204211240255220229206421055997030398431560212642939118, -12039790211484456635439284433064579964432499982951224377829380882338464957470759, -10447147875760546592428221047407826232403369223349223681138598600291766148286, -1961116652863334719983912803243500630931334769512307071963682027310923499, -1131380078060994182706800656874907246458250831887460151675554252372589], [-312459021239347128466517874533482562994182221746562945601354457998314808484836571292426820441030016, 367036091122680567307511404640541321066040001526249323415624947040780168380125475916034591097712, -275950216399478989776891939622582145576847642147907950992850696773810756977544219484763898580, 199202538980192422468321847012636570809085113818852603324415055822374315056797226348182533, -75170651333532649476731949633134195145630211819184927615897750273292806251474928748073, 86329516439538692039863222588085987577976720304723727296606591060545463339451387434, -12247274341259244050241632547244655099564913655437876019351756254079253305196653, 14861677972716248033467607659610117609205498395109535568139105330015673299578, -569722548683909636516926200307706091067685830239438756772326601165330453, 1920777952028156818415726551043555544480633573610254061473055491321577], [-608746111588508253699502788062577553422637159801073231554588178915022119247264592734851589306610368, 1498367442547959991808904388951133995641040600032543727902406822136610399820149579515921525706816, -709680857341054730628520435730997862524972822643170946995012799100048020977285249606967330560, 612423313438499998320019618096612403985187612045341322330090256620534460480388122342363339, -183582822734182639091844554344553272402065718780050817822781113113310738991281665759179, 273346609429998136290468749495273592841941880595061388633059520013428659291582616882, -36999626925804429076044865724212072497665982003637980237373867225180779685642679, 40998349868416907146729056975103840382786013287524846838171907497749033214434, -1785606983635690972176959838892272407906697211037441822140636847073672539, 6411146695741316930250178257321371348593579922323951462689795293256131]];
    Rf_basisdens := [1, 793241524310327586899891633659008166798735951864093167694845842530220054956022880, 75213262214433577519011787082497532986656492167165421219283434184025330109696, 26304721785002480241843920367316895463046156425785933066477165242537333002933466040412532992, 28204973330412591569629420155936574869996184562687032957231287819009498791136, 49321353346879650453457350688719178993211543298348624499644684829757499380500248825773499360, 197285413387518601813829402754876715972846173193394497998578739319029997522000995303093997440, 197285413387518601813829402754876715972846173193394497998578739319029997522000995303093997440, 197285413387518601813829402754876715972846173193394497998578739319029997522000995303093997440, 394570826775037203627658805509753431945692346386788995997157478638059995044001990606187994880];
    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_14_c();"
function MakeCharacter_14_c()
    N := 14;
    order := 3;
    char_gens := [3];
    v := [1];
    // chi(gens[i]) = zeta^v[i]
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    F := CyclotomicField(order);
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),[F|F.1^e:e in v]);
    return MinimalBaseRingCharacter(chi);
end function;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_14_c_Hecke();"
function MakeCharacter_14_c_Hecke(Kf)
    N := 14;
    order := 3;
    char_gens := [3];
    char_values := [[-1, -1, 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 := 16;
    raw_aps := [[128, 128, 0, 0, 0, 0, 0, 0, 0, 0], [0, -479, 0, 1, 0, 0, 0, 0, 0, 0], [2194, 2194, -2, -2, 0, -1, 0, 0, 0, 0], [102354, -270343, -38, -146, -9, -3, 0, 1, 0, -1], [-32, 681087, -16, 4124, -176, -192, -15, 17, -64, -21], [36941034, 111, 9623, 23, 896, 23, 65, 178, -86, 132], [-1502, 640340751, -751, -47198, 1829, 1078, -846, 656, -3004, -1033], [-212685622, -212686707, -196642, -197696, -1054, -13040, 1023, -4216, 2015, 1116], [-6336070562, -6336075695, 1073599, 1069046, -4553, -53836, 3973, -18212, 7366, 5713], [29493453040, 4627, -10859985, -17677, -296382, -17677, 39981, -1898, -68810, 33456], [-13710, -6040164650, -6855, -25726862, -939178, -946033, 16269, 29979, -27420, -1432], [273937613074, 273937726183, -34975194, -34886025, 89169, 1302306, -65229, 356676, -106518, -137049], [363485019110, 335817, 54942255, 380837, 4457634, 380837, -425857, 694144, 829204, -67530], [41560149198, -479002, -48274366, 103390, -708250, 103390, -685782, -666808, 1080368, -873588], [-2521394893487, -2521394071729, 266782550, 266918233, 135683, -5496890, 550392, 542732, 1786859, -1507833], [-2290410, -2123337389334, -1145205, 1418090302, 8364164, 7218959, 2011260, 4301670, -4580820, -474785], [4015396, -7998750067181, 2007698, -2477011375, -1684208, 323490, 5336604, 1321208, 8030792, 3786566], [1029751292992, 1029751252567, 1038947454, 1039991077, 1043623, 101475138, -2127671, 4174492, -5339390, 1124473], [7662508, 5853510838379, 3831254, 6141958011, -271943232, -268111978, 4853166, -2809342, 15325016, 5448976], [-3776803189000, -2956578, -6102589508, -23054, -185783222, -23054, -2910470, -4446394, 4354178, -4400286], [-19246324, -48774034218161, -9623162, -13976989808, 460523798, 450900636, -660060, 18586264, -38492648, -9843182], [27471374986204, 27471359320981, -14227617465, -14276415224, -48797759, -48157152, 81930295, -195191036, 196993126, -17467313], [-91460545784342, -22551748, -22438500006, 41189376, -778553328, 41189376, -104930500, -13232934, 177990438, -95611686], [63066577386191, 63066497364977, -37583574124, -37701539538, -117965414, 425101600, 155909614, -471861656, 349763428, 42077014], [5832188922336, 109678117, -97625807485, -113285199, 1266412796, -113285199, 336248515, 107874576, -561015372, 334444974], [84672652, -707487664994792, 42336326, 52508223862, -2537771551, -2495435225, 91496256, 6823604, 169345304, 72835078], [-367830984415962, -367831039868947, -94382917931, -94206311230, 176606701, -4189961320, -408666387, 706426804, -1049392460, 287512671], [478631183956664, 478631066686433, 224293844726, 223930356930, -363487796, 3628191148, 609705361, -1453951184, 1465628287, -128947334], [55172032, 525097528551308, 27586016, 36489390282, -12428176785, -12400590769, -116754672, -171926704, 110344064, -11332208], [307193564367812, -376378967, -208944255021, 155403261, 4166631156, 155403261, -687185489, -486866820, 1108479864, -797673342], [-1944684589467872, 525272066, 21197580580, 560593134, 29029654102, 560593134, -595914202, 1068204666, 1174167870, -52981602], [354943490314979, 354944890456029, -258452091189, -257278045165, 1174046024, -14817500976, -947950998, 4696184096, -1669806970, -1626236076], [625013830, 3828854390505073, 312506915, 1775177590858, 22621873205, 22934380120, 927783798, 302769968, 1250027660, 621768181], [9538332256620362, -1042915624, 719594184606, -947018068, 20828077392, -947018068, 851120512, -2037882470, -1750189802, -143846334], [1861641965340726, 1861637242364966, -3204816500854, -3206719776346, -1903275492, -32873958869, -916424776, -7613101968, -4652549820, 7542676028], [-307939890, 8792551807474200, -153969945, 4536501189218, -62017533518, -62171503463, -3652259559, -3344319669, -615879780, -1371389798], [4787012514, 15840788271420734, 2393506257, -3485962074954, 2333280774, 4726787031, 6996501000, 2209488486, 9574025028, 4725673257], [-3573535793245417, -3573531082921935, 1041668830337, 1041153396499, -515433838, -47400190052, 5741191158, -2061735352, 16708139636, -9936080802], [53288341934840487, 619413222, -35361612841, 7742911972, -29305564978, 7742911972, -14866410722, 4800575819, 26171072069, -10685248125], [-33977514132308594, -33977520272185855, 432534809006, 432588292217, 53483211, 252474896200, -6246843683, 213932844, -18687047838, 12333237733], [35455072612, 45438059828164193, 17727536306, -7045358700172, -35981482832, -18253946526, 3188619501, -32266453111, 70910145224, 18790409473], [45925629420258100, -43902190786, -7209063832922, -25763346786, 268853280934, -25763346786, 7624502786, -78734959572, -24318427572, -27208266000], [31734207668286797, 31734183907268347, 11423177144026, 11392226879297, -30950264729, -682760252518, 38139511008, -123801058916, 83468268295, 16571772171], [-6865831510, 77427324590689701, -3432915755, -25840868096122, -371192864789, -374625780544, 68911779750, 75777611260, -13731663020, 19537677495], [-23313642250560092, 38569007227, 13440415200695, -21074494245, -420258163522, -21074494245, 80717995717, 47316263718, -131614240698, 89465252208], [-93735966038, 29489533160757946, -46867983019, 20069157469564, 661424655986, 614556672967, 46075771695, 139811737733, -187471932076, -31509392454], [-77620696615227318, 44630453288, -22979620992718, 64944000820, 1244674393748, 64944000820, -85257548352, 99417680342, 160358322938, -30470321298], [-31397888045199388, -35529798546, 26964995475612, 73061094114, 1423447031838, 73061094114, -181651986774, -16764150762, 309008527218, -162886338990], [257130336840, -182401390106569221, 128565168420, -40783290131254, 1442763913300, 1571329081720, 74413515255, -182716821585, 514260673680, 153369673505], [-200350310289597480, -200350193731928056, 20640044626798, 20734157272990, 94112646192, 778310412473, -71667622960, 376450584768, -120890222688, -139002692656], [292085236801802059, 292085111968280400, -56696820062490, -56748832295579, -52012233089, 158588244489, -20809055481, -208048932356, -114439399532, 197654810229], [167561258717966365, 111978238834, 12711667902817, 102321177076, -442999121426, 102321177076, -92664115318, 219127946789, 190156761515, 14485592637], [-341069107736, 346768074652503679, -170534553868, -83542390036544, 103400850548, -67133703320, -32894306088, 308174801648, -682138215472, -181499322564], [51533443145291325, -421258672062, 48754036055403, -168738048912, -2956910364432, -168738048912, -83782574238, -716257032549, 41304836901, -378780934725], [-379288293460341317, -379288584870694670, 108871388138542, 108742773404163, -128614734379, 3958773166151, -34180884595, -514458937516, -231157388164, 454205972327], [81221484494, -648162903602216792, 40610742247, 110712591946993, 1656320753240, 1696931495487, -567640582062, -648862066556, 162442968988, -148602785107], [366540344498, 535611974295078642, 183270172249, -29020813807022, 10514584250066, 10697854422315, 447332328564, 80791984066, 733080688996, 332380948437], [-39278150996331560, -39277841452619327, -134754014073471, -134435662398872, 318351674599, -11039474983788, -327159636965, 1273406698396, -663127236296, -300735749867], [-856963921610, -1567187573691435362, -428481960805, 113636855386654, 6106143168704, 5677661207899, 502695517548, 1359659439158, -1713927843220, -260916788289], [388580810628530888, -1749720143, 57171569115575, 265040544973, -7227747828988, 265040544973, -531830810089, 129895692272, 930266487620, -400185397674], [1180385343888, 511026674983493163, 590192671944, -44991706457092, -1213001484068, -622808812124, 1707667278537, 527281934649, 2360770687776, 1159415098123], [-1187343165707533710, 55195525436, -293446635906124, 591847682604, -10432817143492, 591847682604, -1128499839772, 378717129456, 1988673600960, -804978235752], [-380932555979150842, 2798789259950, 256437556698366, 1118506196798, 333949799634, 1118506196798, 561776866354, 4757436988324, -283412201132, 2520424594728], [-1050936247182, 581662079590769906, -525468123591, -207718877893601, 5768113926428, 5242645802837, -1512883511868, -461947264686, -2101872494364, -1029762627547], [-661322345679851099, -661323086776128629, -76271083845240, -77380831730350, -1109747885110, 7948349472150, 1478399492690, -4438991540440, 3325450592960, 372444669950], [630380255547802766, 630379709914762033, -701514817559666, -701839001973439, -324184413773, -8814986504776, 102735786813, -1296737655092, -15977053334, 767081667693], [858496632270699221, 858495051684196017, -956976829535053, -957472015619351, -495186084298, 13397208236812, -590214334608, -1980744337192, -2265829088122, 2665986922110], [6114026967632315674, -1238056726063, 415494108198847, -116990821923, 22614122067574, -116990821923, -1004075082217, -1915580500056, 1447617212364, -1681598856210], [290422902828, -5718743434980721509, 145211451414, -386011555465827, 36496861631364, 36642073082778, -1990048936464, -2280471839292, 580845805656, -518138194074], [-7290488636029144968, -1819184259341, 2058133190494667, 857837591067, -3138038442034, 857837591067, -3534859441475, -2299857593478, 5731207957746, -4015532775612], [1386113790082, -306262104079554223, 693056895041, 857604636915270, 13283345354955, 13976402249996, -3842877554586, -5228991344668, 2772227580164, -587902289821], [3822051586273135547, 3822049601631883487, 750558851851748, 747193208030779, -3365643820969, -69449463401594, 4746646389878, -13462575283876, 10874295348665, 603638683151], [-5522336545278, 11040902209815333986, -2761168272639, 558137612235405, -43873951165536, -46635119438175, -7474158432342, -1951821887064, -11044673090556, -5252554416753], [4245579974957948772, 4245580303803713993, 1753759879789378, 1755840717604159, 2080837814781, -32270047891792, -3832829864341, 8323351259124, -9417651778242, 1423146284339], [-4411938295821405145, -7608288214354, -2511889501243467, -7231883099104, 66569969041788, -7231883099104, 6855477983854, -15028373871083, -13899158525333, -564607672875], [-15855698984033999327, -15855701306221967441, -446670159716576, -448090953486223, -1420793769647, -68738928242362, 519399571180, -5683175078588, 137404943893, 3223582166581], [-15392494735596, 16187275074551237012, -7696247367798, -2360890447592154, 37320238807593, 29623991439795, -5528184051984, 9864310683612, -30784989471192, -9538975385126], [-17531198484650492338, -17531200870416110448, 3241469168272370, 3241856613290900, 387445018530, 58860727191073, -3160655655170, 1549780074120, -9094521946980, 5158976254750], [14830440198004611691, 14830442466181331446, -870238245991286, -870187442744289, 50803246997, 125694871570499, 2166570225761, 203212987988, 6550513924280, -4485550192513], [16546797064446, 14611709900997072845, 8273398532223, 3992449719840126, -142187206681059, -133913808148836, 3578170924458, -12968626139988, 33093594128892, 9466122173709], [27190940029998050978, -1040374627182, -7556763754796166, 5859994800146, 40867152002070, 5859994800146, -12760364227474, 1369435459300, 22070543741284, -10350554140992], [-8182479662011918406, -3218439129397, 2900083097754199, -856440225333, -123823733015660, -856440225333, -1505558678731, -5255878806762, 1830117905430, -3542998356096], [40892417641294, 2700969883725671372, 20446208820647, -2258224378099540, 171025320016930, 191471528837577, 16796879155923, -24095538485371, 81784835282588, 26045168539288], [62297874092187175956, -10793039952451, 4527794762708783, -9386458977887, -24170927297044, -9386458977887, 7979878003323, -20882789417620, -16663046493928, -2109871461846], [-46302937096934451609, -46302931788332313721, -720017043183512, -710800640666433, 9216402517079, 230776112845694, -13124202896270, 36865610068316, -30156206171731, -1400801758697], [14266354403091602444, 14266359564340009309, 8543472603007804, 8543870641930162, 398038922358, 41308377703280, 4365170562149, 1592155689432, 13493550608805, -9924457891372], [-2525558330148245446, -30758337851815, -1605007147097789, -6359676800403, -323615477955542, -6359676800403, -18038984251009, -49317345177924, 23878637976312, -36597991577118], [-2540387444170037667, -2540411548490878057, -12943825217125268, -12964653098435666, -20827881310398, -124242420730678, 17551441780406, -83311525241592, 31826444030820, 27380760370382], [18175713944221264848, -38190604825249, 16034541847548595, -15038404514129, -186337256760086, -15038404514129, -8113795796991, -64805109494938, 4651491438422, -34728300466680], [47182199126597347932, 58875986651332, -5891195443404868, 24310885856244, -217803600391420, 24310885856244, 10254214938844, 100469422905120, -3225879480144, 51847651192632], [7022400030456389403, 7022403136115025133, 2285650573227421, 2292984945880211, 7334372652790, 483594757784480, -11563086669850, 29337490611160, -27354887356760, 1123055381330], [70730073065942, -91875341286375442816, 35365036532971, 6337585232050971, -233658276968184, -198293240435213, 14367312430332, -56362760635610, 141460146131884, 40154140676415], [-21432314205698, 18836729766831877048, -10716157102849, -23562778778376515, 228116308665176, 217400151562327, 35699337682806, 57131651888504, -42864628411396, 1183622124753], [-4582577887674005513, -45369146067866, -6781455349207379, 2812862361880, 610311133718044, 2812862361880, -50994870791626, -66647287920859, 77898737368379, -72273012644619], [-26592629345705328721, -26592612361247943135, 19182139542849137, 19169889517410243, -12250025438894, -221384155385780, 41484508263374, -49000101755576, 112203499351228, -46218940210066], [-85658118734232420824, 66560984200706, -34838635025121928, 53317736847238, -259612925208190, 53317736847238, -40074489493770, 126500344724678, 86770602664274, 19864871030202], [149839163503631769640, 149839146275917461766, 12617438552379850, 12593817570694440, -23620981685410, 256096904475707, 30014249062946, -94483926741640, 66421765503428, 10834446930338], [-32718814477276, -52457589230647935971, -16359407238638, 29316031318783656, 325007212444404, 308647805205766, -159297686710308, -126578872233032, -65437628954552, -69458636142074], [44442573196698186864, 44442671710708804733, -11226694109170682, -11168457672593242, 58236436577440, 226111269697904, -17958862537011, 232945746309760, 4359848966407, -138791584658298], [-49359201685686624508, -49359146739930255294, 8898987985751174, 8957495693948888, 58507708197714, -1395009359644385, -62069660026214, 234030832790856, -127701271880928, -51383804540714], [30591457758856530309, 49638205958658, -77080115083836937, 28470986423384, -790772504601772, 28470986423384, -7303766888110, 88692802149679, 25191143543857, 31750829302911], [-126758176749712, -247478330000499518448, -63379088374856, -42833884078047698, -935181029542453, -998560117917309, -197906445219540, -71148268469828, -253516353499424, -129347903448036], [-89204874175060, -98360556896736076333, -44602437087530, -4358453875188989, -1575145373660632, -1619747810748162, -20553536687922, 68651337487138, -178409748350120, -51453615983504], [-205663517088475783591, -205663680941538295421, -8298997329933032, -8420481305349658, -121483975416626, 551373528657182, 79114888321422, -485935901666504, 115860689547640, 206222149607034], [102123459622008, -190072050740791083965, 51061729811004, -44072296721140280, 892283214864944, 943344944675948, 25451509368669, -76671950253339, 204246919244016, 59545566267227], [141650547498976, 118641269569343886947, 70825273749488, -17033068740234012, 1641428840276244, 1712254114025732, 21478854624252, -120171692874724, 283301094997952, 77984891957572], [-107210880738889459878, 78196909784286, 86820642425555194, 77801096106134, -2597357320708910, 77801096106134, -77405282427982, 156195912729496, 155008471695040, 593720517228], [196876395139669983629, 196876396511682813656, 144317229501900878, 144295220232856767, -22009269044111, -1506881270590031, 45390550918249, -88037076176444, 114162383710636, -24753294704165], [220263636249202, -270873983814081954718, 110131818124601, -60234902726844713, -2757805906860580, -2647674088735979, -84441952232772, -304705588481974, 440527272498404, 81984500713677], [-79809085592072685032, -153704207827931, 31769775273027187, 121000313079761, -3279734408993156, 121000313079761, -395704833987453, -170056155202016, 654057407521060, -412056781361538], [-126252436372216275943, -126252544162443044181, 108969493861854872, 108733224164892053, -236269696962819, -939949013639894, 364749167157400, -945078787851276, 857977804509381, -20689243426343], [-356821884568012, 339211215879431904602, -178410942284006, -18945712252040442, 604113333821283, 425702391537277, 382650824631936, 739472709199948, -713643769136024, -50860667406694], [-229494782943164728070, 27968890630797, -79758581106433577, 217211492404353, 1622011809043042, 217211492404353, -406454094177909, 150559082148372, 718286887469040, -283863902660334], [-50897923108520, -474875710531683399127, -25448961554260, 53789961942819495, -1967388832287168, -1992837793841428, 71703813586758, 122601736695278, -101795846217040, -1547690358674], [-257075156901930442080, 299109581568038, 39125237086646468, 183600905539834, -816520984336126, 183600905539834, -68092229511630, 540464825121974, 193938797037362, 173263014042306], [398694792120504, 109867020753685519159, 199347396060252, 131004754357908568, 1920065129577236, 2119412525637488, -188386251224328, -587081043344832, 797389584241008, 136551978985476], [159642437562154381118, 217850549313150, 80188300413799314, -162598092494778, 1236121822596822, -162598092494778, 543046734302706, 245476777722336, -895869147701448, 570672962711892], [-249868100240158, 243677055086752915870, -124934050120079, -30707582100940365, -2217047830112112, -2341981880232191, -299512171885176, -49644071645018, -499736200480316, -224771440748471], [-112095147634615675294, -112094862410176364859, -15486141576513906, -15171722766811847, 314418809702059, -1410550105717788, -343613180093683, 1257675238808236, -716420730578990, -256030068918811], [-266531314182947563446, -162003124150116, -86081713873961306, -207637549084600, -693980839972220, -207637549084600, 253271974019084, -346823460767474, -483726735570926, 68451637401726], [-257046211049698, -397997381557186570472, -128523105524849, -41889187252978826, -489010420098118, -617533525622967, -452174060606940, -195127849557242, -514092422099396, -279247792393829], [182371416188100606342, 137653645245557, -38863767068539093, -40293658627823, 1500844626147770, -40293658627823, 218240962501203, 186333638554424, -347508273065716, 266920955810070], [-3592722776838191000, -3592432452256555240, 7075621329361418, 7379041906203550, 303420576842132, -2336230782223319, -316516572048504, 1213682307368528, -646129139303380, -277228586429388], [-177683188407780, 35318245829042409981, -88841594203890, -161929762266662126, 3118171533857564, 3029329939653674, 988534982631891, 1166218171039671, -355366376815560, 240670066673407], [-54563664123138434749, -54563826866072849271, -120013846764011893, -120072537995968553, -58691231956660, 10704733711808932, -45360470501202, -234764927826640, -194772643460266, 266794636872384], [133144164724483103930, 573207393776648, 211006037765249608, 463696273443144, 1981559871995812, 463696273443144, -354185153109640, 1091659227386544, 763125866386032, 164266680500256], [1798446448229436102506, 1798446243307012560975, -15989025232450402, -16261242338866697, -272217106416295, 3317088504311098, 339511789291059, -1088868425665180, 746318261456882, 137627740666767], [-760199008000076854904, -760198996477598872791, 192958290909075345, 192644561421778976, -313729487296369, 265303641026412, 638981452574851, -1254917949185476, 1603214870428184, -336774443260595], [1295633115437326636088, -1302610886567086, 428217465184245588, -388854295976962, -12190250508743322, -388854295976962, -524902294613162, -2148343477839110, 592926293931262, -1370634885885186], [-1195566061919236028122, -1195566666389155848231, 16348472932876922, 16169832795755489, -178640137121433, -2618166628575728, -247189645577243, -714560548485732, -920209073853162, 1030299702518785], [6352216147608, 1565570325770817158347, 3176108073804, 86850450057264862, 12808761032871668, 12811937140945472, -220893723231933, -227245939379541, 12704432295216, -70455133003507], [87441234281195105556, 1189665495055334, -19318179995058964, -94255819062294, -951681545825506, -94255819062294, 1378177133179922, 1737370333051854, -2114393609301030, 1925881971176442], [2089225350179201143817, 2089225057425620131695, -298533228687294670, -298499677532017567, 33551155277103, 15056058567160102, -359855891566328, 134204621108412, -1046016519421881, 619058317301347], [-227763678621152658792, -472495640714913, -570794620887524305, -901389903922057, -965474549797858, -901389903922057, 1330284167129201, -1159438413033398, -2446121202654830, 643341394810716], [1893916741345082163837, 1893916039937592833618, -357355696700396242, -357885725080354643, -530028379958401, -1420798546662281, 358649270586583, -2120113519833604, 545919431801348, 872786598702037], [1648688087771777170854, 1007000971327945, 312280041419578607, 731577483026469, -18471915305875078, 731577483026469, -456153994724993, 1876290198505152, 1050019733600724, 413135232452214], [-2458650003650060, 133812095057523323032, -1229325001825030, -587685552991529226, -8962001807638059, -10191326809463089, 2126923973706720, 4585573977356780, -4917300007300120, -520350343922790], [3533470351704752, 1359250243866745633253, 1766735175852376, -220539255446238279, -15783549876473820, -14016814700621444, 817228398231552, -2716241953473200, 7066940703409504, 2039144641929560], [-3511827427707012779372, -781184421118469, -629510621688274289, -1233807223901909, 22090849552875502, -1233807223901909, 1686430026685349, -1788680243628658, -3146548651978978, 678934204175160], [47053520571588, -5109751950517798705945, 23526760285794, -980610711704873380, 17535675068335570, 17559201828621364, -29898108824904, -76951629396492, 94107041143176, 13560724010826], [588501613270128323102, -1737660793531846, -695421280173046302, 491007836423162, 1904893230761178, 491007836423162, -2719676466378170, -2360987272086188, 4325018617778836, -3343002944932512], [-4084217377834668945296, -4084217366274810245920, 859164491321262626, 859045233012924918, -119258308337708, -14096890925554751, 250076475374792, -477033233350832, 630971117786668, -142378025736460], [-3861381379200798, 573849237378574720554, -1930690689600399, -53724092231495641, 2242736583977644, 312045894377245, -2074614808997796, 1786766570203002, -7722762758401596, -2622228959266331], [1186978843455763916818, -4119642879961522, -754030892649216706, -2046946826170082, 19271561049039206, -2046946826170082, -25749227621358, -7202937733027324, -984849571653004, -3109044080687160], [-2247919548769344, 2313469762680105946752, -1123959774384672, 555595529567305370, 13122551568771835, 11998591794387163, 3247213321762680, 5495132870532024, -4495839097538688, -41555333797112], [-5885429563582023711108, 4203429128472348, 26818557923281252, 1887828513205100, 13728853984118764, 1887828513205100, 427772102062148, 7249057949311072, 302256103509328, 3473400922900872], [-1018863302364162494134, -141796853721993, -1681093289850630297, -1783505634969777, -14553192096138624, -1783505634969777, 3425214416217561, -1104448098067878, -6029574441811230, 2462563171871676], [-536464506733276, -2561823707867957528921, -268232253366638, 67919331005497540, 8240454177380498, 7972221924013860, -3479361186921000, -2942896680187724, -1072929013466552, -1428019315673638], [-4263894173449080321256, -4263896531902213363143, -778427960805048568, -781562704603129262, -3134743798080694, 4790175200953780, 3911034463119501, -12538975192322776, 8598359591277809, 1582162468003080], [-4197998757698467833620, -4198000874445901049043, 265031617416583743, 262668898237885896, -2362719178697847, 17343271147384296, 2608690924180271, -9450876714791388, 5463353593842966, 1870775687732999], [1896956093973969044256, 1896956678905027473590, 1545519206488431118, 1547726113132581256, 2206906644150138, -11185335294216469, -3828882229870942, 8827626576600552, -9279740045462688, 1037044527291470], [-10113733009690890687760, 680968740098686, -689578398390134126, 1752221599542854, -17644026913055102, 1752221599542854, -2823474458987022, 1897563909919456, 5111322488251960, -1606879289166252], [-1596522432951503742690, -96994119076384, 508018970371027526, -584728716906956, 60323209344699308, -584728716906956, 1072463314737528, -437855537068054, -1901059330559770, 731601896745858], [4933500372465990929495, 4933498614483160364751, -753592285645134726, -754768052057080601, -1175766411945875, -1560697907228490, 593549993327006, -4703065647783500, 604883568035143, 2340199249183613], [-3686273153932924, 5633486417633985508991, -1843136576966462, 1709032890666461721, 43801732265413572, 41958595688447110, 1413084551173644, 5099357705106568, -7372546307865848, -1372108393241914], [2167433393639524660604, 2274848187083060, 2182466485848974096, 1144036029793628, 46943109387705344, 1144036029793628, -13223872504196, 3984290295521404, 591853823653108, 1696218235934148], [3351996977892984313007, 3352000696876916054919, -3055470438544292344, -3052212180383672025, 3258258160620319, 22984121723800510, -2797532389498726, 13033032642481276, -5134339007875859, -4179709702863505], [7193962415844124653163, 7193962404439480554791, -914519100532282948, -917688120330536804, -3169019798253856, 41857432613802442, 6326634952409340, -12676079193015424, 15810885058974164, -3146210510057112], [2330522855744805848714, 7311424412252292, 616691230351784436, 5824274696664516, 129954651456138096, 5824274696664516, -4337124981076740, 13879273966710696, 9417824819947368, 2230724573381664], [-1077443989316398, -978527003349198405636, -538721994658199, -1515877667879211066, 19115933057344944, 18577211062686745, 6317138752552272, 7394582741868670, -2154887978632796, 1566990922859225], [2648749253826351011563, 2648747489451188987873, -1820385553337499637, -1821841539100365241, -1455985762865604, -2738462400661748, 1147596363707518, -5823943051462416, 1986803328256950, 2072764561181776], [5590560763582097405840, -151950861243891, 778064390756200615, 4255294496621089, -32791777476391448, 4255294496621089, -8662539854486069, 1899720956444708, 15121457030039648, -6610868036797470], [-6502545612662267217932, -9664596163035578, -862222120456150040, -9545485695906094, 85111201838130178, -9545485695906094, 9426375228776610, -19269637092506414, -18912305691117962, -178665700694226], [-8422181034795418360555, -8422181322454463582383, -3126908793396733981, -3125682764140850679, 1226029255883302, 8558339455584364, -2739717556988432, 4904117023533208, -6993123415081994, 1801347346326958], [-2976295703080750, -8452465037144568304271, -1488147851540375, 1400112163692736118, -138632119154909837, -140120267006450212, -7150477317449538, -4174181614368788, -5952591406161500, -3871640290690221], [13392895949944446, -868570369362235707924, 6696447974972223, -1898579554695306766, -134214227970255626, -127517779995283403, 4937090351077833, -8455805598866613, 26785791899888892, 8342144758664834], [-6979448316527434, 13159762544327570769480, -3489724158263717, -1793592773380388689, -67423662895583432, -70913387053847149, 10351617548773416, 17331065865300850, -13958896633054868, -39184975339245], [-11139808257409194, 18196889270246661520040, -5569904128704597, -2860579948758765222, 16102094925095598, 10532190796391001, 2346287646514824, 13486095903924018, -22279616514818388, -4787808246532989]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_14_c_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_14_16_c_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_14_16_c_b(:prec:=10)
    chi := MakeCharacter_14_c();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 16));
    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_14_16_c_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_14_16_c_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_14_c();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,16,sign)));
    Vf := Kernel([<3,R![147653296818966407834774543137437225, -187354242744012425929018545402435, 286253150018143040631502506171, 18720097318413211981073490, 42211577934948536861157, -5089648660179754905, 2923699083469533, -119018122470, 61492987, -2395, 1]>],Snew);
    return Vf;
end function;