
// Make newform 225.10.a.p in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_225_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_225_10_a_p();".
// 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_225_10_a_p();".
// 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 := [4000, -652, -1, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0], [-436, 3, 1], [-445, 33, 1]];
    Rf_basisdens := [1, 12, 3];
    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_225_a();"
function MakeCharacter_225_a()
    N := 225;
    order := 1;
    char_gens := [101, 127];
    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_225_a_Hecke(Kf)
    return MakeCharacter_225_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+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 := 10;
    raw_aps := [[11, 1, 0], [0, 0, 0], [0, 0, 0], [-1744, -132, -26], [18298, -370, -195], [-71808, 2592, -460], [111605, -7016, 168], [273798, -20934, -2549], [1174476, -17556, 3426], [-727252, -119984, 6276], [1425052, -56940, -1090], [3447538, 105792, -37572], [-1962517, 961840, -38760], [8142408, -200976, 2732], [22283108, 651880, 9384], [44311790, -1064528, -314856], [-1775144, 399752, -345528], [41835342, 4664400, -199100], [-29717410, 7831506, 322747], [-98809132, 4103800, -1123200], [-60459531, -11107704, 56864], [-103098848, 15961884, -728626], [-243751566, -8354490, 165897], [367574409, -9709272, 1136808], [110724742, 33078720, 62616], [151725078, 29429760, 3058860], [-1169030540, -28560072, -1867344], [1548858894, 15684882, 1573851], [710044754, -3104832, -3051852], [823960463, -36162032, -8818680], [1595175324, -62578356, 17044970], [-1304810832, 42854880, -11411820], [844496277, 42350688, -14711448], [220702526, -112378158, -12034413], [1724694980, -53797040, 19050060], [-6444747528, -117762060, 7027090], [5165319886, -167377872, -7935216], [-1366829618, 321242322, 9685395], [7514800740, -165309096, 47474088], [3502664256, -186994896, 31481736], [2583476338, 97858046, -39315519], [-9238223878, -534418800, 28648200], [-10767630532, -78378140, 13465710], [14195813083, -462241176, -47913768], [9272135598, -302923440, -115434336], [-3065435640, -583040280, 72319420], [1968459962, -341996610, -85574835], [-12924293576, 1160274456, -74300676], [41747490976, -516377344, 30066780], [-24467217908, -595657536, -70017496], [9014453334, 101643360, 217386672], [-18673239836, 945711488, 118522668], [22266777537, 529561800, 275774800], [54674836998, 741362250, -48547125], [18116154534, 1577018112, 90358056], [13643955748, -3800195812, -24514710], [36685589632, -3326156656, -31698816], [7894627212, 3535041060, 137376910], [73145548124, 3547690944, -150608780], [-42728832102, 743991840, -178478760], [-71305985074, -5326399590, -239457677], [-129119266518, 2900488656, 172220748], [-66919061094, -1599401682, 818439449], [93144622728, -2882406060, -249836910], [56251219822, -1759148448, 788727000], [-160287316220, 3852271184, -867139032], [-190900539938, -4129990470, 347217455], [-10129105467, -5274508368, -1033441432], [-144828412282, 991586050, 162014979], [-63650397030, -8313866160, -1231638260], [-139566168690, 7888209312, -1316615016], [-275355290424, -3476955708, 1284216162], [36318848000, 11888421576, -1085078708], [299741890254, -7198536384, 55573784], [-374236742118, -12370447506, -335271791], [138457506264, 8927981820, -1090108218], [-291958863726, -17085832992, 611379888], [-144628767108, -7445770080, 1653413216], [179978150763, -17093766120, -1707805320], [-231732639211, 945452688, 2597284368], [284465212802, 2422320334, 3119494449], [-374007001188, -6478465440, -2247890840], [-12284485032, 2044465380, 5241684930], [-377114615589, -9901681320, 1093785368], [351302149116, -7690783728, -3079236308], [285036904482, -24719149794, 2678596473], [-375973246745, 20711005160, -2967861240], [611057885871, 38212816848, 316899104], [-955971677412, 20257422960, -953098440], [251110948352, -22183764888, 2588987860], [465660170440, 18459991904, 4680223188], [782426969028, -40219582524, -514855914], [655914245068, 15921450252, -1304110662], [-105663992752, 60549451120, 4513352820], [1027597797120, -7325536560, 4250706340], [113861893240, -32712530728, -1419621156], [249195622846, 58890727232, -60613248], [1255352701763, -34209971360, -6244788960], [776328123474, -32990506794, -5659344151], [-306659710328, 82381385520, -9317646280], [1804985470842, -49363391730, -783284359], [1727551187064, -3974072928, 1660867716], [1596556725768, 133707777528, 211766880], [-1448828953233, -104808191136, -2727708096], [-688463161528, -19584486720, -1787874420], [288633219589, -34366998576, 9299495400], [1215652689162, 29113778958, -14902301703], [2104359445567, 61643703776, 6974742168], [2090351894480, 126748405060, 7256572410], [-970624142773, -81466620600, -3423936600], [444211630296, -65264990352, 16256544104], [965130414642, 72369837792, 2032153040], [-1010603733330, -95747425536, 12278523648], [-1797761097472, 130185067776, -15040982364], [1378275759492, -123669566460, 10337211190], [1157890340718, -49481615040, 6285583560], [847898652248, 107801207904, 1260149212], [1442693915048, -132628627640, 6879413364], [5631316883050, 24193391792, 7166780364], [-4175055016754, -79966802518, -9246663873], [-482265801828, -97425817440, 27949804660], [-1645391588986, 143536199136, 24805671904], [809980254456, 31714962816, -23336647560], [1832979693774, 46023727290, 19208637927], [2300931465582, 68115803490, -33250489985], [5800034101568, 43993451440, -7848525660], [-772697920356, 79491426048, 45630138328], [-3340987461768, -155967976356, 20585848734], [-9740512579196, -44477209296, 14404371180], [1607791410976, -136412216640, -21638262252], [-2349166870104, 348923441232, -12138139748], [4631412120812, 488571229516, 15128673858], [5635011521532, 301341435360, -952994540], [7604172633336, 248890877328, -10303756216], [12651819987963, 262223769360, 2958381960], [417542762093, 149349980856, -3276774984], [1843376223996, -199724784816, -65434575684], [1368140092848, 13986286512, -4311519652], [-809822325302, -627556791040, 23998467264], [-2341495413514, 192355513312, -14293117368], [-2747636620568, 174788556480, 22226300780], [4311104706798, 2074188960, -12621892440], [-6393566910176, 382402606056, -33266451276], [-10655317862614, 270956136526, -25747225575], [-3907961851688, 77884880304, 64729663244], [-389649106096, -937030114832, 35370561648], [6328412984750, -43474346592, 6107722936], [5411783029949, 474768265792, 39073736736], [9964220155614, -144579053262, -36462890957], [2235938782708, -265922196592, 60675810660], [10490789988644, -522769148016, -18657136040], [-20244587213702, -84734090560, 48032934840], [16094953365946, -151043494050, 9583757313], [6288475930632, -674119752552, -74287428588], [-509361878344, -114723793632, 87037687924], [1271951605648, -1015255267720, 28168454580], [8547346544028, -803872913124, -10147638014], [-13577721484942, -1098037288064, -73049761104], [-9896649127867, 563539042632, -3437352632], [4115538027128, 596633133280, 19678805580], [5460546647208, 528558635880, -20981493816], [5449197872585, 239568937312, -98228052816], [-9946456662920, 455969004336, -90905925048], [502300837458, 144958144830, -110957047995], [17014894196321, -1140329619704, 129978955320], [24209557487064, -623540437380, -33235684218], [19485497232032, -22774678260, 113641431390], [2293626313772, 259550675280, -172953131024], [-18041200850611, -45161265912, 27584415768], [-6618693548252, 1576745632688, -71045408460], [-20709408808098, -867957245166, 139293869199], [31965197976942, -524024317680, 17429306020], [-15960017395152, 281218858740, 239665690890], [-5045797205779, -1190024473800, 156637306888], [-3512021074284, 869442300672, -93246816908], [44531539928985, -167804522280, -112477975080], [-25004246695718, 434505904710, -139844947315], [739110311358, -357306786000, -25192753500], [-9921584603048, -1607136123888, -100110429840], [23489826128658, -1023663765264, 45122317696], [5443062378928, 1482046894872, 82048575708], [19023752076218, 173087235310, 157486876785], [-37562504213202, -501759844896, -102925116988], [-17737127499857, 737107885400, -139426261296], [5638634016060, -1318599149688, -76359005016], [2583109080316, 1399833530672, 188062094592], [1462931153930, 1311393746736, 216303546052], [4908536915874, 96841792806, 14738595749], [22742967035897, -1596489294576, 203123318064], [-18041441180252, 909012711200, 87042020700], [19675781725905, -1157608124832, 330794249696], [-66189900655342, 474886889158, -29809991115], [38531072517682, 2729529780750, 17025795125], [489225205258, -1102965018640, -281879066040], [-66454916872218, 1322289067098, -100091553213], [-24424945524038, 44318321216, -138878775792], [-45615900862413, -719831650080, 34318117120], [-3159961742098, 1382185355712, -264041572040], [-49411564831245, -2083185522816, 90628773768], [-34430652908744, 2143867820204, 161712619686], [-26072014085202, -2177331632784, 271176320976], [33303055112512, -4130497712520, 371665841780], [-78051544384552, -616269008688, -16255209752], [46277206063035, -1375843240080, -118002877880], [15491402231616, 261007805472, -396316929108], [-8955581079534, -276156816864, -191625300840], [-115715051914228, 1787605976724, -131586832386], [-105258581651536, -1530281822480, 168559478532], [-36298139849166, 2416253144928, -594880438992], [-72575013093688, -641121061800, 228894310200], [-55606327536578, -1409869715520, -97836287424], [24048357831458, -4108193256080, 51071863620], [-28950665535100, 4052069363808, 266460015436], [-79937436260986, 313792175722, -281623965009], [54381611894052, -4135782841716, -207895917726], [-26318303765143, -1607933517600, 39004511400], [-113510428838316, -571206470436, 302819612690], [-74607671660397, -516669773160, 151860576240], [68906810648800, -1015080695476, 397850811558], [-70419666818634, -881804530176, 311545466556], [-59247441569658, -769274939760, 336820803640], [107271527012060, 2690748500520, 278085537720], [41384332073631, -5302319664648, -362400254928], [155801174049864, 3199737958836, -378979551646], [-14488024320914, 4078233786626, 312699675975], [46950165112202, 4658242607184, -430983023076], [16721626457919, 2380844564280, 147950451192], [76115119067204, 3920481969568, 377859241548], [-60861550988388, 4036195335960, 189334161056], [121439248063038, -3139036316670, -61100915745], [-92100033997030, 1602800668848, 185367414076], [43891505152434, 4779349456278, -708152517767], [-31213932023248, 7772542733940, -730507931910], [-67266854179487, 1917868383320, -457312920480], [-86497401596504, -7094319353400, -692066255112], [58780667800752, -6896217701412, -1268589757098], [240982788351661, -1093995842088, 74754658232], [63417981899692, 1183244510576, 452231000268], [-73688162275050, -2007600007350, 527243602275], [-119383980164112, 5987161077960, 628459599060], [83846008531686, 7631335281714, -626595975729], [46679954170042, -1583813133810, 610266533465], [-71873789546532, 4242695597244, 1729967420402], [-49239456400340, 5954955131520, 228625427720], [-238118337912405, -1971760336368, -208560315096], [298600427135896, 4065175123232, 275815639752], [185544629748880, -1688447500764, -746968523598], [-84570051609752, -5174504628640, 809604566460], [219872650970282, 3029243183694, 755965073409], [11168994834164, -8894755298480, 527923500132], [-148708718901888, -6515058441840, -927383808544], [62068444723573, -347307836800, -171220414800], [106705614566064, 3015621932172, 554154998166], [-59022390599141, -1386028878072, -751521095992], [-117487168505132, 11042018899328, -362218316220], [59830682669262, 7729047066954, -945551180481], [109927331796972, -11797613277120, -468413233820], [-64659269810906, -1926495780366, 292686744735], [-252293856530058, -11938584140832, 208019428332], [119113874643931, 11994996717168, 1056499810224], [-272822917679568, 1033077701172, -187520854630], [165287576626930, -14264715154066, 1857838375293], [318790651029308, 2267041694736, 317191361196], [400397741427848, 14094317499504, 271348859212], [-59119441567827, 14799095655960, 1779378242064], [60077786247750, -9971906296350, 755840487775], [144645951568546, -8830447750768, 1617057886752], [30868549150778, -7621812726080, 1643375256120], [-58902192872606, 8605280763846, -1297203545511], [-209338337811946, -14475254300000, -4105441788], [98318187518072, -7834095935280, 573687927420], [174531536763702, -9988458170310, -1307494398889], [66653835917785, -4591120064472, 1559451456], [-113502291457076, -5396367730992, 35845375388], [2190979751294, -1864193942016, 1909295676160], [319077950630296, -14912385887400, 226937125788], [180531292536462, -5823938275542, -2005251770553], [-301085017635344, -2027076744048, 1229804105672], [259488312543982, -5607487208640, -3035275221040], [20895562758858, 2373905208750, 1289053565625], [418233300942736, 1356632662664, -1224843651804], [-243117083413068, 9882653948220, -1137520257830], [-338106180677192, 6823311742880, -509870204016], [-40855244870588, 21262740783840, 1533884678240], [92250754672430, 28357549900986, -1149082955573], [-229494573856512, 10642127960640, -1629395001960], [486789443920434, -10131428884224, -516129253456], [-444197911123284, 2377120590336, -1101058424940], [319197917774672, -2459067757776, -342261467136], [-524936526774306, 6193139154048, 2526634763328], [483313769504138, 141362178880, -1275724202820], [310859908423744, 25410069770432, 1667739618876], [204211360360563, -24675024914232, 2270407995720], [547557818707518, 10258058996730, -475672000845], [-480741032884004, -29023474246800, 89079926088], [-56080346695350, 11238760418400, 1431801845400], [-135297518894848, 1372164113700, 3548070729450], [-185617156111044, 13527543619104, 1902401587836], [431094349795368, 14798733187056, -1203298807284], [409208551119598, -26617036951638, 685665894423], [-234332406685777, -453887328096, -3014963790488], [99106589742698, 15097075981360, -681144803436], [-283078590308040, 3775454453520, 4282488481720], [-307545917396010, 22276352412522, -2056497641781], [-200448935786718, -488401396170, 1069799756005], [32420670068935, 31096993673496, 1706838623112], [433743450531576, -14905116818544, -144364433820], [370766934285722, -9601637387376, 757776058764], [497286264836364, 3390972697788, -12069079782], [119141734949870, -5680646583552, 2119520873476], [664632908355528, -24578654718852, -2791572835050], [-664742900053698, -2317722501216, 193689129024], [87358989956583, -25837294790040, -2643649906440], [-229703304366584, -23314491703560, -287696244072], [421093915154512, -9910285077592, -258966452628], [5959266919566, -31900709766528, 836670464392], [-110993114358030, -44881124772810, 319525705965], [687707245877208, -8230196630400, -4521271154400], [613162420994057, 9971494234272, -580633122680], [-341639627439627, 3666989094816, -5896003064424], [-50558351711968, -36397224474480, -59066508780], [-566619797184557, -38627125752048, -3184501744512], [51763836357448, -5330881149280, 875290623420], [793358121580308, -2260463079876, -1469219934118], [871230511320210, -2965043028288, 858182808984], [-269842198706598, -15890193283680, -3091081007480], [-1141130452712878, 13707004870974, 1573408993989], [825201579417600, -12923888576592, -6890424542764], [736186724488584, 46748295330612, 1602135029706], [19377680436488, -30286667322032, 2119416823020], [-40868750611088, -59691152222640, -2975965072540], [-1068647390933818, -52319172216752, -427997568588], [722847986378216, 16541948758572, 716925800742], [811739922048382, -1794316465894, 1967713614723], [1105711248094142, -9368406158070, 3313516683855], [675283970200360, 13664732275544, 1622984912328], [9212367492188, -25223919555504, -7657250931444], [3528304327906, 32639630151104, -1448121356064], [374028548106887, 31759825933080, -886980804120], [-51148259875552, -38969567614788, 1746004951798], [-344135830206072, 41390420937264, -351549368128], [-310074966931247, -23380547928880, 8136552171024], [-130131605932854, 74306761649232, -902332174248], [172734054179332, 9982740518280, 4574752893080], [-934751544177826, -33624953957360, -2656375257048], [1424824331253384, -18264508611072, -5133061185492], [-864992632143088, 63443398224000, -5663527453500], [217851438806862, -302494489590, 3438660940331], [421010331554868, -57092880575760, 2741653120140], [-85979174820686, 26604933212672, -3167081616084], [133898127432922, 70910759517030, 2864399168705], [-304488095132986, -40342475508576, -609011412200], [772559363080598, 35908666623040, -1748141223060], [279325619359236, -44721492337320, -2945365280032], [870080353024426, 6158430265392, 5451131781512], [560776829845707, -11805942985944, -5688323872152], [-110805271660540, 69166430617720, 1636821628920], [-254180375689422, 11737657415190, 1394600952465], [-1003715094079410, -28348824448896, -4504775951712], [-825190102263664, 76277643075064, -2716614897204], [-625580723191782, -23354578468848, 1026806609588], [188001713869213, -61959432236200, 5749997176800], [-3150094210992, 7739596417980, -599844491466], [174508703946976, -78305311970608, 8590172265012], [116832777538270, 84310259605866, -1536227764593], [-84792066778251, 6798572228856, 5434959048224], [-2051736361866924, 26887404149856, 6990223522980], [-259581485905960, 84688760477088, -5411983178384], [806667319973837, 17602171882560, 5468917097160], [-1563961172087472, 56007304298400, -6543367625100], [1345989220821766, 47110773027522, -3251532550933], [789698797298312, 34179840366616, -11044855807692], [-3312638053735380, -6735578954160, -1717770362760], [-1743270989839688, 68551298764320, -3031427719480], [-652173123122394, 59808133801968, 1315397410724], [635921698307098, 115162672943366, -2030996240499], [547580871603768, 13426868361660, 11868679083510], [-1909929506342747, 65744768858064, -3347159522928], [348049752478911, 11861767500312, 4149555751632], [-4379824288528290, 11163256800096, -1307025155488], [271594291111238, -127700754365360, -4087425282960], [-2205415856358831, 6747040465680, -7379644663008], [1036381738505652, -99097142712960, 12675611006036], [-3152428476098801, -19863444050608, 1214067360936], [288810907056424, 47776935650808, -14349366823312], [-975543274114552, -29412638045612, 6068434972290], [-217722822229768, -19847730644400, -3012563153400], [-2102716631863376, 11626957254144, 2314047627120], [-2870388118956904, -8372575950600, -1900155469712], [664772120316612, -101924075299692, -7666618859778], [-1402937610659429, -63500370138768, 8492818284752], [-988612587203188, -13898461695584, 2165430252408], [74335341733150, -5504975807350, -16257473254725], [-615068720420114, 11779677290778, -15915357808041], [-1339159393007972, -209408670794260, -4904825422110], [2223581483473147, -82123807804848, 632835811800], [652558949531168, 83234310925656, -223006962684], [2698546223342823, -116409900981984, 15569626444776], [-1559161247646258, -163319103630510, -7496687421485], [-1816761321928482, 72162593157360, -13020575165040], [-1406557230975060, -81100507398720, 12329817603580], [-2957260638826635, 72457271575272, -6761414545656], [3336068887224660, 25718915070696, 6168585203312], [-2014413056353559, 22306142270336, 5447233941360], [-1128342219387736, 85678001907088, -16675300436232], [-3973493141956788, 32099643024000, 11492421731500], [-3153643374205778, -24042354973920, 7360076752176], [-515485347831922, -37607369872640, 10541647809960], [-168337717768480, 73939465237248, -20737214371724], [398191095313902, -63968665412766, -3358810829901], [-2417579628644839, -42893614677120, 10330995115768], [-1027033222959168, -23305866730752, 13262740412112], [748474849822082, -87376522995794, 2261141349273], [-2587329243042848, 32358489378000, 18887555100500], [2658047238800761, 70208736364728, -6342018056016], [2107668137757718, 124114712972720, 1488663870420], [-291135983260132, 16903795066756, 13965971579166], [891558201828468, -146374499309748, 4420475695538], [-888372992777607, -9521946153000, 19324079051904], [935401232268880, -54163664955748, 11974109640174], [2354875844109116, -36853438633328, -17264557144908], [2382620806422630, 100070276353536, 1863054842252], [2518085882429316, 23157372801636, 4929675796710], [4294104401668174, -6836855288542, 3508183466463], [-4932692076215165, 25873663099728, 15345383999256], [837523002448844, 142648981431232, 18648117228276], [479582450370808, 96794821540808, 9699909818760], [-1616721193289883, 105728349180264, 5732378888304], [-2067381711038698, 135769249555290, -13975598350185], [2870549716285180, 108901231046660, -10285299071490]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_225_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_225_10_a_p();".
// 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_225_10_a_p(:prec:=3)
    chi := MakeCharacter_225_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_225_10_a_p();".
// 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_225_10_a_p( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_225_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,10,sign)));
    Vf := Kernel([<2,R![13752, -394, -33, 1]>,<7,R![25313297688, -43480164, 5258, 1]>],Snew);
    return Vf;
end function;