
// Make newform 245.10.a.e in Magma, downloaded from the LMFDB on 05 September 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_245_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_245_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_245_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 := [-8308, 6926, -648, -1, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0], [756, 1318, -47, -3], [-34688, 7770, -117, -15], [-38656, 6038, 71, -3]];
    Rf_basisdens := [1, 118, 118, 118];
    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_245_a();"
function MakeCharacter_245_a()
    N := 245;
    order := 1;
    char_gens := [197, 101];
    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_245_a_Hecke( : Kf := Kf)
    return MakeCharacter_245_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 := [[-5, -1, 0, 0], [4, 0, -1, 0], [625, 0, 0, 0], [0, 0, 0, 0], [20976, 1412, 27, 6], [18554, 200, 527, -72], [88282, -2368, -1023, -48], [-75320, -3460, 1456, 1162], [-583912, -4444, 4816, 1782], [-348502, -7636, -7175, -4786], [1165672, 41332, 15234, -9002], [-9778762, -202732, -21930, -6622], [-14404906, -431132, 49296, -20202], [-10887124, -157980, 6468, -57374], [-22670436, 781848, 179315, 14808], [-15718362, -1459584, -163490, -3388], [-17670136, 1001392, 443872, 170032], [56725174, 2209548, -494944, 99402], [-1666428, -3386280, 575144, 79864], [-116679040, 1842024, 955400, 297000], [41125070, -1875392, -975396, -314428], [-146979716, 10401652, 242565, 96422], [287718680, -10860272, 1330344, -67796], [346412238, 5919124, -211592, 690206], [-193925814, -11894656, -4467259, 1215024], [-139259818, -5217348, -6749986, -2451334], [551355012, 11428104, 3258511, -277144], [-983435468, 31636200, -8387366, -1267128], [338477282, -6759444, -443173, -939186], [99406162, 39906948, -5074526, -2977818], [-1167015208, -15391440, -13521792, 3957680], [401340472, -19150388, 17358928, 2161914], [-1236026046, 105565116, 29075896, 2217122], [-2955677304, 33963928, -12394170, 1777404], [829664438, -106440056, -8968808, 7548108], [-6518360052, -53357492, 4253497, 8428482], [5093462246, 76183024, -7010524, -3512400], [-1917879148, 55884128, 7343682, 12081180], [-8270527372, -33296680, -3575697, 4631896], [8078563714, -222716640, -35727771, -11995244], [7129416548, 177619224, -65041792, 8646456], [-2658785274, 208113544, -8303642, 12601508], [1881931316, -627375148, 39285151, 4138494], [-169384726, 451736444, -22650080, 18781562], [18896230918, -330419212, 136938184, 18329994], [-11209142352, -157899896, 120035156, 8199660], [-170593448, -686949820, 26433985, 39778910], [-13329156892, -874792448, -121593349, 8757180], [-5347239892, 740840760, 38470823, 81217236], [42789371462, -752287404, -157226696, -8427658], [12946171154, 815682104, -141054226, -51618252], [-8038725020, 230689740, 228966933, 19219618], [-6206631098, -493728468, 214355326, 10520986], [-26807031608, 353906152, -426571630, 25038828], [-44682370122, 84753040, 1111984, -127150732], [11964976144, -1437979976, 444025250, -68936908], [-9156130618, 3751733896, -196564812, -32206004], [-4043203872, 733047300, -71586434, -209485338], [-39300688418, -541937760, -8342804, -203463076], [-11740253058, -3538390500, 275482457, -105517874], [8154557996, 957251816, -22399703, -121484236], [56427598098, 545991872, 507471097, 187224140], [33125572788, -4079878840, 154874801, 59136956], [-28237499744, 3368347724, 1212830592, 70549770], [-54383457270, -3157101592, 107244887, 144515100], [-109870062490, 742691264, -1365820524, -10833348], [-131298668012, -2738274712, 907146208, -362519344], [-135377237534, -5418052608, -75617020, 251078216], [-49501050228, -3142811020, 633364292, 385026354], [214701161014, -6898024188, -1334242690, -173268122], [149208401810, -8301452232, 587216425, -46211332], [250580101528, 2104716424, 247699672, 343885192], [-240527820428, -6291626488, 555807395, -239067136], [-335660203626, 129166524, 751500080, 20152038], [77789983524, 7176037912, 131228512, -619754272], [6631021752, -13255137176, -870671560, 339985292], [14896497754, 8038904092, -504142569, -782768554], [289026842498, 68959800, -326455391, -67525576], [290385179310, 3892794364, 2923383795, -292406970], [-117843721970, 10034924520, -4424600688, 26131852], [-15302482504, 6719739088, 1552434572, -26683936], [23526141554, -13947458204, -2000191049, -46441526], [369807344428, -9477853332, -3702283169, 263061242], [210555863470, 14393299448, -2197985816, -104343920], [-721505802064, 1958222968, 571998506, -804710420], [-318833477196, 7514579844, 2256282348, 1211516250], [-300997028906, -7770126868, 415320669, 1406040550], [-391149967134, 20734491732, -470056648, -354920066], [-178822262370, -7302426264, -7486256742, -67329020], [350104680784, -24947946996, -1344379142, 102242834], [-3400906972, -7279722760, -714302011, 1496727940], [-37292854832, 65805211244, -1976878136, 493502826], [577836322312, 19948290760, -2371256990, 3365760452], [9414657200, -42099818196, 5131028985, 1969203626], [-197850630576, -4620319308, 2573397335, -2783669506], [-693090986364, 35256427616, -1578437363, -1344432132], [-43413514, 17101263728, -5163768320, 813859704], [-747949134162, 29781995020, -3704388442, -590888126], [-461676539984, 20461294856, -11413943612, -126299640], [-211373471534, 74426445532, -2663486735, 49394270], [-619504902644, 12558398252, 9475727002, -837250874], [-978477582194, 24707065232, 5375017906, 3704401924], [-1290391969872, -18190873928, -3309623004, -449298728], [-2669177228582, -11601400336, -5715466720, 69418536], [-48242184508, 34945456240, -7971731332, -6707244], [733428621562, -33899913928, 10722601787, 6116485868], [1085156836456, 45191027984, -13086760700, -1593715244], [849944706922, -11355561416, 10130108163, -3688081620], [-1725407386100, 88097324700, -18187581025, -2322586990], [1052155784614, -49572669232, -170355628, -5614239168], [-1178279746900, -22281735984, 980641949, -1982921100], [-822166018874, -66356360040, 26508684, 6069910584], [158067467562, -41209338200, -3799776548, -3017314236], [-1449515287488, -15154028044, 1286618644, -3802290586], [680877132092, 41621644340, -16404670221, -4489439034], [715219721218, 27956092528, 1366806184, -2076004376], [696701833476, 97739869056, -28064271865, 4375909160], [133006242000, -38404472024, 1273621092, -2198481204], [-471126028338, 54737403868, -20285595022, -3351338490], [-1149565403848, -24263854804, 10791658491, -8397474030], [1534805350446, -61594139216, 2948702174, 1286026896], [-1393696875814, -14292761700, -7706732336, 11726940146], [-1676628504350, -25581060864, 24009617235, -3767239844], [2647505874748, 110608218516, -15939617098, -3627751326], [383152436176, 18285987784, -33647704216, 5724094956], [8134796567882, 19342079100, 2904784173, -6586928698], [518236131938, -171900940556, 20883133349, 3923074362], [1043106972560, 65912358660, -9788425860, 9114927950], [6483002513056, 22315649864, 11535594244, 12563214684], [4501726339698, 108567813832, -10851117613, 11343142528], [3777961402536, -21113368332, -2691223253, -8068464962], [-8258030834048, 119042792968, 42193216920, 6019696172], [-1710012752172, -84376841292, -64225560915, 10854851990], [-3278302122770, 197731909144, -22975482858, -11023398128], [-8866882368354, 22895997364, 40534066658, -6358956994], [1454213510694, -57431985488, 34250310684, 7597580688], [-6156862292758, -63795684136, 20550317103, -9574674072], [4156550692956, 11759657344, 67652297483, -5694716664], [6419646081970, 230230054496, 47133195605, -8081460556], [10265734526934, -63169708228, -11104368773, -5784197898], [3013011664096, -452330836816, 12551658614, -8358172904], [-3168181710478, -166271678540, 70086782067, -20918749070], [815222022248, -12666107444, -26839305978, -16416838894], [-3759176728620, -87992091456, 65000269502, 6613901700], [2228065956070, -366784371340, -61339123976, -7284351338], [-3407901847864, -90342369412, -25799105508, -20511575462], [-9867800655778, -40394804016, 66022666836, -10292557776], [-3560427420410, 327661660856, -88226346800, -1501360944], [7964853074112, 486432251216, 53185281164, -5209447352], [-4808021821728, 352689731308, 13119710978, 12434018106], [-2246256577170, -126311609796, -16521218150, 13821344774], [3934300819430, -8777015384, -108183719150, 28287975596], [4741703107268, 968742290916, -33766670406, -5931798494], [1663204306896, 184832624704, -37515464560, 10777445928], [-9143159040444, -440053180868, 54335843156, 9214995646], [-3604207427408, -254463310240, -148946921372, -4987835156], [-6852190117180, 359548878620, -67642244163, -11630407542], [-7449619749506, -630068289328, 45986757370, -41916864832], [-8404993578726, -409909651752, -40824727239, -17659666292], [-11691970002618, 255435909772, -18024147944, -14421394038], [-10602879135988, 122842332980, 7131122606, 13362480314], [-15733623154238, -332176066772, -170400712204, 14149702962], [-7310686273816, -92944689344, 140551464346, 40077446528], [-13798427037000, -888098821324, -36021011794, 6962057414], [1154345488338, 1058164536388, 75817407066, 13803026150], [579555327804, 878590757040, -142651381355, 3377940660], [-30042944016200, -128513675656, -96264180528, -9932420480], [-11439596545038, -236951886128, -32993597023, 44981907556], [-1378464561234, -1017927825372, 28512136507, 10437176482], [-17344594484754, -703273376984, 60301842156, -21548221148], [-9290035433908, 901941036536, 75005803964, 62972538496], [28605424673446, 20467128984, 75979523628, -18359887804], [11199048500396, -35729286548, 141454207003, -58710186694], [-7684792072230, -433943103608, 1631636932, -20782598252], [13308341887728, -471834993436, -76576201276, 26279720910], [-38624627434466, -301369675208, 111228274646, -9944125340], [-3997329309144, -641854732308, 14467714883, -69140939542], [-28415421005622, 1068265854428, -153146054753, 1061503382], [-45045408733480, -592708451192, 21332896896, 73538380084], [3268319362630, 879689989700, 447962907524, -34890180098], [12120890488328, -168661182412, 224111383170, 33973932590], [21911525887336, -647948880036, 22173128814, -53507994262], [-33331829796586, -115212672956, -162070717926, 46623653354], [-1912118449522, -134569486520, 74026771116, 59595686832], [-14285758313208, -87652687092, -47627659402, 67914072010], [-2431295073426, -47975807908, -216765625342, 47152645514], [3551973342926, 187468407272, 51886452070, -11855912440], [21273214882940, 1767845265568, 286890207439, -54655766208], [46355813964118, 1796458975164, 40114991147, -118149509946], [-26625016311848, -482971133468, -307411630410, 21969016342], [-552742811754, -1419728594504, 37971714992, 5365554208], [16159879515572, -245026518132, -264712120904, 22276493158], [-28856414735496, -585205827484, -288966804523, 70933165702], [59113372810286, 657766995924, 51416371908, 2845376774], [-5151798966972, 2585857168, -316732051796, -140041622052], [-55766981735342, 100278178152, -106870714693, 25872301236], [-13213303417002, -1233789653812, 29653805501, 44650148006], [-33161485080778, 502333392308, -186766810252, -108517717374], [18054829217330, 703369242496, 320169042401, -140541527048], [-326563346372, 1235290177352, 26851780983, -12407696696], [22409788336078, 311608500064, 150601163128, 18352405736], [-11604874387088, -480078003048, -625605919806, 10962410108], [-32173795579194, 532802911544, 457801443148, -30940317660], [-46077613187186, 2003201507492, -287365328386, -110111741490], [8230234954160, 903791106860, -328377335148, 23798748634], [52737126443850, -1346168749144, -64206505179, -105729299704], [16403741555184, -795753446248, -456935588982, -64454943724], [43699437198156, -325175390700, -110239727942, 197235438394], [-33357251819222, -543134821536, 82320362420, -210555133920], [79129491311488, -1116784776700, -435092304090, -33884063362], [-27413190729478, 1397250421940, 29667477300, -45312428570], [-37937218074026, -1478153273152, 53054373792, 37960029248], [-54898286175408, -3917775612, -98976395758, -16110604514], [-77130319907596, -2193994472472, 131615195303, -186350637364], [93806632093632, 2453331039136, 44195490150, -85103844136], [-9232320562394, -1163938236316, 158130686344, 4679806086], [419534030056, 2035795594372, -663806624192, -122928172786], [86612467565902, 425824941372, 504735209436, 75859493618], [-49717638067328, -1460655095420, 510335289432, -73076565538], [38085286442894, -1209592998616, -720474537400, -299168499224], [-8086888232754, -3262473102328, -9369336856, -167184066348], [24082149377456, 484543432888, -36817997358, 61010145292], [13225351353742, -5414519988924, 321729828739, 2551042450], [36784198534400, -1260707510448, -498030222574, -226667160408], [-39358059493380, 1151992619896, -1262315222465, -110004676428], [-53664316914114, 3468310846328, 704613953228, 169172571844], [90246050773770, -550633242792, -353293928263, -130310678436], [-46776953075268, 3216938071276, 216986491639, 226365898754], [11829485656380, 5161483833016, 345025954127, 15481589512], [133050461429636, -3582230102928, -253713318220, -130196237420], [-58580001022698, -973880019972, -357674558960, 128123731870], [63889450719776, 927157515488, -523928759558, -71981464824], [-30404120904696, 1442449437216, 891822421772, 93533757068], [58428056892390, -5937583963996, -647639530457, -204377495070], [-170073667507084, -321072925464, 287745404095, -16785313764], [144538271543556, -389121124976, 143067049667, 75698342868], [-28339884757218, 3200522244756, 1549606043572, 35513110630], [-56704483536202, 915898481336, 97080608390, 239642633320], [-18926868884320, 3862818179540, 294484149205, 146161639382], [-84805197970720, 2145290256036, 328404055908, 47374109150], [-37842158339428, 649137669768, 1605484482388, -84634294696], [-3629052405512, -319772145480, -555526981268, 167999274780], [58740538428604, -491852752720, 340951598575, -255389594364], [15238158011406, -3853910213472, -1395133947936, 182363897032], [79153588290458, -1995146323848, 288609188195, 472591507052], [61346184376120, 6465077409340, 310385471932, -403967433662], [-111118034346816, 3564189976488, 937620529364, 468338885996], [39773491641960, 2840931907616, 562777862254, 258428046176], [-194327887455864, 709603166588, -1136102761859, -95108608974], [98774916778008, 2984843635556, -971250948100, -12558552826], [-100652051017818, 7029093910740, 445642333286, -29690262694], [-171450306656914, -261730325416, -588821761276, -210488914284], [-17395845722872, 92304489208, 446146570616, 4117096556], [-237871132436898, 5382039052256, -168383903730, 100485944], [135593614418094, -8847505610040, -487139332736, -308407993940], [-5999076214208, 3334693467716, -1144490362057, -294406456690], [14567014785022, -1249633301240, 728802897012, 103939375436], [-89400250558552, -4127857549720, -1168532686692, 433889674376], [232332538703450, 1385206975256, -761458139649, -189405137800], [-2573206982566, -1219594991232, -1357494143017, 482691912608], [-202791959763872, 1163621586076, -472552202896, -33642117846], [-243558178517996, -1883619737144, 577617912518, -599810898176], [-24869419204066, 4663277149952, -155748792870, 339170613656], [-155487870546926, -543900511600, -35199681537, -663567400116], [-107287635959778, -638829608448, 639426543572, 444474088492], [-53144654653120, 7785259396380, 467134595872, 185456495226], [381704766867450, -4580537941620, -518905596769, -158426257914], [-189786156521018, -835419501728, -1975861666872, -123117241696], [78195369771564, -1999916831256, -1051063719400, 700469017424], [-327657129584522, -1775607091524, -1078885724782, -220021298746], [348014081425070, -6620680376444, 1109678346580, 185938024094], [-129218608455652, 10636990518908, 330338253518, 236389221486], [179833479774522, 1573208868824, -1631729447127, 246718774348], [30052905353200, 2073608989800, 504584380652, -187650606048], [-242021097195194, 1907697247824, 504166248472, 152237350900], [-103412678401300, 8869821852928, -417297421249, 260050415156], [-64873260878412, 858549407368, 2979792231080, 501328420576], [-50331582840354, 6056578202528, -1700127859164, -529758924440], [55025805396726, -11151423255348, -3298832757, 29559119358], [247712890358888, -19060634528800, -1301924098722, -403386129936], [38975812614724, 8143763946120, 2428875140303, -223100972600], [14670854579940, -595731441516, -2307272298763, -789165458338], [212436561769392, 3809488254912, 699606981512, -124392912936], [-157455748299226, -3443566341832, -1183246929048, 517849825444], [-13536844183676, 6760914045448, -612630812129, 246051881892], [-220130963989988, -13814419459780, 1259509025639, -151983711718], [226338998991538, -1614412923404, -628983109062, -655722096490], [24519902643710, -11087328956836, -1214486364934, -445848655890], [711176607253152, -8040848833024, 728211132972, -59034675832], [-342319760390938, -4948582963384, -470451921602, -526538540108], [-66534137253414, -14288345868668, 842818866363, 1080992200442], [-173235581158652, -6663607715640, -3123593260603, 298438329348], [314639408666066, -11894051171380, -1902597196164, -1047117046958], [-49983921728776, 289065017388, -749279558954, -314203961230], [-89619769202330, -10243833949788, -2354552733482, -357853444094], [-235173724787618, -22271668178324, -562617796104, 988484212282], [-729921875455576, -14754034724592, 1823934833550, -666775758152], [731151632458930, -9940176562952, -2011945351793, -286247870512], [545060737532032, -10177268387704, 4280704474576, 758573619036], [-189233048334268, -24072252765888, 186559707431, 490882728560], [-12392899586286, 15615200217400, 303072575597, -386133243868], [-418452200153202, 8282221343208, -1005375011312, -408810494760], [53217620301172, -15557629461604, 1301142213331, 268666458122], [-110496444132548, -3805492503432, -3128863268388, -1777073605384], [80140501158376, 18121072738652, 601854740169, -823454197182], [-20434209884622, -480969875812, 711222872090, 676392600362], [497748690135164, 16121022899276, 1666124706680, -283509747210], [-52397708870570, -5563339656520, -4096595393374, -196240976164], [-299144028939512, 17506882616944, -3142890266340, 71871714836], [-461962553877786, -5045347115496, 247747712374, 904505125088], [-553254593128432, 1558862267832, 1139274750188, 340075493268], [632527167035682, -3520270486044, 2744634816409, 37666862818], [-502018907987486, 1268299337456, -2028182341684, 316944153336], [413416744278356, -3704513194240, 5613200763566, 622570020604], [154364506758944, 1282678265356, -4360244326888, 760470349218], [-221816037931618, 4555684473436, 1712732959236, -1518539354662], [443208028065024, 5166040587992, -2317871819990, -366273342764], [284856320286884, -7138141757004, 25521505243, -360638595146], [625520148090578, 5570193564352, 6245350214745, 13847881768], [1002971954421118, -17858659700836, -549471538273, -351687402330], [-721216088837168, 8434899818432, 458126115130, -1043599889440], [-42394382117854, 24434008210212, 4524255827904, 100889137790], [593645183429614, -27990054601192, 2925205228820, 578360246852], [278044307402352, 5560700546188, 5344914297206, 462533452194], [-273599620045510, 4533805811072, -4201286399788, 1267726690120], [441425205654702, 4046687377072, -3390610769614, 343324123800], [-438955670360080, -1790306430460, -4144120827995, -111492446866], [-289514024260368, 12217508004224, 7503120926944, 882375293564], [-541961268987272, -4686092582012, 4021822164870, -366959829242], [-143058732097474, -4493345044620, 5910834500900, 1020579493098], [-207919828898274, 8921346739712, -10373446866192, -15851944584], [-221082812466426, -19577844471044, -140815117880, 164128505678], [543697750059664, 17266621912192, -3428259094054, 1078270862512], [-195206750685092, -532333867048, 989912274857, -39543849292], [241167354455628, -24140532945712, 4674582265484, 739605102644], [-222108658904524, 50668718936784, 1862899024967, -130903265408], [-436477167808462, -32776657580396, 1420015578119, 1110280862362], [86496432379174, -24260863503560, 3266125882264, 335195096152], [965541256690118, 25248396912540, 346514431606, -1044251638110], [-1418715319685636, 10395733601008, 926573118423, -1024745214140], [-261892531984866, 28443098630824, 6081314299180, 18550054288], [279759487364210, -10085880492376, 10309727572014, -203289926076], [-778429266846434, 10609256298748, -5628693911566, 128810449738], [-359712667951476, -1189434127524, -973776357549, -1825638711638], [-1350669348702338, -9786169360972, -6111371585758, 1146124482258], [-195720567897716, -14233752005208, -12572150417736, -1073369794416], [38173273032398, 2890670440840, -1490168550072, 2127871307628], [672013833623044, 14545271103796, 1630090697154, -869326147678], [-146140219759704, -11610081687196, -5550335862164, 1108623410726], [1288817533702642, 741073251512, -2158769706663, -547322418160], [286784665277864, 7805643930928, 9987164836888, 415585816792], [-429660473576558, 7607565430260, -810123816712, -669920295874], [-121202781372742, -27238396132052, -9421521796617, 1983426958982], [518750621768460, -37357336391952, 547523704743, -2131003182436], [-987933712265518, -39564670225884, 1955601469611, -630217632982], [-217798102472786, 3856328008480, 3884834854256, 2555510194972], [-807542682066000, -16045184300720, -1292132681406, -907493367464], [1525557915556032, 9728516528492, 1183986893900, 1358712175946], [1207749359248130, -22170807761156, -10119373255198, -557433439182], [-346113028518632, -18618309854104, 3166451445006, -1205406905620], [66653297227702, 11818499191460, 3650470028824, -2221708040206], [1147824418241246, -35542404463176, -10801610615582, -1340679810212], [-4738709488792, 24898006800788, -7814215654162, -2575680440618], [176034257559736, -9531101950412, -6355412244073, 358427449318], [-707979007806248, -5728480655208, 504660758172, -1997154622064], [-2175617655659318, 4214649528188, 3290098434130, -1124059935470], [286783592714274, 53442042813128, 1493742144425, 1864265832368], [205074779474328, -37195898020884, 11285873509484, 1466139477338], [524310683480534, 907795642316, 5409579668695, 2989128273054], [869402917261856, 44586297143652, -7835432251361, 2081012784398], [-619695142684560, 23570872210420, -3304072765578, -577582126002], [268930406448048, -4512545622304, 788753731968, -1254747931752], [1378756200907418, 19307261650084, 2864445030537, 1455112610250], [-100100473452112, 44624234804760, 10485832916822, 1356123305612], [-849580358515610, 56911412494104, 3996992768676, -1037932534144], [596811731335440, 42508015782920, 3764999209204, 3410330468172], [182216932010652, 29915741261700, 8587121407239, 4722266532942], [678216346462602, 2776184271024, 2060162658943, 4743710029568], [774298492709910, 30976685664480, 5811313510988, -335235289392], [2046992482828810, -57312873488864, 5739302801851, 1226147987280], [1454041131141862, -58859437838168, -5534428942696, -3230883665652], [-453765044712134, 13312713194760, 17044854412792, -3517357090508], [-1955647850124232, 3376717332368, -12050637831972, -402961017392], [-104844838844910, 14795289801624, -7197252927888, 1520153467012], [-1740724642200296, -37530872851388, 5426258385382, 509165255126], [-1475425911709460, -68204856354112, -6824874353933, 3371518524452], [1002353115279492, -66595209746860, -2879238409997, -67588126562], [-2514058741200438, -16853979632368, -7773964293925, -1851111474324], [-218800656696020, 14129403414432, -9288901649060, 1090077320244], [-1636941299543836, 21400695896088, 5613069196317, -1583983873144], [427609762726862, -4206667223844, -15915865552749, 79601529718], [1802761317068258, 62580806711672, 10605042952173, -455210618096], [884351436808128, 87789224801604, -4750031877751, 1411454041406], [239931826513424, 68047180783928, -16902250858340, 1699889353944], [343491909689940, -18444872035996, 9624023962371, -1418416036690], [-201944208237310, -89947744360608, -1054587704590, 3627992448632], [-86501494157448, 14531712786916, -4780528694414, 1544563169254], [810425175078326, 22433129675348, 1284586955276, 3223288796046], [-508148143202312, 16983703531828, 18971385189475, -3835040179218], [630250912550126, 3894620420592, 3303183149004, 172922551984], [983766944613094, 55022377591452, 282073145500, -738727902158], [-1076556576448262, -16580571851944, 392918404602, 3951742982372], [2779168865770440, 39887056368644, -10960852219792, 3593262699022], [-594089213355662, 44193542262000, 3412360713173, 5484107879080], [-1184737299400826, 15405445122312, -2012118074842, -647201629276], [-1408681971964744, 15490105395704, 6246862984098, 2737257973284], [-2238329501953498, -25987982172440, 5969016832044, -2700082589992], [1028427821260342, 20537463150420, -6527912531295, -1710908551550], [-32072194151552, -105493323755288, 5091066061172, 2530636481656], [-349533037856856, -75586849712288, -8846141173796, -2546529655088], [2512517617618994, -20881804571960, 6071924272369, -340355559772], [2489728005875862, -38350199093200, -5304581706428, -2572308137636], [-2507390437572724, -39778296948060, 1454321453044, 1334576465778], [2360343313786964, -7192691482184, -20935781485064, 1689644497896], [209503382621546, -2491775538988, 5606215816714, 7619098508294], [-1166994627797858, -1241415875768, 21266882516778, 4346476176692], [-83871297810028, -108983958564524, 9135879936891, 1621087051342], [3066480028106064, -16964219848632, -6950339096384, 70541338660], [2804689999415598, -7837839053360, -12330669053644, -6736704257708], [662730708545900, -40906635509352, -10708873345457, 4527634435192], [2667862833920786, 25999563242228, -20674407516921, 6646052378362], [953548364112550, -6316674524944, 10146676419636, -1471694850648], [-1113833010478776, -21144674586184, -6421923895402, -6390316421596], [1397365631867136, 117798702719288, -5227021679848, 7949431192060], [1708383479368442, 50475109815824, 1350085620115, 24479253704], [-1795248120534790, -36065260868944, -20153508501603, 1838991470676], [-1128693399556724, -45342868531040, -463368646456, 7172513512052], [4997528291596378, 46336545887464, 9802584705516, 979794186940], [-1071820424130736, -82585861003452, -6133054630386, -5482518348258], [3901141106414528, -59011110785076, 92382372690, -352682238374]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_245_a_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_245_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_245_10_a_e(:prec:=4)
    chi := MakeCharacter_245_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_245_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_245_10_a_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_245_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,10,sign)));
    Vf := Kernel([<2,R![559840, -18088, -1708, 19, 1]>,<3,R![264777984, -893592, -41895, -18, 1]>],Snew);
    return Vf;
end function;