
// Make newform 8047.2.a.e in Magma, downloaded from the LMFDB on 18 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8047_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8047_2_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".
// To make the character of type GrpDrchElt, type "MakeCharacter_8047_a();"
function MakeCharacter_8047_a()
    N := 8047;
    order := 1;
    char_gens := [3096, 4954];
    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_8047_a_Hecke(Kf)
    return MakeCharacter_8047_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8047_2_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_8047_2_a_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8047_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![-21530657600, 880880169200, 27740332544480, -1467318804303128, -1828006236548828, 605776150555028271, -2119161873645716062, -112602174378065608432, 509606455268858764106, 11932043328299378772483, -54281112246538427087949, -811416770155248742313441, 3494598634047433167221177, 38077750650033825537605919, -153681776485708545481300973, -1295298841469199162233965529, 4938238260513840039272664330, 33094148676573696424130888971, -121011682180087498468853415474, -652319987780555217933534174355, 2329220583901196776771242791000, 10130512686663570129623250517170, -35984618455647706336843495760209, -126072219547187211827254013484027, 453739076977087696803315704665148, 1274763944821513722018167584936950, -4733514468634259832626840632437994, -10591097395083683360170395921365641, 41331208404052473015519015889771702, 72940941660825309538756701913973132, -305158204024833340898590402837682089, -418969279028419944131890501340609372, 1922766975827302776076684238205899121, 2012508057874110149920410549719576616, -10426448744114364316991910613682390407, -8062660809890458837044798568918875873, 49034719042988304359406546363936321645, 26598245775213859516456301622707922563, -201418135672794041449531145768947053846, -69626479355354631281031885727796905227, 727325091131580946947936875562450375595, 128150147585930727497920266005828888251, -2322484265045048318951082810071539476568, -66074727863485171568234833586210419095, 6593190553261181564195997637575690528350, -672748555173633645872402243668538680918, -16720940672202556826146391412828562940050, 3660936141669202125065344608647708096976, 38049103810733121644780682213419857882667, -12378294345620530663489523089444025592014, -77991807938033655267272387417841662435179, 33050763248673611185375312977175437981369, 144508691460885574204827412880087004146666, -74646027871208747115641360096825950990002, -242787410918980289852331600771390410995560, 147058754832191553571625683682519602684238, 370874419554808487127767603497479339969176, -257089908623062020526920448176859190900214, -516316614806763643320894163211696205432825, 403230641438008976295136925515265523712098, 656375804907581360888869407266967136999240, -571787931945363628026566290643616291792991, -763182418699162093466397483726931552965173, 737264657629705991230602499107855482289076, 812560765024956465485619316963580451482385, -868297789731409303078695197119595825773959, -792762864318372071154019450480771817321791, 937445357223174637144597300258376933436172, 708847519603094902722184373107159486610766, -930588857347108474429224175979037985471940, -580536086126845027238493872460183325108897, 851529427897420503740049291557889637758012, 434788016752309533928087153549601026512783, -719785097742548122777988392892596951616818, -296854929714889757289912730822752230564892, 563073452619081405376642588962136925105388, 183738401470881600682300530351056876352204, -408292552160235150370989974931869466535878, -102063199380053644196924008822680500993836, 274795956980837916402306286190986396098235, 49906855441084424524887090677023722135566, -171863815453662993136493097908387571667863, -20589216340106419902133951826907543090869, 99981447739820595064754265839329341981950, 6335881991079871845187596716150362331700, -54146432711916564325807548749387550009134, -615354493554084127255880376811405861435, 27316403231122075444448401059426330574063, -1011630541856357024189257123921424155633, -12844109854716657697768738058622166978304, 1060066120231740378437330407829247873239, 5630823516934948643114013822561782774217, -708172223218807710665811848852465969158, -2302101738400301264355076747196320937627, 385189767694127226041435296596990134261, 877796775966721573096263259311210202603, -182368983704656507027729568714244725752, -312135964630207943040975815420963505249, 77298145052202070730649804779344599415, 103481579238377891378839327731929754376, -29758321535352800836121736457251590731, -31971109641178901525719689537611508878, 10493020874088091269772462831885367002, 9198951887476970777808209826632480748, -3406435307227125672508956712302796497, -2462646540815292185799173283814311634, 1021560496832119976523452967965874668, 612641535125857001762519834398444085, -283625506169381572181613625127023257, -141393810996008127367953259839900509, 73005275728838345569700947532846783, 30207499637936501178777143785200536, -17436244739445893941284799541540792, -5956170987933378616794933241243424, 3865550975189935955643563365580782, 1079450500180187910381915196817314, -795503620025127328517095546551859, -178755888654232833127195379461777, 151922168891402858681844481727690, 26807276190670006731184520236192, -26909100525634162146780924922317, -3587384088398484166050412660205, 4416789495448454246490648758519, 416790242177696221623864616549, -671047429622766936559279043840, -39495184967882235111799302140, 94237095681983021575802850157, 2465915642274741296106803324, -12211229014017472564625158261, 51688461655989766649555298, 1457002563879598094923985454, -47812477826301055378606179, -159678135321559046947637331, 9583850148834594171316736, 16026229157559373404996702, -1382698002450685016808277, -1467873450524518148766324, 164464929563886564887012, 122175318004834822511468, -16840081909398803927128, -9193777561464703483528, 1510488444830301706358, 621563649897810196021, -119514627210528026559, -37455659094538770445, 8354416674193927002, 1991230118424393037, -514919089557836375, -92092872668619239, 27849644668107344, 3630781121796728, -1312002125455876, -118072071288562, 53280832020335, 2970893064817, -1839052449876, -48368498125, 52920858822, 33675915, -1235719063, 27135551, 22498775, -945706, -299693, 17984, 2598, -198, -11, 1]>],Snew);
    return Vf;
end function;