
// Make newform 45.14.a.g in Magma, downloaded from the LMFDB on 14 January 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_45_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_45_14_a_g();".
// 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_45_14_a_g();".
// 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 := [52534656, -86616, -24774, -1, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0], [0, 1, 0, 0], [-12386, -6, 1, 0], [8292, -20494, -7, 1]];
    Rf_basisdens := [1, 1, 1, 2];
    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_45_a();"
function MakeCharacter_45_a()
    N := 45;
    order := 1;
    char_gens := [11, 37];
    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_45_a_Hecke(Kf)
    return MakeCharacter_45_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 := 14;
    raw_aps := [[-4, 1, 0, 0], [0, 0, 0, 0], [15625, 0, 0, 0], [85614, 574, -9, 1], [3179418, -19666, 215, 9], [8598524, -57956, 86, -14], [21082986, 55972, 10490, -146], [-33208804, 1013028, -934, 110], [262160152, -2555576, -20020, 1308], [-455696182, -4256216, -229660, -916], [865942324, 37499784, 40508, -5700], [2046725752, 111080092, 332518, -8462], [13566001904, 195498152, 468020, 84652], [-12049358136, 24715064, 586636, -121244], [50720026824, -384848656, -1504000, -79800], [28941150122, 368701552, -13960200, -139320], [221211772922, 226664886, -26655765, 289861], [117948477618, -3959497096, -2117012, -345020], [204954277284, -693895276, 85744986, 280566], [722364312412, -2948032844, 36816810, -3840794], [-310324409258, 5672669112, -86672532, 2419108], [-888776875356, 1444827192, -182718876, -6911260], [861756053508, -5949566892, -183895350, 3219990], [-584079489540, 13555355880, -103670700, -4674420], [2126064378594, -40487708936, 779331116, -825084], [-449168642582, 14895091184, 844118840, 23467784], [-4509996474674, -91005346314, -231165821, -5986651], [-1625605221916, -84938348772, 1131923710, -9168334], [6052643466738, -204195750192, -571526104, 23944600], [-15864456323178, -101936767228, -688996150, 17602110], [-9539725497234, -235051151034, -2926821941, -60599811], [-23767722773658, -295950703654, -1402374915, -101372429], [39378847559830, 29889207820, 5351256350, 141834810], [24713836706852, -5476240828, 8044854714, -115695650], [47465909321462, 1261020402856, -8538378940, -68287444], [78744494631072, -651639214964, -8225858, 264574970], [-110533649467220, -584387048540, -10599320390, -128125970], [83937608968380, -1949504324660, -1507169050, 261571290], [108439010937184, -867254863656, -28926565900, -187677740], [287817667822690, -2940742127560, -1001144500, 457753700], [291490303946906, 2842086767478, 16318222155, -1013832347], [-161710074240398, -814626691584, -2767586048, 911006720], [140129218208020, -857550575140, 37098394350, -546268590], [40002586663830, 4198824791200, -27350762320, -1333500240], [-55548613976354, 1980748874712, 14407378940, -190304876], [-67694713763952, 2523871616788, -67438705694, 828212150], [-131131257316164, 11653067020396, 16022225102, 444683850], [1084549489613654, 5474206506094, -109132371009, 69842921], [388714731758064, -697628455672, 18900572260, 2388086396], [-227417426255138, 6472413308072, -2733976636, -3661951700], [649707176448010, 7281186567100, 107977731350, -72639390], [2367720447798684, -10672039186508, 187170384170, 4556170342], [-1527329427087754, 7029211948576, 72217213712, 6745846000], [1794611035624686, 24398812099418, -165233226195, 5226280243], [2116431431596086, 7496312293396, 113380146450, -14940025930], [3025582618101792, 21342871530984, -467871427220, -1766844212], [4511402672407554, -52556338170648, -349510349980, -4288092148], [-3003669771162664, -26579909744324, 394840807862, -4175664350], [-4859640109296296, 38055029896724, -345639042094, -3145566794], [5982392035891340, 9627931047320, -167966411300, -6021211980], [5563477454830980, 81367260789060, -266563509390, -6531654370], [8074866602551678, 47412195187976, 642593428820, -27336033028], [-3110455095125152, -148391565227312, 342584601272, 10855829272], [5197324082486428, -59925793917436, -130776836110, -19543323586], [15698101989704118, -111982293152112, -1349373839608, -12199260488], [1175877851929790, 7614796361800, -253116381100, 28670504540], [-11077147009429732, -162518878783636, 1210419525358, 12514025930], [14033954405833774, -69680584869576, 2065108448076, 59389389796], [-10858990130391584, -8424661622664, 974711829100, -62557380540], [-12056204051253638, -87341318139048, -1143646868676, -58045721900], [-2031626248975022, -125686118535284, 3177674896670, 1640162682], [9740990192177528, -108269559984136, 2677696448140, -111903447036], [-32480646024722762, 356485483715558, 3262458445547, 5383468717], [40965343526931380, 247098992169940, -3081130768750, -14930452010], [-24395691637650876, 238846168763660, -363391200530, 39595065850], [-23938983337694888, -229628336837736, -4320646755820, -92567624972], [-3797776459129858, 418178753587696, -1062723268040, 45648581896], [-7624984860606192, -223546282999972, -1754599818698, -92151524078], [676263964263148, -583699138666176, -1517514831760, -170707417376], [62670522071426826, -172441673189392, 3016361629976, 211825258760], [4975622207528006, 1246932276039778, 1188569133905, -4851097297], [-45778999419599778, 388844077322776, 3020065570972, 316600245620], [46466859739151888, -745394395090656, -4837775358560, 214395567344], [50453234221676038, 219088816067048, 5542090239492, -91735661428], [12917804967492216, -156443578230340, 10759691403670, -363279326750], [-121849515272082712, -317542460867472, 1473995011000, -31814332600], [-54318647852639212, 330140290446544, -3756765721560, -361139748456], [13047925783116922, 227110895336552, 2689659071268, -475325232052], [-278393102561828354, 11507346629448, -554882783020, 61020707548], [28277820891461746, 725136947891346, -221866483471, 429317931159], [-32421520524083284, -186106481841684, -7842521899450, 49200960330], [-254558512094098964, -325174523655532, 4230033599930, 140005340918], [55817818459853930, 1768758606926050, 10153225737705, -321882040465], [25103878904172678, -1949384647882086, 25327821868765, 190163617939], [-93361684424683076, -1561819103554068, -18250843468146, -112536328310], [-73483114483766360, 2481552749508080, 10917489477600, -502731606840], [-169178657404797950, -258611790541200, 6643186831000, 149207277000], [-122352790134883220, -1379001784480160, -20556067767600, -1225492992560], [-84003512513974972, -2035675953021292, 34008468815162, -460003607178], [162494023619104346, -933036685233024, -43113872926688, -554319694400], [88475170943353048, -1664889342490472, 12504774071292, 191797827252], [427479831558467450, 3688942457064280, -23961701435300, -258365588780], [269712816682141688, 5803256205237696, -22803498871280, -541288869088], [-102207348803194348, -827702763288624, 85421576184760, -1291320274024], [334960965243365132, -185787239130820, -38884833721290, -66320165150], [312364597139364778, 1441559831234408, -73232063416988, -213500639028], [233173801102460884, 1325240272479468, 72712867510310, -1743416808374], [622750042290865822, -274627414232268, -60512158806750, -396882636250], [476448003309023624, -2729483330087288, -76342274402380, -482292581188], [663676870367611734, -459043430845136, 49729746755768, -1523709000600], [680347591183092906, -2533268322082694, -112681351464731, 694610148899], [-225066249387147448, 447527150469772, 161289547114958, 355629714298], [-615892053060792526, 10155149455008668, -43754087847290, -2381776769934], [134929131081453828, -4562797917144572, 93387146974586, -2694418939650], [-202155833734255828, -2281699337355680, -110538078844360, -280107412400], [-919570302745777736, -15483867406681368, 128292844978820, -1930863764468], [-1130200859324277612, 8133019144853748, 56640907304442, 3627813588422], [706714405279143240, 14481838822723760, -25502906345200, 1936651835880], [419951876049925278, -379455147887712, 105663027194800, 5737195647280], [230886515228987102, 11767336749213026, 225100089020385, -1103289184849], [890605675278538834, -261804592235416, -38864852442492, -2383126270900], [-1491473460264833810, -1227643239713240, -156266391927580, -7149627178900], [-1010888392723135914, 11497127237811776, -39937004001600, 7033646710240], [1527654834220268628, -17965369312315804, -125552426037630, -1454910378098], [-851131898722750276, 22568593685498004, 197000334014498, -1287301314250], [806860848587395706, -22547723052656272, -142376654827720, 2118291648328], [101632652878720526, 17539791698208408, -189852444755524, 6492693419060], [1520741375379538776, 37126643142444088, -152360873287620, -5595999053212], [2832407414389566554, -3358046446460686, 345592805289201, -531753748889], [1399797308886389840, 17906015214416020, -57752524399950, -5085392238730], [-3471728908732295548, -15897683561012428, -11217203516686, -12270350353050], [5254201369810595240, -6457422671647320, 168304689785100, 7712801815660], [339565865909364252, 14014877057662256, -84392496564368, 16528476962920], [425362061978793096, -44697855940025484, -94757581653086, 1966081248774], [-1599184431239157916, -15701216274861408, 55507416851920, -6278451062608], [-2054964767856142706, 3437156962808032, 128543522217904, 1509898698640], [-1654179326578693898, -7155346604515368, -314687902005700, -4556467431020], [-2825189790066651620, -16004667296152900, -76627688643570, -18138050402590], [-2949855781900244926, 49690217290198008, 131115347930060, 14372991769476], [-3976121330832580856, -51478232434213128, -374556070677780, 19924134247172], [-8032777520590140868, -741037681276204, -133852197665438, 12290572834070], [-2483901512760634990, -35551010461103320, 820877622355300, -4534287654420], [5841006086937088354, 26239887011260234, -12711489878339, -8327404455749], [-2673910823032165304, 77203243787624696, 629611071358300, 4005054456580], [1747695459859585546, 109172360392368, 176295011406296, 26448379061160], [2874499785988695680, -59064447951536160, 570584381878400, 16261288029840], [-3765777586154374392, -21424720141373732, -767260531446378, -31818704839598], [-10607433088806390406, -6161689278334476, -226449906436350, -6190533214010], [-4746064931540825244, 32568147429086540, 205724180899630, -10529616006950], [2565002518386296560, 41694097710766840, 668287174409700, 19035131802820], [-2019171023212653420, 19724902909425540, 424923716702250, -11792322257410], [-10492245498314075572, 39820562445990664, 256674893383140, 22598702877564], [2693947095128456276, 23893803199644036, -81002342908446, 22553259368574], [-1817883968688500616, -44189901909407936, -1144516678140600, -32916945806560], [9302278018854445288, -5018803089111192, 877094925917972, 42426442015692], [9275313996668726512, 86200735173135456, -76840854921440, -18238738893744], [-4082053449875664348, -46284579801341608, -406685731893596, -43857256352300], [5889362494455978212, -36329826954968944, -204599737940440, 36086866524856], [15982227034097808618, -23335051223202592, 1197857234342352, -33893477755248], [-5133764896855367962, -122388300210669056, -1376833581194560, 16677037862144], [27159210951688889624, 10331723323118168, 540406942122460, 47589930037716], [-13827884227810140338, 98271584494397324, -301526640495170, 66121357354618], [17743793468364197486, 148618865217774486, -141397789917261, 66757645203669], [3881208133903959494, 9288530081173922, -934660705876655, -11572307415153], [-12053637526647172854, 125820499034154772, -1262905005888910, 69008290543414], [18201573284426703192, -109433427322706968, -810451611141300, -51903724697780], [6726619506496684288, 242334708231824524, -674864601029522, -43226894977670], [20894717148906284012, -46280189318734268, -718386114694502, -5783832187362], [2203870850352576838, 159426514259252208, -114995818190504, 59054193960200], [-17991728175028536502, -176222104999024184, -399416679326380, 21875258084252], [21806100371417478554, 53789861685164902, -2007334090116605, -19697409522323], [3225258337902380758, -79619173037833056, -378065302327632, -98206232048720], [16396829101638660552, 65123860647872376, 3961930982743260, 5852066919876], [-13044006578128277666, -104982974911692016, 2654366381203016, -28191495363464], [-20990701362691130364, 72912145204800568, 912213897590596, 85991295871460], [-17970674644413187988, 108705288833034856, 2318722975643060, -40472052622644], [19430106626417323068, -306419551824611220, -1862621337030690, 46612853736650], [-47558715909345801154, 335509710125683448, 1616998273799980, -1816629504252], [-25362236647305321838, -157786361069819038, 1162498646336313, 91866988491823], [-15891061779414401306, -304770538072845168, 2884795632227304, -90524524978760], [13508330167251958586, -310465248521641294, -1619907271458351, -153383431429241], [58799478742667122606, 271286056326923978, -2450970275573595, 54089941620603], [-16705975568116668968, -35470889209058268, 993832002807018, 149864916690478], [-33411515116793040330, -85224697135075660, 959814858098050, 57536036726630], [23758297277301177632, 321073338491649744, -2951134845711920, 129734933975768], [-21983098575673473178, 28141055032849536, -2293191109184640, -92473869875264], [76420686694108631492, -12595849900179108, 600500676821158, -4633333692782], [-65939808890566369172, -83379671985838372, 4927291248272622, -8284472837038], [-10836379858032698538, 184961401646475872, 1067413974694064, -123893747806000], [71014938317128367004, 285245518223674452, 4635294184449770, -126168612360298], [-45721820397130613234, -360933194825897984, -732615352060416, -216283047822336], [81798267943933413368, 336791558364352728, 925969389858300, -90505896384620], [-10489513403547541156, -7884406621808356, -1206582173786522, 30339844516850], [-26625283408614208530, 1134661495852237160, -1856551298359900, -222548502629940], [32956604283619325716, -445451400583451204, 1208865447842750, -276337425352350], [30275882136069836878, 391607229268724708, 698292652685850, 206828410184910], [2599657133478458946, 836144125030960656, -200779566466328, 66092491563000], [-31384125952744236260, 149170645181795260, 2568416891766470, 383973221588450], [-58803291553706880114, -784416639220804764, -1179369173782950, -223152197667570], [17181141882404679712, -288678509856439328, 1325835295185000, -403347049463600], [-42341178114504020386, -825433427362851568, 778949308469320, -181775388588168], [-44978509899412486156, -701941535661765536, -1830423803322632, -1950674986800], [35527346334435562164, 878222773571860444, 3452542704571926, -245888563660334], [-142755638323948018738, -406865780270978448, -1887691715276776, -238837844947000], [-7517430536866073446, -118818321967632098, 9206792077350895, 53936895580177], [-37808018454338257466, -732545365518022136, -700890301845100, 444015349692540], [-92125166253517251036, 1252660664917017872, 8556142202780384, 322566132264440], [-84934722552054801688, 682523538769091072, -5992947293202000, -118165037478400], [-93834015994968947156, -767930304839753928, -496948724323780, 320643529059172], [-53270566604032337028, 1180105487063623716, 799097799847802, 35132732543470], [-329244842667533570, 1145880969922046080, -4583756481632480, 255135259107520], [-102555398021658474490, -931577263303035720, -2375316983091700, 133738298770980], [117762321826106820566, -161679716780074594, 11328893464739479, -269631606176431], [-10743375346035680504, -870996681861934408, 15238015653170140, 162979587620644], [-71217842420318791428, 721048213375510436, -515175430221390, -371011731696914], [-103862708419986506478, 598707898373408976, -9180488680873528, -126194917560680], [66439517607168135302, 2191745375930086582, -3286637501841037, -416089238706107], [-44864485349378382228, 593831318332583936, 17253876801525360, -215927135022464], [60008815419579405080, -720311884849123720, -12368890431653500, 367461303693700], [-227610862077270422, -996282884622578152, -9252054943171300, 49254174741620], [-112919002799702038874, 766940408340930616, 20569334990983692, 116538403270500], [-156072099978879794936, -1084585264715920500, -20719833243999650, 651190517555450], [-47833966370888460264, 2239861881988684968, -3932595691415820, -810099504162132], [-88170373335428699534, -475648948774857214, -17567608379144631, -832299258028321], [95176307042918042996, 1044145657428682932, -3028589384623510, -375849026331546], [-141386885489594154842, -2271020270922278592, 4791958138976896, -90216146480800], [-156248044819351569778, -1162712466394603116, 4619445286753330, -542574435075082], [120610467564304494088, -427775818109325256, -12585460470561060, -363941955283356], [150201368684503393658, 796587330465244218, 10355745737263397, 659111943401027], [-177972597178781046382, 859773101878420334, -30051104111181785, 394417517599209], [-108406919882622397428, 2742318905899436332, -15692157608100642, -174066095581142], [-69552899868977283716, -743357205910289868, -30938624948595246, 502307200569190], [-208684436595138066744, -961086964014013444, -13918041894250378, 201985816218050], [46406406891147739556, -4161187354106389272, -21303572903276220, 571306862876428], [-22207936853401127972, -1265697809199261972, -8819358145661978, 551490665129162], [-136469647386623706224, -555640505379584128, 681923804521640, 801685741276544], [-285788116092748672062, 641850034696227088, -3926254304037144, -745365913656200], [-109801873812778566058, 1338756492728572624, -21251940755404120, 398120332663448], [107029894556090748378, 2336541515723071214, -5548678839302985, 1004122235714089], [-188287077763430245956, -823092476271090428, -5348572698642030, -528840141709378], [20448248967374266992, -203729539853992008, 38626186644377100, 1143540860490660], [148566961104962509988, 1252235433105452820, 30760972254437890, -38173169760650], [7595699611192270130, -4338575280726556230, 8470743766902965, 213998929043075], [-111649506298511800774, 1236061135613743560, -29042776873976780, 44853122777500], [200461439981599602402, -1072886069841053636, 15074278346299830, -935172247029982], [-370937001526323840740, 1114383058548042580, 5916837618251050, 1208574442321430], [-139282259008113463962, -588718832275224282, -19656913542621973, 149248971700237], [34505984627150771234, -4737606770768168658, 16843970598572295, -58387901230583], [122830776513864497228, -193476997758065812, 61011766138263006, 90953797285450], [46029519305151536920, 3133919793845020720, 14561301810796000, 281467318053800], [214889206484451428640, -3351265335952706540, -44654504586068030, 126238943204150], [442414086965278957696, -2087032766854630752, 5779959195310480, 665728535760048], [-196688532471917778696, 6205203387931022744, -25617057226124700, -1536564907764620], [-145080944351763215246, -4206739658190567888, 4448676363187064, -166915634535960], [-48618266287712344958, 4571128358313881824, -21578821180359120, -1229838600087152], [-167621630742604750082, -3639767218918565966, -6973279189272535, -1602587658744441], [44509337230925619458, 5506479952364136080, -60804478966568440, -796105269001800], [174364019945208269164, -285666758512736116, -32860813380692954, -413732367282054], [673344206222483755834, 1475159539842650704, -7877816447011000, 1585841591165400], [311121496098136546054, 4446928806213248344, -13822938140572484, -1685023853487404], [-447583750890076310226, 8037687765165247414, -735890743344029, 188258819407301], [344047994494835663744, 1200485327408357088, 37165654335608960, 25763716832016], [117896186608102652854, 2814579800610400840, 35626149323159380, 1691450312619100], [-514634218042645047152, -1464405866067051732, 66074668284502862, -1205781112018518], [710944064103892652326, 6165377020797222876, -54077742400663450, -768041735665070], [-233763295129106503596, 1547530571375214452, -56226462682572206, -3302252572692410], [483021408214617360086, 1527980865116764368, -50524516584667320, 1563550568892568], [437677265996907652696, 324515592445158448, 13377168150141480, -2909662137024152], [-558580832669228294332, 3331168820451472628, 11658657121873962, 2088268442268742], [551806086517221154102, 7870670485661251552, -12582336936904400, 1438056136927760], [-593170343323309093498, 1899799435347989136, -88148849223094008, -2257694140497480], [-401478401434258927696, 6844680861701210624, 33738454953665456, 1332521440323456], [-684511148236891249138, -3663076434211506208, -56535342052600272, 2160253463649808], [-1105287041171683260548, 3218386421773801952, -82803245430035176, -1034573871916400], [753325877877883776302, -3006123184089614448, 2048173350208648, 2711221327396408], [218754820118315277126, -3877086797771038274, 54755675455715399, 810585931396929], [-176106236199482432944, 9973253341916603032, 115530287683089340, 1463836079565364], [-127517328555553115486, 7844795104453852360, -34898141881132780, -712215589929700], [342837402187715497578, -11359485032719900336, -51830381159172792, -1646172652753320], [-880834294862957767346, -978676552000540798, -56412428894719855, 294868939693727], [-906981584760232625800, 4037836825014961560, 48539657897084900, 2864809864474740], [784566764338897973944, 4953548919875871964, 152814451745036118, -4348615359125550], [-1165568713019691164184, -4451182343266099488, 35701229378949640, -3423917847223856], [-102007241755070310802, -2205529275259424080, 177228119082394840, -2340142993677400], [784685790010905151872, 2377986311014792192, -87515667528177312, 707995342774528], [-2347833029678294426948, -1200580322997524124, -95091764957722990, 3402439142170126], [-37590985261799865398, 9222964458525349152, 95710780987615248, -3062137723355792], [752017867132048582534, -6541209870990943856, -78887556673137400, -2597100168970440], [413604588890567066144, 2092530986240286092, 223111264686636174, -784849811093510], [-172752975764448705824, 4711044381666569088, 38350125489520880, 4069778212074688], [-35283857804105356162, 12064290687364128944, -98840743899107560, -2138819426964056], [-1812680328979589591124, -4221757934433998844, -126435209590910750, 2329456095202750], [1796100112718655182658, -1371478814074197012, 196163018547022350, 3952076436756810], [597504989531377759322, -4062802287010000714, 254521429587012235, -175047390638139], [1002728408855888576472, -11045913187276450548, -121534096587824482, -1050333300408902], [474916209662335159558, 3328984093385725304, -29080624146261460, -6697320245595196], [144966345063852043556, 8236254105520992496, 169417418358361152, 602924614545800], [1583691906499040900058, 1122485707598080336, 35300594801696520, 811570045103192], [-1813823652142766137182, 10743725353269397334, -35298196878651285, 9575326771873909], [-912434883851060659792, -3986990325550646832, -39661653570404328, 6591635347360152], [575441642471270791454, -4821181568271312256, 3475184799051616, -3008952303690304], [375877532837299079934, -7421591384070993792, 318836204116420160, -1811823884313664], [-91137586717991235304, 3281065867482855748, -242198006658124294, -3552480294033890], [-1238487684623507562340, 7666884576205218260, -229652842199807750, -7196680934395050], [-857557117385444225684, -11155482108233755484, 136453248599257242, 2939941475832750], [-1578828206581261426974, -19831639890431903184, 166859492632430744, -5526213403073816], [88270253748478685300, -13481243721100609180, -318461191029771950, 1040208394892430], [445783713686832051366, -4856752737833005000, 257446121812261100, 1054346757913700], [-800881917588302866724, -22565214483939678812, 55494781364554130, -4361032455884562], [4124953837258449026612, 9363527386787900452, -133016591494058342, 1456961839778478], [-757374598467635180688, -2164109847135619048, 118570857012587700, -7888948730667980], [-3009685194315580863606, -14110197912715174328, -78175708757028780, -6592398372990628], [754829122233775707164, 27870833548978348032, 148562972207354320, 4398954068316032], [1033205821420923009592, 13434146248852199672, -173653952213086052, -518702940222972], [-591886376458961650520, -11336574818159646120, 382971400328344500, -3022583760155500], [2761164739344190263686, 30462350487370413568, -283387289560439104, 4109106339554560], [237894876219592498306, -13474110746888401122, 379785605630842655, -1252916725924847], [-429380703394369166172, 27812458736920949964, -165068508350315610, 8167981816573914], [-239246207947791960226, 37917157815221182104, -140267685865425284, -6131428010724044], [2566422850493695482952, -10592990091294865824, 329565614661625760, 3527573081712976], [-2101359046390621723444, 17383242999928020636, 348258028667850582, -1164515599375950], [-2068864874774557239258, -2533058632950061488, 87991065441164168, -1832491391959592], [-2780088841936615689294, 22422994639784800128, -61597931509570720, 2434244717956928], [1450893039029001052146, 25637895292090362106, -180371274048658091, -10109657362395421], [2742634291947465083050, 8860918834182829620, 287527319040810050, 4183163561950630], [2103164914567110426038, 14566314423070682384, 191120718841753448, 1773819708725880], [3394156834341320826868, 11243606139033177548, 223658256513980926, 4487263982938650], [2347797419927543075152, -14007527514904074688, 96783771914479728, 8685531313605728], [1355522072470788220624, -1152192866731440896, 299794170370945400, 1339485639147840], [1420278008788445078362, 8982530538373545704, -15666345951712220, -1557217199393012], [-3629610297133916758066, 17447932400622796504, -451596207171358052, -8300545664069100], [5024014359772350269914, -22396019391052951032, -87367839757380140, 9173687146629756], [3611715005939451086996, -30621846025337090992, 186732964281605376, -3628699599568040], [3853419595004199083340, 6250817300617044900, 227054277901079650, -3080323394533010], [-1376662089367017581412, 44358654510782901004, 261594502453393838, 462152572849530], [1055504802825170253924, -28004516610095683372, -257799111710546390, 886571262088406], [5051846464555750081662, 16987092153364132432, 417343783815014984, -3180714209634600], [2300395225361954723818, -57762769059160437284, -96936053208531930, -12401482503701678], [3910021070645085237002, -20053577159663281584, 417458533574167752, 15140289077071320], [-4882349371184038146354, -3192309111955573274, -134253759364984581, 8558650555268269], [-676733561319190248484, 5780599863020800116, 364174814289241634, 7932340983732614], [3405256588098480704074, -10994192228743544396, -474892272706744350, 32381030850790], [2423224876390155002322, 33105221779730859536, 510902359467120360, -8700693223712264], [3297303358188599635352, -16132916009302985220, 113085630252140710, -17083297389583550], [-3803883805322538372782, -13102586689938706752, -662481459882418400, 5242121672000160], [3357575977818093598082, 15783948400218510566, -1207702818122121965, 3139274041735341], [1584069473441871957742, -24664941940082522920, -355014411464163140, -20369872690910700], [-2242533848660411902064, -8479191748196705824, -475890000715332816, 8038395079134224], [-1934615415323325782652, -7115193830404430676, -276788268731720010, 18190094344420074], [-2900701326492937876614, -41437723549980957648, -119531813993163560, -2553332958551576], [3932382629039451925004, -61010545472923229916, -457146020727208742, -24834464098581650], [-3433674678323668649958, -31119978646870306168, 489735929143527828, 2845559273676348], [5453882913020615292978, 27749136952021055264, 195648032029230640, 1746780348305264], [-533770160071518102954, 33360366882584475726, 1071438841943478319, -9518144842663431], [-401390982329170138174, -67701668985833942872, -83344242649977884, 11444351381078060], [-7381465768377610278382, -1138516622208087492, -62123669561278250, 4299554404623650], [4606090351364822826256, 20177292434819276528, 499649224520948280, 29128398440552328], [7670440767160251219690, -34115397319324077130, 175110404162076075, 20282264215461445], [-4524049978300702902626, -49610794483415502596, 199285049923064150, -9928717816507710], [526636782513407827488, -67590727284023646584, -9731529677678980, -8286298195026308], [955777046477727792892, 39074570709612973172, -81946487626775502, 20779941765039878], [-6853634793165467135776, -86747440038501651088, 1146688579026150120, -11114917057759288], [-122509457638049303584, 41714465782250332256, -329344108867220600, 29373001592484240], [-3212311889064606543942, 27078759143817098654, 573489381664918415, -18636029090362671], [-4221679839286890410956, -10646882143629222316, 791109918384308826, 2141868892282006], [2782243957323173065026, -43340257489962728904, 934605941011252684, -5532437715532956], [-7942728272420022138430, 70954633386958874240, 557259075894056800, 24633378555026880], [-4279117290345281385130, -69216798620259200330, -829946876226696845, 11610021778907205], [3955193681100243140102, 70722235907145202496, -404844477783989088, 26571138604954720], [-1350876722141826496174, -39199524267151764762, -82014560712339245, -21004941312591187], [6114801543234561332932, 19844822852934375292, -452517655329341146, -11645626828690750], [701073353562425571832, 29596430460175956584, -395073221444914820, 18602554218630028], [-2361715438474783827078, 1351009787978901336, -676782308082139140, 22556198872494036], [-4136462901692452097048, 108249335890727772756, -201865631502174718, -17200183251847530], [-6263381875371196234304, -14064978927519309004, 161471640550405554, 32900275283949734], [13769079471128894895778, -83998216236157881786, -410057946547719485, -7026882601003011], [2408036003831284018056, 49264217243418526328, -316712003540903220, -1359169083418172], [-1223050330256509934870, 110852426057258869920, -137676388038314960, 40282604942990000], [-10561309421050302746828, 6749347124704585536, -482099955801420640, 28904401801546336], [737611417246947831234, -36597598623643120016, -402554474847816584, -45127740904164664], [4794393770019511083438, -49140152839814546856, 610283770018734940, 52825737957333844], [4305029181199787608878, 81241373959819544028, -875558043215681850, -28958568979105710], [-19608764303680132249130, 24439416885560282230, 373575089435158035, 6099408714989925], [-5477128184574098909574, 36591558650863909996, -913236965357949650, 19822291428953610], [-3666899544210527544716, 41942511643198290732, 640007304048697454, 39784354484067690], [920626061098185181728, 89055698020876362296, -596101222356170380, -18188268991200348], [-7806169676918175962292, -124793307514429846656, -18423054021360232, 10941168107836480], [13897262961077350146744, 6794224189562991524, -1678419795176707654, 13896751206101486], [14304071367398119799944, -68872229804501428536, 161760459767212916, -42930394037226084], [-1375771783962740076080, -33987506314289215200, -1102930569585581800, -8628913486502480], [-1360165608087666335442, -6468035961180847232, 526603836242068416, 24229128398401600], [-10549772580420387677262, 28987204884543736376, 949894563216521420, -1886088559936668], [8689456212065497698834, -8183698802726814258, 904602839505478295, 10216623637842617], [-1973498751250920819404, 20383000851679158836, -734451116207444726, -1323848645911386], [-546870041261106260016, -223717166463274908208, 119442296636838920, 14829253498829592], [148361300984244902162, -150805040486245691208, -735225205426449972, 18896806246159908], [11662884105081758393224, -138890900105396190148, -138122902650163706, -7969715002764510], [-17699592531182435421288, 45437776602523317656, -27807038568239940, -4600774220551244], [1259929906909131295348, -39406384549711167316, 1559579919551988798, -24782814901126870], [-3958006537253891162002, 45764780357384973024, 609381397723708240, -33143423926692976], [-5602117253446504319114, 88734101945442031408, 141464289753718776, 28465805159405160], [-10235770730282380469122, -50087020867284673364, 1040564439777563470, 32522429979536362], [5692680091015445685030, -97949499007446582370, -696919235912612105, 24867612870628945], [-9855507025012526559946, 122261321420287652508, 2434004071885671110, 36506952558168306], [2096473736370917437794, 15622926908583982872, 1015187635735488220, 55259934966083572], [-11553867377887079980692, 72001697790610982704, -218165089760030912, 7262702648309480], [2094963006969612579944, -173097217228026585036, 830087224684251666, 54215707406096166], [845202916313303404572, -130721646034326645664, -400917725257660640, -24517007760006064], [24903132800394571263836, 93967309668177633116, 916621908748605454, -32404119670718446], [410911215376989021782, 148353906471687482866, 1257092296229153785, -39142754941082009], [8244207164419605839322, -277002254602503450888, -1175706786347494452, -26477132675649532], [-16638896456385814392714, 150616522142419463696, -1149151900666459800, -73749023815798280], [7967380482858735826748, -57330897631348573204, -2181331008152595930, 9614712076597322], [-20019410041099499120412, -230042545452764384596, 507628362164890638, -3436046164432470], [25699063352870351961182, -3706688298095429608, 797589500084712348, -7606281965671052], [-26890704907922008627302, -49054975818173412376, -460296400868903260, 37324695986282124], [-14854607255029349159992, 179257853868792886904, 223857599973464540, -4098193348017596], [-3222341830723176533394, -30005561839309412514, 1122944375919788359, -25018120113691791], [-11938089507485833153386, -3533230044352718596, -1430050859865450, -17560181112484670], [76634758332905033872, -23975361565400069136, 1344197398771685280, 9952214587010888], [24226322797348822465174, 149161691736083689512, -803222195674876380, 12781835680104812], [-2135746976793047943012, -176354285587631184492, 1120317332674591522, 86560291152506742], [36774192789617425184976, 94754861606749003456, -488271523770285000, 34884365943336800], [25126646694478804657302, 35820345090281070226, -814518604135390615, 44678660099088151], [-2301729984364746518466, 195163922751501606064, 164369137174032056, -97919894886262104], [23894758668828766893974, -111918332196564346312, 563473846459669260, -52168307450511004], [23067614220249395720788, -7246768472878686812, -2663991438869830350, -13360693954731410], [-2007550805164421297744, 174220289363633157728, -1875554539129420720, -97474550624717872], [-6421212088591372436956, 222885832240798062044, -1658424389037122922, -34887356564413550], [20102509083625810906960, 124415170408065658880, -2763575443225593200, 2727924619934080]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_45_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_45_14_a_g();".
// 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_45_14_a_g(:prec:=4)
    chi := MakeCharacter_45_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 14));
    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_45_14_a_g();".
// 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_45_14_a_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_45_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,14,sign)));
    Vf := Kernel([<2,R![51792000, -284600, -24690, 15, 1]>],Snew);
    return Vf;
end function;