
// Make newform 315.10.a.e in Magma, downloaded from the LMFDB on 28 July 2026.
// To make the character of type GrpDrchElt, type "MakeCharacter_315_a();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_315_10_a_e();".
// 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_315_10_a_e();".
// 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 := [42996, -1039, -1253, -1, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0], [0, 1, 0, 0], [-626, -2, 1, 0], [-1424, -1185, 0, 1]];
    Rf_basisdens := [1, 1, 1, 4];
    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_315_a();"
function MakeCharacter_315_a()
    N := 315;
    order := 1;
    char_gens := [281, 127, 136];
    v := [1, 1, 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;

function MakeCharacter_315_a_Hecke( : Kf := Kf)
    return MakeCharacter_315_a();
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 := 10;
    raw_aps := [[3, 1, 0, 0], [0, 0, 0, 0], [625, 0, 0, 0], [2401, 0, 0, 0], [21877, -502, 17, -39], [9111, 3054, -67, -63], [72804, 64, 298, -178], [13683, -4374, -153, -277], [253488, 34456, 280, 32], [2011796, -24556, -746, 2886], [-295363, 27438, 7481, 1597], [-5915614, 247592, 312, 1776], [2076508, -301788, 4738, 8122], [6822242, 191124, 30194, -9758], [19497562, 276368, 6634, -3842], [-8663849, -1516442, -16379, -19703], [33079842, 510592, 26466, -68442], [-29728816, -16736, -111470, -28594], [-41681438, -3587120, 201318, -93062], [184822817, 3586438, 208417, -82899], [-90600251, 1981530, 402943, -1029], [-153126172, -1155880, 387436, 127124], [303410744, 9472980, -568664, -3732], [-208907330, 824196, -325280, 185404], [-176334001, 2058414, -618623, 401549], [451846800, 13281040, -899498, 634634], [-295945976, -9724584, 921728, -244312], [41489734, 36542072, -345202, -348174], [-341063648, 2358728, -2630042, -9246], [1405485991, -33382390, 40829, 30333], [9268432, 99483604, -3772700, 1322544], [-8694540, 13752556, 535036, -1927192], [-81066727, 109425614, -901153, 1365119], [-764800225, -166357102, -1566493, 3122311], [201753730, 135825072, 665460, 2963492], [1714254818, -262395252, -1105494, -3264198], [2156232781, 47994282, 10600555, -1454769], [2416679186, 44280444, -3373118, 4423610], [-543683394, 153002428, 5852722, 7333298], [5342951240, 198845252, -664758, -3251414], [-3981846827, 66282146, 21204089, -4203543], [4032214554, -610152508, 5600836, 10687168], [-6413635413, 103328354, -16622725, 9727567], [6225105874, 342924368, -31918232, 4802568], [7426752489, -576384350, 17087471, -7101989], [10798967549, 229740030, 12409065, -13255011], [1396219464, -620880328, 13871500, 14822980], [-3277883522, -146249460, -31693098, -26019482], [-16138793240, -1318792276, -22309832, 3733108], [-22021881296, 1322984504, 14121530, 20323550], [19059798631, -1380319830, -6019739, 3909637], [16337467905, -1850690866, -40250343, 21736989], [-26379021584, -850158564, -43930434, -6031346], [60960374922, 1347698440, -49727686, -1398410], [43037861966, -931277636, 90558724, 1017552], [20563932670, -1924506044, -119245682, -2399738], [68705480476, -180786576, 116851842, 20495246], [51417761751, -2604384462, -28666141, 42747783], [-24056450038, -1267932472, -32386808, -59322352], [44027938548, -3593485516, -42970298, -46690690], [-3848496536, -927552288, -25094740, 85134356], [13982497020, 2610639708, -248192146, 21739630], [130752348994, -5326478252, -112221346, 38440118], [-30520699820, -2347026664, 161402180, -55250652], [-28885161721, 6412500102, 77620809, -39261651], [51386444971, -744140266, 25296073, -31339499], [-105031819200, -3297912584, -246008132, -23244092], [-25758072838, 6529951224, -303953800, 121183552], [53690913056, 1016715932, 62527312, -48403020], [82294819344, -2330385592, 7744034, 109543302], [-80172367868, 7898053664, -196673374, 195384678], [-56007493493, -14174637718, 225992675, -84982113], [8298883354, -2217997588, 371304050, 142470698], [-240393868604, 9868990524, -273636934, -207205822], [115682029718, 6977703740, 64508026, -91415446], [-32043970066, 958096196, 151930330, -189488862], [500608299874, 3806543576, -92413012, 410628], [242377812295, -16774347474, 89699309, -114296143], [169383348826, -10441976256, -1220176460, 30653164], [-204423963454, -2417984, 1351496120, -51529736], [110204529388, 2048908180, -191947740, 57572216], [105979189406, -1668276176, -320701640, 23759240], [540746704761, -8665952514, 85046761, 435371501], [-625629601397, -475784794, -1126750387, 23226761], [-491533239151, -5757102642, -619455475, -570330263], [289772618488, 4448741220, -801747488, -415080260], [114783177022, 16461128808, 306600016, -151689944], [-608096750256, -16013255228, -1016327666, 892024246], [-475194142850, -23061681248, -623184656, 167012512], [-98831064704, -5187539996, -934617988, -235202440], [-491617408296, 17064861508, 675670104, -390399636], [811151868672, -41839181968, -329389080, -473440056], [71384238728, 3020586460, 1400355836, -1007423312], [-1002036228523, -20310344942, 1506919537, 267188001], [-869915710114, -36231978964, 1257780394, -399913174], [209411713398, 21705287540, -24283726, -573208838], [-965824458976, -48769507104, -105379698, 122518834], [253213810692, -1626315540, 3283934242, -49027438], [1073831550218, -34048809572, 1347511502, 941885326], [702761579806, -71808044192, 503991320, 437509880], [1897919422830, -6771067728, 1910053610, -693074394], [-241877486809, -80231136042, 2841494941, 140477937], [-323777281480, 32180480008, -1383765724, 1107385316], [487884495714, -93254177960, 688103276, 737532364], [129461475882, -79924850668, -526093530, 1834450598], [-968589877081, 10282117302, -1616739679, 1842051781], [-1806622157716, -62232300984, 3936934280, -1101639280], [-610062846412, 30805136120, 6935118402, 140723998], [214615569143, -70940182870, -4333513489, -1058103565], [2977784369884, 3569407468, 1317746138, -1096167598], [-250109290226, -121917852588, -4823440546, 1999842614], [-190230028094, -2723253600, 2451715968, -2669768768], [335922026675, -3922523494, -7178316615, -1177428191], [535706511711, 140503808666, -1891863069, -1207257553], [349113598660, -130696771024, -4817378156, -1023139356], [-359753326120, -129249259140, -2470418854, 1544139074], [2438913921710, 191993110068, -1389162406, -621548294], [1247179247402, -103866499796, -859726754, 3499644102], [176011337201, 81720458818, -507125217, -3819233909], [-5028136632197, 15204312878, -6113115433, 2925024039], [1771884817488, -62286442024, -5060353582, 864307110], [1201257575824, 100939212228, -1477819618, 1995505286], [78934325184, -105622950500, 6191509554, -1069881414], [1736930450396, 38425133500, 5700067948, 3200002344], [3320087815581, 143900388430, 2996506321, -582373211], [907605013212, 183531857876, 9122169518, -2865137330], [6354819575250, 145673935584, 99276012, 1497551300], [-22382703686, -267827577812, 5588010218, -5445719982], [-1586591049858, 70712182468, -5584030570, -1360142466], [8220970819795, 159392839230, -5113907215, -1334626915], [64949199078, 71660230796, -553882750, 6392302242], [-1423496040034, 215220731772, 5815238366, -6035928802], [1151431367120, -14758951688, 16971786536, -2137848104], [663764606280, -192656939948, 16554067998, -2326297594], [401668698318, -149957920676, -20557214416, -261851084], [11265743908116, -18037303092, -1819761806, 1241585626], [-3317003446964, -165313967020, -11687476570, -636262482], [733659931386, -3322545652, 17322938878, 1537625998], [2449642612684, 282617317172, 13187142230, -5345847090], [-4291304004344, -105148174532, 13705473450, 2962170722], [5397910769123, -340889698366, -2109213265, -1697425493], [3976881729416, -355161923732, -101403374, -3776443278], [-3246804612, -520983295324, -7424695912, 8290594140], [-1712973843718, 443322110032, -8280354374, 6412740990], [13479989334398, 157234330636, -703549752, -3769749084], [-4843748156018, 179940326892, 22441851574, -2285458778], [3550516973155, -332777076410, 12803136881, 4949240357], [-1042358047154, 649158316260, -5977976588, -1000592360], [-2457487342943, -166151784722, -21374166011, -7755221343], [-13188781211268, -113976297760, -16305444812, 481337804], [2706501773182, 342785486016, 1435489364, 12036229196], [-4451295312702, 572607814468, -15148002436, 4975199152], [2786457451642, -97041443328, 384531166, -482705022], [8408937532554, -11906404672, -6921427414, 511467982], [-8977627032278, -173068311136, -12086024410, -948773734], [23109970772103, 109337329242, 3398876103, 13269153627], [-4022101692396, -241490360000, 23606606932, 2227894804], [-5825667898834, -635657204084, 13577914760, -963812020], [15115064668769, -135301248150, 21674836403, -22641760697], [7930504198398, 186935461344, 9262578576, -16493396304], [-13647373886616, -809862262276, 37556392680, 2480103852], [-6425854982989, 710295004994, -14269151711, 435739137], [-26194395784696, -23104207864, 37859073960, 1436591520], [34552189497182, 392426539352, -30717389146, 2901455882], [-6106805276129, 140110805554, 27498868061, 10085291973], [3954567698022, 608393119120, 17063569750, 6110350514], [-724072228132, -910381978400, -4284811500, -18519233580], [-26961524235049, 813911206734, -9798146571, 836906409], [-23871044123416, 373935153448, 45110437794, -2165512266], [14398451765824, 639009387244, 17132372258, 1652336730], [2088451177073, 292215187090, 1290226221, 3224874661], [9665437062486, 361219244292, 9269763952, 24428165908], [39158287144821, 407394732294, 24367454053, -5777528071], [30364919189906, -582689955240, 22107694472, -3862818512], [-18451028341593, 1399516195810, 20994169459, -11268483305], [-13154044266804, 780046679692, -7794885230, 12902193554], [-31103268953432, 818189134440, 54834326204, 3360578564], [-1115820337926, 743429462448, -37916228580, 37903974924], [-24206492058502, -794503053068, 29272003514, 4532417674], [-12986039124458, 1948513420372, 6665285160, -12008473268], [10799672272296, 1906234045488, 392833648, -26456732096], [27995163217038, -577669491360, -21036331826, -27291880390], [6871960978244, -854644637684, 47869147722, -16664202894], [-25549585875896, 816287810456, -38734104954, -24613209574], [-5309544077486, -1388700472700, 42523921058, -20491342686], [-13648470739096, -1622775534720, 43523526606, 4953959314], [40909144159102, -1401270185272, -12818300796, 5350150420], [-12099582230486, 1792635824332, -10424642474, 12253116726], [35097804986932, 631980465280, -15351168122, 26675522442], [21951431883530, -1918110269556, -30645172854, 13813395346], [27673177984047, 1436228222302, 19476311793, 44187474317], [-13676321483846, 1732806737840, 48457655554, 33749084230], [2036965368874, -1113251201260, -82059820266, -7747507754], [26182000972418, 291676546920, 19809688036, 25923635316], [-39331508557540, -569196178708, 110936059620, -1873108736], [-46462484108856, -1313898939840, -16148270658, -29552701014], [34460774623456, 369309756536, -62868223046, 38538218766], [20585185617412, -3353701139156, 8348179770, -7122564734], [-79518885035882, -278799909420, -635347884, 11597863736], [11706827630866, -698786781676, -74210988674, -5513713106], [5731245729580, -2080691309484, 17254991446, -1160566298], [10916490291585, -304882939578, -152903089611, 20994582041], [18648310761417, -286597103934, 33419255871, -2415009709], [60587218871052, 1986887014508, 47827557994, -21130965230], [-26909504497194, 776376110312, -126098057346, 23370501714], [-41125184213288, 168821807316, 60324040770, -18020827822], [-35982657356697, -756377517742, 99929590371, -61069463929], [14042323183042, 1134457132664, -113931397406, 4524334606], [-38868719462896, 633856425580, -2867544166, -33184864750], [48054371418873, 390189757918, 114156955597, -67675422983], [15229466706036, 721783705812, -63778395270, 7366918010], [115721080931024, 178787314152, 71779597326, 59994165130], [-54621780421692, 1797292852584, 63849863916, 50390475452], [11943248165644, -1349813043660, 73535297948, 61038214920], [-6873708561866, -2115752210308, -13196019058, 74840748894], [27160115914188, 700543611548, -71460031486, -8281439238], [-95684107916056, -622861549860, -44226353964, 62149504680], [33033720374246, -4424095724604, 51983628464, -66733692148], [51050306752074, -3379098132004, 79786642922, 77621705554], [-35898782757899, -3969027353446, 91736324035, -4714273025], [7353874441714, 1464827482912, -43987781940, 43058094820], [102163402553933, -3848073461882, -47111711839, -60071708963], [92395399473664, 3530833659476, -123687912430, -32841460206], [26637993041196, -488271516112, -225123353204, -19362774476], [-107075650846572, -3471895842880, -123428967584, 94832018528], [-86914690786524, -3481612269976, 50729404706, -122158054218], [-122194584975862, -377864668892, 19063156808, -5365144204], [97710366421503, 5583243858762, -108095800865, -6228404797], [22845833529624, -2107204102224, 122704420384, 21303761968], [2176018266545, -313685353278, -128957739163, 39176401757], [82200327182016, -3552441593764, 31107390494, 48975437070], [-79536801360641, 4037873863154, -59624296029, 141761070007], [-51170028231386, 4090829287172, 177218575646, -87610480450], [-3162973851784, -2223749481316, -307509122366, 7524053370], [170557391091330, -1762479051324, 46977422582, 38922688734], [-32304127261290, 4797675348240, 158429263142, -127083336398], [151815318742222, -768260635200, -4132320444, 36202209004], [-47782030661023, -3662111478502, 51641924399, 62628433187], [9049147028601, 5554700191586, 105221088781, 72278470229], [55688747284882, 380626195388, -8887801966, -113299998150], [-90543364131202, 4285700316000, 267011220886, 35287806354], [119992119611131, -3496502041518, -357666219633, 36732853099], [-44075363948076, -2946562467608, -316833733396, 110086432524], [-44444654883280, -7896040142792, 143502176254, -79290085174], [-148183956429370, -2936426173868, -87012844500, -66527504384], [6548375886638, -1807738710396, 284809183174, -21638452722], [-123402996449782, -10516559049164, 91818339826, 17175904802], [68634594432772, -1189032194252, -11458964172, 93157521704], [-41221913091712, 6530783379424, 48749443812, -22688819868], [-184729094690948, 2431334710200, 140487821628, -88787941060], [-248012172967114, 4640687877520, -108818318308, -103069860860], [-117839555179346, 3588413081180, 58834813664, 86764019172], [46350587195768, 6072018608600, -366222969144, -29922365168], [158449969329270, -6369265352160, -61720251396, 162268477844], [-130543093414948, -5089477399700, -290115504986, 234245194950], [109387708132321, 1888628579994, 209774279189, -55710188811], [-95254808504928, 7830803090696, -203867343810, 276244954250], [-247530869057304, -3749497859960, 276551431940, -107627031276], [21062044985440, -10835085551884, 124979578786, -164044631918], [139280727973955, 4628961328950, -965730355, -143553443879], [189755114500060, 9195242342908, 40838770344, -167141687612], [-185665327388912, -13418274627188, 246979400456, 77762338860], [46157249105460, 177561866008, -19601486866, 34762210026], [64775592314625, 7195178420682, 45118553911, -18691213949], [173257334157788, -6265805200336, 112303137514, -118672882050], [-102265912752519, 4817995348942, -425121482011, 91887156561], [-106829476029320, 7217622688484, 593300805194, -53288446974], [63155384166044, 463300127972, 49397696018, 26684849738], [-107849255126398, 2245794571944, 620148166574, -121626285734], [-207979945918047, 3185880841994, 4100122191, 235830098595], [-106616997504558, 845561331692, -462258852468, 136815805472], [-351677580316902, -4143003874772, 71422435842, 33076327802], [-135614980675841, 2922160716550, 197914782801, 83991338485], [-314167869091864, -1987673372280, 242210887896, 6683982408], [107941956117223, 4774689903030, 54989754417, -19627509371], [-88057638050902, 7472056132212, -109802336014, 367384193266], [364236340074286, -8340079577448, 56289629990, 225391136010], [-158974774103654, 5391248280824, 311221047204, -308097245132], [-297577558339190, -7488499676448, 453479586736, -175922376336], [17465382144962, 9903244523800, -196505737374, -310604421794], [-90697286234790, -2172194828376, -1226769606462, 57096237246], [-288056734267872, -8821026943928, -243854823304, -201437063352], [245446860521086, -13211409249104, 70250234934, 138274696754], [-176634552977226, -6621389507700, 217456443784, 91710645796], [-125976298116702, -10559342444500, -623886847466, -72154263002], [65235027914719, 6675101563058, 406704065983, -24716007365], [244099314806096, 10546785994764, -280491996578, 77666563694], [225884165398547, -3749548669002, -790572958951, -5694669451], [-426339236106499, -2176645233282, -2467890991, 13891016917], [-372905294901858, -5341848767068, 105607706640, 240387730476], [-105358296097384, -4143744615324, -919776366886, 150927896210], [223412709657332, -1465070308924, -167679162252, 325630102960], [34936322796207, 21530709488138, -448127345043, -105464848419], [79676506277344, -5909211191084, -598864913328, -104537237092], [-600323572439816, -392116330260, 122072488118, -62999538346], [-97628698705322, 16173357075104, 3249467720, -340418909208], [66811598835647, -26109499823894, 4681906531, -266776376785], [-206818308767070, 17942128875832, 1190703993828, -119031012828], [483487697138294, 12644569512672, 304420310, -68970285310], [157174321768134, 21101985447468, -647009101886, 58270164202], [290175236221721, 1686502374586, -1511563092037, 38345975023], [349935367154401, 12340182174194, 134266841567, 11533049115], [-561906572540054, 17020565518652, -252944701726, -87844117342], [193194574110012, 20291195031516, 655317800484, 32024908512], [200234954204690, 16373093199572, 817681898798, 79069843822], [-169844797587058, -9442101952328, 791496651276, -555650138676], [-306724419291386, 12466555591160, -702762408930, 491399978882], [554157072311220, 9578695040304, -1098381259970, 145753677010], [422835658609901, 29456202420494, -971647012387, 307138034345], [-227275737197416, -6692717593660, -1050210466, -753001897370], [-361736571620614, 15769454250488, -1072743694542, 232375982158], [-74953089463852, -9252403775572, -1028351729802, 695313465406], [-151722408896502, 33203105982520, 948527939228, -104979859652], [673113237257778, 24661320415088, 158787832710, -266403715318], [-499996785727532, 1723868764936, -754228438660, -608907085140], [610042721716636, 6941892794148, 378233380138, -372959263446], [-632297155177832, 18845283018268, 297983059904, -104215639260], [-179631822956897, -10834399868430, 449808928495, -522464927861], [564180891431871, -2210845981826, 1164340662017, 9860920413], [432056420731650, -646549698744, -826393851972, 502065164796], [-1028804740915907, -5057784301730, -1574217650783, 753652951845], [189741677192964, -40885785920188, -1243317268670, 351412961410], [21507890237306, -2948597681584, -1720416532428, 294598338940], [-3162580543992, 17016928115288, 1309921031008, 232845816760], [-1033909570603655, 19696754991870, 1000882349631, 37966404767], [-141314758216928, 3070675954940, 915160044318, -575280133682], [-325649598471962, -14371689463812, -1625267875446, -334630882694], [241473526217204, -36921296980544, 87992092456, 285539008232], [-482714480644064, 23703850632648, 1033564662184, -129866193440], [940699195576127, 11876833352878, -624091919627, 298378050177], [-157478998567696, 9720761499264, -1153425115570, 141686162386], [96703480786197, -2468745508598, 273553795987, 789825442271], [155788821908627, 21101187449658, 648886721639, 673128777307], [-809774631158164, 14592001624160, -1705362167712, 737215326256], [254995827853228, -6430640438528, 434479735024, 566585752200], [-685714120627380, 14555419291496, -1190590131632, 133416210296], [-36301728089458, 57914431157736, -550375270416, 215609002104], [1391509009114178, -18245741032532, -575722926440, 420562959948], [-314520023712352, 533893866156, -49675109010, 174994374414], [-258840751970374, -24902857733412, -713463530158, -184514558918], [-127639978888040, -24239573095332, 65802867398, 957212008598], [736187948485651, 2041151745650, -1310805554959, -40422528495], [459840256365420, -40154030442880, 53649537626, -749406761114], [-403666978445522, 18359907821380, -1682689672146, -523193985794], [121977776319173, -25927247807238, -128787869533, 681958340687], [-321466665979529, -16028947912442, -2597951057525, 942947747131], [-542701274134856, -8255215606176, 1739604627754, 366348933750], [321597037168530, -28292672231408, -256076226490, -386776717926], [-1417347823789902, 15058843040724, -972746743166, 92950460882], [397378803387204, -50542822918516, -600536612858, 920571051206], [-324681013518257, -13926216990222, 3147159514027, -235715039169], [1626259291036704, 733697473892, -799935176642, 346565236870], [1582826768577200, -8614027886284, 1401880135626, -1024674382046], [-211207227575104, 131829601552, 1194017020736, -607675602368], [463160767358120, 66512740178648, -131279645682, 607612873914], [883354875318488, -12537666395144, -319768717250, -828075813822], [1748620755449310, -28399375437372, 593365414062, 681172941654], [-1234469979844916, 30633532244964, 515565380812, -1046326733600], [633596931899799, -26207477713950, 50439184661, -87497455283], [28890313715630, -17281729020132, 2500622151846, -1078944301226], [463416378781080, 14043113316444, 1577626161206, -1793031081210], [351354404947072, 36076333428956, 423393632606, -897041844666], [-1003342029626018, -42029159098788, 1433409423790, -1149403504274], [-259983675493617, -63186157966666, -591987657869, 413018084915], [801718294419410, 12041763506836, 658003432094, 1174372996102], [731692731017120, -29457196507684, -1408966300842, 956690203686], [-457486683741318, 43312076698448, 974134975852, 236160961076], [1363039814173516, -73675923999528, -764362221092, -259587205284], [-1406452395470750, 4830761793584, 436831539032, -15555487336], [-2726743590888667, 15909508461626, 732647105337, 364868855233], [-1052130389759251, 39083397899246, 3690179303961, 26259450957], [-1570451077492266, 26730313348812, -1134700317018, 1471674618198], [939521743064874, 29977700193744, 3264540552452, -1598440413500], [147081731410663, -549871118254, 5314799191819, 353784849567], [-739411723777926, -15053748547056, -1260994541048, 392923081336], [21899672408988, -8999434812468, 3596671717764, -1011133171200], [-1086830664288321, -1793721908150, -4148806813225, 552144896587], [-399538378925981, -41132345335610, -3525598620987, 1141460821297], [1624374591887020, -29822232003460, -237206696654, 289382155378], [1974287049786141, -6378837250622, 3240360020703, -1712618026333], [558952299832920, 42296739751480, 3273781025726, 156703325722], [1732277146205715, -27308977080342, 726830785753, 828497251793], [-1378369217175520, -45950266508244, 1530586635764, 670009610344], [654777619178309, -91685711045914, -2896286843085, 518746187971], [1409546145618011, 106184774537866, -2161199693849, 25967095163], [-916713562609442, 57756278742444, -3868784735846, -8339345414], [-21676330608132, -14892456514840, -2921955009004, 1289751465084], [-1525186191639449, -14728558406298, -4198588388675, -881812452135], [-1705538743337218, -14092718544448, -1264634165566, 1925524012270], [-16471299867026, 47578027439016, -1287565672730, -930860105894], [1057501713149140, 21634208774560, 814932681646, 933983813154], [-2170946085399654, 8616918250216, -2659939989564, -1354136603964], [2902164203099663, -22464864553418, 788577364915, -763487854941], [-744749977885922, 27373961343604, 2097073384962, 671332431394], [-1749790428650675, 99847344434982, 83447924181, 1327620039977], [13517116628094, -43753230087256, -1824793495148, -1229747164940], [1931273686614923, -85972307313342, -788706247577, 397301240147], [-428005428919150, 53140479748316, 4918479855596, -700648927192], [329312976941234, 1064453889956, 956169247046, 127455373702], [22972325715572, -84703838002908, -118981163882, -193036557786], [-424458552784974, 32926049674620, -3606052174172, -313288286888], [862068034820611, 49648136171650, 2438279641449, 1087842345881], [-1846717191995176, -93751048717472, 2153641746208, -887404150096], [2764921133533742, -92331972614092, 265234932716, 1579615833200], [-2334611783328674, 19108135171576, 421290651648, -661646897464], [-1182144817832517, -6645499090118, -4299925446793, -528799511829], [-2548338107919022, -12695305702048, 1642379050160, 457925355136], [1418690051457270, 21728996321256, -3245256733240, -158737636784], [-686798866041588, -169831814217880, 2372640484712, -252890463216], [834427351439950, -124636446078024, -2295416112746, 1988566886122], [-1279306431206087, 16420326156266, 170488074659, 2238683073431], [1235223678708663, 52103011061926, -1698532299611, 706243936169], [28525704541028, 43262555093100, -1167278591764, 2295679410488], [-1452976534275332, 113367066116984, -1176071728576, 1428256526720], [-207716678499410, -59259859861024, -6001146449340, 1197284693308], [-1946359583627772, 34456876329072, 1867503102362, -258561743018], [1519111697699993, 1988306547662, 5293256201425, -1740673122267], [-926449142988030, 61650542127348, -2394342913974, -1183934473606], [914263024536116, -41071121862624, -1740512070174, 897294092950], [911999429155634, 50503818856984, -2416201581446, 2303891221014], [2579119914652962, 25922983904440, -3674088012460, -842392090340], [-1618808751519785, -201024607881802, 2996351899437, -210770093351], [818811845560554, 137664122420932, 1768152876130, 1699081610018], [-727404156743182, 97544029932000, -1941432523302, 823511402926], [1105554409747111, 4989163548326, 5196853895513, -46747756387], [2284626388471744, -155335031707700, -1157816135886, 1044210594362], [1661557250739066, -70945423693528, 4711751781402, -4860235370250], [2819837315051250, 26363317940400, 4369651002876, -729269477532], [1400511529317945, 59752889647414, 445399507421, 3031664234673], [-519294566136714, 7250365211228, 5653909654078, 1515806071214]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_315_a_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_315_10_a_e();".
// 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_315_10_a_e(:prec:=4)
    chi := MakeCharacter_315_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 10));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(2999) - 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_315_10_a_e();".
// 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_315_10_a_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_315_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,10,sign)));
    Vf := Kernel([<2,R![34944, 6344, -1190, -13, 1]>],Snew);
    return Vf;
end function;