
// Make newform 325.10.a.a in Magma, downloaded from the LMFDB on 04 June 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_325_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_325_10_a_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_325_10_a_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 := [342272, 1544, -1602, -1, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0], [0, 1, 0, 0], [-12856, -3586, 17, 3], [-84248, 1306, 105, -1]];
    Rf_basisdens := [1, 1, 332, 664];
    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_325_a();"
function MakeCharacter_325_a()
    N := 325;
    order := 1;
    char_gens := [27, 301];
    v := [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_325_a_Hecke(Kf)
    return MakeCharacter_325_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 := [[8, 1, 0, 0], [41, -2, 0, 1], [0, 0, 0, 0], [2841, -126, -50, 3], [-10058, -344, 258, 436], [28561, 0, 0, 0], [-22099, 8794, 2751, 885], [54510, -7944, 1906, -432], [1059076, 6400, -12324, 14740], [-413158, -29032, -13524, 33728], [-2849824, 57276, -29782, -23982], [-1089253, -278562, 39901, -1317], [3394372, 230852, 10134, 51198], [8364479, -316254, -42452, 226419], [849245, 637746, 263046, -91721], [42492560, 1241756, -171078, -192670], [-16198370, 1469912, -773310, -65820], [19419044, -1308180, 7562, 682194], [10091066, -810648, -256850, 1620456], [64173629, -5253814, 380430, 1020287], [-150396966, 6481200, -305096, 691596], [28529436, -525888, 905092, 2407128], [22694868, -10966732, -1501794, -234878], [-294537074, 21923976, 2129748, 3984044], [-264294478, 3356064, -5763088, 4723764], [-281703392, 6725756, -3836886, -3310482], [-236536472, 43782240, -5288456, 3425520], [358558708, -25357392, 2476464, 2282084], [308770629, -22359918, -1624573, -13914675], [392932726, -4489800, -2078940, -16276996], [1461249432, -51173112, 1425668, -20798232], [-3244364891, 54345598, 4263528, 8780701], [-584905848, -41051116, -32534562, 3851134], [-2119706939, -3257130, -42444320, 15661677], [6405471046, 13595640, -28265148, -6773044], [375237969, 81195618, 21310674, -85221489], [-1233372326, 7350864, -8058096, -83922180], [5434521200, 250760652, 6079318, 13103178], [3870927012, -231109916, 11106138, -32787226], [-2405753248, -6757932, -95526570, -10519670], [-2939025427, 124289646, -2827164, -15927887], [5876881580, 135846348, 51950034, -54981138], [-523601938, -457689932, 140271768, -44008758], [-12767734812, -206641164, 66798166, -45063942], [6341816537, -63957982, 38364195, 220688525], [-2168828030, -646614180, -66526664, 112449042], [3965600925, 567905118, 52940232, 35432829], [18787019371, 998824590, 13100154, -45259575], [14067078964, -544335780, -255459198, -500064814], [-22359069641, -512479002, 85367605, 210672315], [21882477637, -329798102, -47165997, -392020823], [-25297808665, -416267050, -237688098, 263037617], [-5884989582, -75017760, 270526544, -577865064], [-20692276416, -1308259872, -27583692, -347566932], [14192732441, -744957254, -294661689, -223129443], [1071580620, -2897845032, -75543168, 179136096], [-46650723828, -2136455388, 207286302, -502440066], [118179533683, -458015778, 188492890, -62575911], [-14562663520, -2682398484, 750081258, -132056982], [-20986618210, -777695304, -960646884, 802281268], [-27768208428, -2230631592, 394024812, 694494336], [28311256639, -618398970, -371057439, -698655313], [5998550090, -3575093208, -1590736642, 100151148], [54284680966, 3043079652, -140854728, -1081659418], [33319015983, 4273566462, 166865337, 740756019], [131872197258, 3071286360, 1304271300, -652303500], [42049497072, -588574668, -44716070, -196303038], [37089316391, -8091894738, 612244057, 616303851], [72827254603, 4572775850, 898862688, -587162373], [-31113418103, 6291254466, -761092865, 1689970305], [213531760808, 3041421452, -1617005814, 2349330374], [58718829492, -9846241380, 1006036350, 2050294314], [-247562953578, 2969735868, 340767396, -1824167046], [161937504272, -5416502676, -3282411510, -166882554], [150129063700, 68425668, -291915858, 3000538398], [-281941045253, 2357696782, 249972690, 3433914625], [-7337247862, -261190360, -53524548, -6614994664], [-257313091130, -11220349488, 1429002168, 2015228664], [-133986093940, 1046730036, -491133018, 4648247206], [223958008464, 3616544076, -1518508758, -6464179542], [-259456757649, -1890223166, -3635995440, -624504289], [-57077667067, 5340915306, 642847979, 1966233957], [283817228079, -3987582010, -5525223258, 2677175065], [298285125343, -9764563242, 6653029949, 3521881239], [223595289366, -23909667012, -4457748084, 141706110], [845993298589, 733981294, 4022288208, 1597817245], [252078795974, -25707000576, 5265768288, 1558405324], [-293170801498, 8454888624, -8620675784, -2449265256], [560461261549, 10315862306, -4150123221, 5954463069], [-170884072652, 14560244100, 2216865138, -150512682], [115557747956, 28627164104, 124748556, -7293128464], [54840204099, -45306009346, 4279382154, -153279143], [-940390114308, -20287310292, 919939982, -7943258958], [-1737639418271, 18778854206, -2253072516, 799316277], [-1431176586348, -6876744780, 153776686, 11669428854], [-174263714526, -47842778716, -4291264476, 2245612486], [872448590786, 34160108416, -7973401296, 1185458640], [-243199185351, -15736442686, 16399620063, -833741195], [1041721481476, 61772124192, -156679192, 569367276], [-1241994564209, 43116656670, -6986564739, -3465973509], [-553800333567, 80825269758, 16301837104, 1171023897], [-1268674526543, 32515318194, 7892633763, 18176779541], [1190959855319, 41136344522, -4287823932, -545490349], [-308806281455, -19516961726, 4092714963, 5789051041], [-1409501529461, -13503648750, -6207667716, 7466729415], [1358085774646, -23904623832, 3535447668, -7988332056], [-628606809600, -44826431676, -1299981702, -9300285354], [600398147070, -24566272440, -21270400212, -2422376352], [985297438970, -7122987156, 2154209232, -36304441658], [-1094833965101, -43389108954, -10173375031, -21922146021], [-2959678215362, -66163387500, -3773740776, 19510325394], [1985122135206, 14432867232, -25136293424, 11873233152], [-2292843745836, -36889548796, -7608968370, 8762926618], [795835850152, 72252141444, -12762480862, -31944693738], [1181063368029, -8654604342, 25954029562, 32416202139], [-501566853426, -71452857904, -13642601640, -16922941064], [-1332945304982, 58981369320, 37281134206, -43383728016], [33949615178, -128816791596, 18298146108, 48545949826], [2128220461260, 18405716804, -12075961818, -12298259918], [-1485604800412, 144221631408, 15592638720, -18796977596], [-1621825730418, 121363795320, 17743390692, 9620438820], [1403810046501, 63428454522, 17968373735, -35233300611], [648747984680, 29894288740, 19105038054, -38380760382], [687514090624, 209759961940, 18767586, 8685551338], [82759842148, -178133501172, -9155628182, 5536631550], [1476721645456, -57898509860, -48857224470, -54093308246], [-2906005031538, -13244062392, 49758969452, -72922725588], [4871112096094, -20416729052, 35766588336, 37284594550], [-6488898286670, -98137322988, -52875155260, 29974628826], [2961413193437, 48201797298, 9324026911, 12500372025], [-2178930601024, 317469937044, -53838230230, -2557092906], [-620335240679, 52888633906, 1686988074, 25914766879], [701971902064, 269241529464, 92409821412, -30969978552], [-3221489104344, -133669487652, 55888979970, -99843610566], [6509705298822, -50882306592, 16814412000, 37514391636], [14809135692, 3086793900, 22924026738, 28428178782], [1052245566971, -162842921306, -32148331515, 35268775107], [1618172665780, 14538851220, 25101074894, -89205399954], [-2461396961518, 73805514504, -123599272692, 8501304172], [715176504857, 166541325330, 80580909207, 1449100453], [-2522009135176, 81915841620, 5693750594, -142196204358], [5456080976569, -482913775246, -97046746593, -15040447623], [5091652875670, 190136325660, 80243956956, 55106546358], [7781817022658, -163413892336, 15914288562, -40327550524], [5833040447010, 146734023912, -77739274268, 116100925284], [-1017289980220, -12507649652, -79379441130, -108327378318], [-1704738724711, -218885571606, -96720944437, 29963228829], [8362006921434, -323994059576, -56711595828, 8606894108], [-7587582522684, 52023396144, 157005835016, -90362525364], [-3777031059403, -25304406830, 127923658506, -66784197237], [7662454824529, 474120160938, 10768577347, -19526715363], [7461923444979, 483321153710, 115696969533, -71901965273], [10465030254669, -373502628234, 29094379604, -94931945895], [10037831965928, 216228143936, 106915480392, -134059219492], [-1391965463557, 510370582842, 27541888212, 122479340895], [-3716057464882, 57068183444, 65030415912, -132130178254], [2965844397712, 327069241272, -68361816844, -230013279660], [7470343424288, -287308598300, -88252491666, -21213906438], [-15179175345422, 258593879496, 93336668540, 18400464612], [8183597033023, 409669797542, 110216834277, 112887699627], [-2368129556566, 346509292520, 30947459190, 315232119956], [-3980313947465, -264329513410, -18113772555, 336363927591], [-2687908349281, 565650189198, -177760776838, -112511507115], [-24692295830837, -92870601694, -179786691720, 74747931603], [5000619744414, 6343102208, -157812309720, 175458473632], [37193034129273, -315629300606, -95176983618, -169093759213], [-7522555672322, -745763359092, -213330064220, 2229584538], [9501585413586, -58686729144, -330532730020, 157186641504], [24165060423994, -363868965096, -40381291236, 80829290736], [2706830503150, 86632020920, -163073404476, -19680060828], [22694469188830, 1046909368, 2855180082, 54072857296], [-7174151078229, 147637830582, 54111021697, 168202554183], [14936652773656, 253571615640, -86942533932, -343323600808], [14704479631788, 332717534196, 264126915710, 175199138466], [13437605361350, 433547247204, -206846122096, -206277220914], [-3954122571135, 2061935698666, -121751279421, 100354829105], [7036597623784, -521672373636, -78913194210, 195808203462], [-35808295545290, 730997184920, 44044259700, -38472466860], [-587287790324, -1204653857400, -353827723296, 137005743276], [6673417144128, -234238779732, 172244575138, -239933673846], [-13828027472852, 1492230680388, 830466842, 280336377558], [-18926872179484, -510214681784, -194403566460, -49386119736], [25278842768562, -665315533224, 354209690668, 29890436592], [-9685978407922, -38906072872, 319956823500, 213158184728], [54461585851480, -134559547444, 11185705242, -226615339062], [36084068856174, -75538993472, -277999418880, 184972872932], [6584918332482, 936658523712, 452549621536, 279118361124], [-62122851565802, 197114496024, -148761290238, -219514512228], [-26051130989984, -1061226614844, -247737565298, 419803091442], [-37556824344732, -344805998276, 91194343398, 10133759522], [20311526615669, 1622580362706, -95087870777, -309018210459], [9717736044408, 546801741804, 186226931718, 636715622838], [44562858090463, 1088368145490, -429824357392, 362285241375], [-59431379574170, 942041695880, 146891822508, 42132209028], [-19357567885915, 1396029463718, -3992712300, -78848569591], [42209142041198, 356743648000, -219587234832, -133507474680], [815410925732, -11165282892, 516514843174, 57531772086], [13400372447892, -1593800465004, -321805163282, -217536012342], [645974674424, 956778146748, 408795691482, -800833691858], [62244786885546, -232295865604, 158689424496, 267542296438], [60835063481721, 620758518082, -130750392537, -852436845751], [20656908455572, 1644895996752, -68656399932, -62389153800], [23344308009161, -2166247561614, -337379204061, 258198989973], [17068313410047, 2360002948374, 534348886653, 3103404423], [58667818021596, -1445719705228, 1053928838766, 516566836546], [-37930972833154, 89997069264, 218768842344, 180622418380], [-1182015624471, -1644914511078, -693013009146, -262333927053], [12897330375180, -1261739464560, -507627674352, -614952015348], [21765810022210, -2336658185448, 1098307982220, -98890112200], [14997445536863, 1741007957034, -347202453652, 202914515019], [21723051874434, -348125231448, -149875450804, 217796720508], [49779279174058, 79850892672, -52919507832, -866640154972], [18306685674308, -1255878492528, 1064906842068, -78213950184], [-4403107037858, 2491739291248, -423417144282, -525053984744], [-35260434267583, -1533679009406, -261595239594, -704481844341], [17440075323796, -975897784452, -829309937310, -25148452722], [63049435905684, -799092245976, -833728773320, -260480516616], [18703995885611, -4027900585882, 136785015045, -645787772113], [9829427789344, 2611313781812, 975361205094, -1086120505602], [44133419005001, -4213691738638, 248247082755, -1112884808443], [20718595671376, -398702750532, 695541596482, 7184252166], [-31643544658327, 437513287458, 654359410770, 300252417399], [38098648895640, -266127689036, 57464547654, 477365507306], [-24021076934513, -3016392610746, -146052765310, -1282503361347], [-80171400687535, -1481482557730, -28841398308, -1042198870051], [29277302717330, 1652414577168, -542982564984, 1549560725892], [-67831693634425, -643869307690, -1669359655563, -815992862089], [-36935901542008, -3075792067600, -921338170392, 115533869972], [94954579134942, 2001336898044, -457009494380, -1119012124386], [-65708620912850, -533470460080, -606888963714, 236458616220], [35559099112842, 3685944159336, 127437920308, -518691836988], [-124724112441452, -2162830990512, 441407143872, -1191175525740], [-105298205411908, 569191258164, 644316226978, -1814394227946], [62161752792885, 2377079258610, -1278005717133, 756132597633], [15299067692829, -1058579545842, 1349181122224, -1649875028763], [20108744321889, -1212385165814, 953051368050, -538375944865], [164147300192414, 4128909325680, -705968105104, 773643687996], [-4794098147251, -1488383189726, -1261798992681, -158695803519], [-159983858386568, 49934447632, 235449984276, -1093122077036], [-96863389729074, 6621157887524, -186253853160, 471276695554], [58376685653806, -1264866362144, -1451407836114, 2500569627436], [190934812016009, -946012172610, 1805808017452, 542611632957], [-70187951729000, 8917319794272, -716523216088, -194392320660], [-52184806472361, -6759221596026, -1967147768819, 164021722899], [-236762612685734, -5253046245912, 519864597516, 80053895228], [-20668156630768, -6378763254560, 537575378136, -869538941304], [-18521133511869, 4731100926846, 173340242790, 256123749453], [66861319870592, 4426035376252, 1108851430086, 826654502166], [-35117982618414, -2844712750968, 2626634201574, -1102067522172], [35767113083722, 2551935411652, 436713561564, -1184179124126], [218631956014851, -4062291652026, 723262433813, -404245952469], [45089966141810, 2097676460840, -1459682872908, 334142625752], [-61923591600629, -1038033220746, 444986048742, -681629310691], [-373898407419207, 2641988733882, 1140999823583, 128741171373], [6206002394216, -1064837175540, 863972822418, -3192880554026], [30530731362754, -243228486040, -2621065213722, 1053614143968], [63438590850944, 4408155979860, 1069114817774, 1032862956954], [-78652992391734, -437402900400, 302146701850, -2592582776112], [-20188611998844, -3558906677084, -3901441909122, 928674993266], [-129362325959418, 6462628418568, 2435908526084, 198960115776], [-153223276316700, 3698113247448, -26115711880, -338621389740], [249460879159643, 9790131755490, 113365884120, -664240292573], [-180086049142661, -11491120293306, -412049600311, 620055979359], [-150738381769958, 8651090580096, 1848608485000, 1163900639064], [-340915002733044, 4834183833876, 1181428542366, -226052580750], [-51257386600467, 8597911561998, -1988964208616, -2044860942579], [-33906930165459, -8992337364654, 502292267475, -429036523947], [-61759204596320, -2971402095108, -2409447779262, 492149483282], [118811684350784, 7821050908596, -197895349006, -1544034361278], [-43720123094064, 7800186454236, -3458399542662, -1307527810566], [-163748055281772, -1655643594852, -3054861827758, 151254376650], [-144246223092062, -3175545726096, 833646968162, 2232510175224], [327620845158310, 6281484701976, 253777644572, -962114283216], [-14918833468492, 9051284065560, -2482321823016, -494912169852], [-326085674011630, -2339908893024, 1204441668592, -4507160061264], [-542255881867012, -7135504914708, -375130857074, -172763674686], [2239449056050, -5266724840824, -3864650106738, -354929996160], [-261092058203550, 8326812564576, 2660377590800, 1581808909632], [359327149252400, 8390496143676, -2022004966198, 228052068666], [-213699435816881, -6294927976174, -2830567586868, 2137351296027], [117379494417176, -826859445896, 2212123831860, 2393161570116], [386416056011037, 18015351024186, 866365012146, -2485795216581], [58555795150522, 16278977413636, -3673248673212, 2972304066646], [-1117932617674, 18809115982536, -10052071060, -459518725836], [-125781246035184, -6836697779124, 424888127998, -5415196882854], [-100284050705554, -8245277144812, -159359751288, 2882249064134], [-506153225689279, -9969145666878, 150533605135, 2234436714789], [-75424847043763, -3348888600582, 871926090447, -1643855464655], [-319545718519673, 13831211093502, -2294441773126, -178198265187], [211816697357210, -8287687101920, 2345143536240, -864330952152], [31114539845352, 9970547541500, 2517439973634, 2391047109718], [325822843484583, -6675140267142, -5552388705984, 3611714222223], [-2546739801140, -12007966695420, 1043751525990, -2025559027798], [-689738948439370, -9355659569128, 912659594298, 1967662924892], [369124063797026, 946425123816, -83627718300, 2403851985516], [-409927115286656, -858927849244, -3468593274258, -2461001862942], [499125376036290, -6238460473044, -4069262910456, 1594366368558], [-104754059568504, 15903521096844, -1882476670542, -3901886324130], [-517632978713297, 7262942841034, 962911385016, -2269808463449], [125324617542290, 10689997692048, -1415840850854, 6801717096780], [-408475720306865, -21577614792258, -2015799794443, 5270168570751], [417675995099083, 15943904261830, -3328906688763, 7158993802459], [228356270847398, 6086502222324, 4553171616496, -1866802130730], [672276274366788, -6564587317328, 4982868888264, -425225749516], [89923565493895, 17545427199930, -3997328705632, -6918788359305], [-37737676687212, -3194890421844, 3103879858530, 6116691623322], [343188060145383, 11656109135074, 188262132, -8999531778085], [325356349358344, 69753161340, 6178892798810, 1574535594534], [406447989061816, 3073349181860, -3288456027834, -1884214714890], [-776229787377664, -9851033480316, -2434112503874, 4576547266494], [159545295546832, -1013026351520, -6608491376832, 530632106716], [-231878095574629, 6824591149142, 1461256202841, 7764125332583], [365733561775145, 19195138440938, 5741927527119, -6251688509203], [771378003368028, -2331713448912, -309808315472, 4328872136724], [903470305875087, 20931044571294, 4326364548198, -4010064346503], [-365628237012661, -414555874362, 1375509757561, 10724816285331], [-290425779276322, -331361346472, -3373056415806, -229704122824], [744792142292836, 36595124443380, 1841354539338, -7969694929978], [-894466771487132, 5364081261468, -8479265350198, -4933643541966], [-42001141746954, 7110881016096, -2843870096784, -592501218336], [26388224588276, 6336107303400, 2709856735428, -1977028354512], [281512182017140, 18215197554228, -747419560114, 9132011872746], [-195312183064308, -28404730069300, 3694270695714, -63992681798], [-334544965050253, -7549646009202, -3795807698250, -3376382075811], [37766416526884, -1263535433356, 1238614465758, 3081451909242], [775713632370274, -23083549733568, -4519126025472, 867020914464], [99693738039718, 18132616681344, -4715538514, 149914732164], [-202050054397204, 50207011091868, -3444117373838, -489588280254], [-579135942226448, 16848789806288, -6837444254976, -2135853039792], [-906581698801392, -1281063842532, -6892452044814, -176518745178], [-820734864907414, 391486485504, -4077592089984, -4297426337976], [-236823088018428, -9648011906988, -8268687814530, -10111602625878], [-816986831545556, 7186511181576, -4453125973808, -1499474928408], [1327127817703836, -33029588493052, -4460661021666, -5651252903570], [176715616723724, -9668576743428, -8646990065582, 1177333977654], [-556407273432676, -16539175532940, 2261068984230, 13949840791066], [-405898504756062, 11437948673088, -4245609087504, -10470564776712], [594214983452152, -50147062892564, -2873346456150, -5889634083650], [-399522883861900, -7253146012428, -2528656202706, -5611692578418], [-343648602535506, -34481899755780, 5153903439540, -11431097458602], [-377352969501241, 11833084285854, 11582056632081, -7956355314513], [592974670161635, 28186901925606, 9651024845301, 1894086682735], [754238500140033, -22934589054918, 5438455146063, -5498655945375], [1004461716365694, 8718576071412, -3596784306344, 10458933427374], [1382416880808053, 1347722573042, 6674752515423, 1036653191057], [775588603424045, -23880964266306, -9954091010316, -3381138320375], [904170853057966, -20684619360768, 8537967686592, 4726342680276], [-164112349849468, 9556522703700, 10832591337014, 7709504720958], [1092039006819473, 25028666292874, -9134190503526, 2003049219231], [-968813794192718, -2332955965480, -4401484608492, -18166305975948], [783305483826830, -58524273563280, 8841074239734, 1416433558776], [918343177823698, 37474405088688, 2070213411520, -13053952321260], [-2323302877695799, 2230911805578, 2872607997999, -3072511265039], [-1010156432651664, 17436878348688, 3383370391136, 10565443510584], [-147834618178278, 36419148854136, 648025907516, 10645227644196], [171097527603198, 57058848113896, -950603142420, -12552604393492], [-1045914158579211, 5371621646786, 9792024014682, 751842305851], [-540693055909946, 42290884687384, 8226817610970, 2775174012520], [341423916788091, -7569342815122, -2521109061999, 3883316846059], [-188712438954889, 10106059736558, -5652443825694, -19281301497763], [491007356517122, 34760848920264, -9523972851972, 14378851191924], [-1984766159593402, -8911816236224, 2807073009696, -13199594090664], [-318755658717814, 17720086976308, 8951727700836, -21945141715434], [1173762214588352, 23571479709572, 12558363711522, 2969323392218], [-353002390005476, 11171961332904, -813168470636, 22370793446568], [-734800692163471, 23737256144418, 4806665771739, 1285079246049], [-212066437828875, -3471714049878, -1083260513073, -12493070270535], [999861558928684, 6905912217876, 4069726176314, -1026357195114], [-748951995753121, 48702841567590, 3681339947037, 19514812998855], [379277267622055, -20981918886270, 3767467888512, -3811194316465], [50136847226223, -3439443537558, 14480062228076, -11920830896589], [-942549114827951, 3077200780042, 2901217976430, -25680594578621], [1097830053315118, -44608303056592, -6218533474464, -1058337449304], [-2394250674821752, 11794068364992, 4704423588968, -1783779341340], [-260283903520110, -77628751213728, -6903118973752, 7359974062512], [1502938269218250, 38886433525192, -5225845770018, 16239811162988], [-1342832589959906, 11352578418756, 1950779842200, 14538944489318], [-606270043408168, 39430723479204, -2556697499522, -19445985862602], [1448808814157418, -9073256832320, 17496263925696, 6512594974328], [-692117294012758, 24280064165040, -11545335216824, -29996763512424], [608905783773506, -13190532487536, -23072408249832, 1994334190072], [808329438250554, -14166264351504, 2691513177600, -18533721826620], [1951073693983064, -39169621350228, 5352204034290, 14400600403314], [-193539638914586, -45325386533864, 8306536975572, 16909886914360], [-1213126393411556, -23159248551180, -4822254881818, 2032518183954], [-248324695471755, 31289142201402, 12206873368542, 16037742658407], [-764094916190381, -37253516214690, 7156827737214, -20900939339043], [-227486199742220, -61530549588396, -4419889412826, 7398521276790], [2205281148923054, -17380609514736, -17567012002098, 8794923949908], [-306369042404516, -32946520055008, -10287609508092, 21472586132592], [715402886173546, 1908981093984, 9422288081232, -11219680619280], [-993040410691267, 38497983619082, -5024377321593, 16043583671873], [883382431239062, -140851023504, 4162263567174, -26707412292500], [175421884410459, 83418279573954, 15146642074992, -9242288091693], [-192972509039985, 86958194603662, -801481105230, 1331117291309], [107584555267793, -21644246042358, -20572838827345, 9249055754493], [-451896471176867, 23517742176210, -5747536123698, 10063404505023], [-842265379093885, 3527283741998, 21344799405441, -3261656251645], [-558225376032812, -34443151933920, -13333354759776, 4386056778540], [-2354783208935875, 32493252710962, 15763025243595, -17112235278795], [-196796180692027, -29896996133118, 4248756756107, -5253371057499], [3006775936286230, -10282211737176, -635785136724, 13230687291428], [1720020692392987, 59514257387454, 7599119077822, -17910785208555], [-1181847373703540, 41051774691812, 256828319598, 17971023258666], [1815967256405147, 70158766129470, 6906697259241, -26291773173497], [1221921171217606, 19605532201164, -11198854979324, 35971628913162], [-107386347892111, -52313458748454, -4497818827069, -14439480823515], [2162253723596148, -33881514848500, 12889377746802, 24561436800142], [-280319550095062, -37024531763160, -16127675108074, -30868186688028], [2651257501520276, -40611049162044, -21079257434898, 17794504660306], [-2970704063236447, 108601806821322, 16032932168359, 15636670152405], [-1808564466215286, -45505569267016, -11639239222020, -9937565627096], [-674260472080355, -137016347559506, -4596634401744, -582888315059], [-1222633336777335, 130950876334422, -13896955381028, 8832182379381], [2007173466726289, -15130637296062, 17321646121991, 20813166437085], [-1930134595474696, 54875993499900, -20301059167734, -28368267253226], [1976274784048633, -26392216136054, 13234789996014, -19434810451445], [1245418294357104, -25294276178424, 3222432098876, -5264557179780], [-1410615530222842, -51628124769616, -4447872422616, -4092026189032], [-985088705641522, 82004416458244, 44242654704288, 3853895897238], [-1457528835816128, -10672035755428, 1757054916762, -2390680594986], [-2580068167276598, 74372548865208, -33108735267580, -10293865414188], [13098977741892, -69845871614964, 21875470344366, 10682880423426], [-1444752564609609, -87213760507830, 13856242049160, 1350646279599], [312067325125544, -30975239597460, -39423883592462, 27554817234918], [1578159947656474, -37995235362584, -11755186231332, 22964553292660], [-741012590480461, 153379702485282, -12937266171492, -6143119165625], [-1792991556605708, 33632991305100, 4432010157618, -23387799211906], [2932895184643732, -84040921873284, 10856196698050, 2772392061234], [901562943967226, -17424406208836, 22851746785032, 32739770460182]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_325_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_325_10_a_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_325_10_a_a(:prec:=4)
    chi := MakeCharacter_325_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_325_10_a_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_325_10_a_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_325_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,10,sign)));
    Vf := Kernel([<2,R![232000, 24936, -1194, -33, 1]>],Snew);
    return Vf;
end function;