
// Make newform 8047.2.a.d in Magma, downloaded from the LMFDB on 19 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_d();".
// 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_d();".
// 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_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8047_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![-6152614763945, -116907757692250, 1823792489422472, 47357767685061849, -53726648033144962, -6515427802179153343, -21733329369298338030, 410897847584963995407, 2399126226939899466272, -14627553303025036560092, -124432751753882643604165, 315808354033207986509491, 4112911280459567528234708, -3790792568997420490644929, -97204578238747367271954574, 2883887759865946297520091, 1749281802641496034285162089, 889746101468601394509260887, -24957078616297216400699036893, -21014590069431568855776092176, 290379360018330121151151776453, 302522253048929435008663376288, -2813433100920127622332032616081, -3228336476839016095748607929232, 23062823955632000032180988112058, 27307506654264443809458912599665, -161946893728970167837582884319095, -189397381684387199020941979469400, 983742978617975206699389494507401, 1099657273254543878261495938291398, -5210541357955183073215880518664470, -5420764470654735971372688989035362, 24222307751212004862438824343211985, 22918879424204793014596891993805801, -99374978909471711030510888166314869, -83728654026477659591515410317953807, 361527759372948578973174571441656845, 265679684327340620008119950308229874, -1171236448842583172675563281877479217, -734476968881974256769184138502415701, 3391874816836559036073799953706299538, 1770086665013784388248989993421229798, -8811262739903492199801350960804900875, -3708180281004869525863240205080988401, 20598310913478011596641667600022055124, 6693767710330616092641839471329685543, -43461902215730697262754090183940155438, -10196067772960107630250155060967330909, 82997316079729151114508608373595875317, 12427322554710062729070956293338868820, -143814930701027263915817279108865340296, -10082250989402558401661683931910590570, 226647286309942492338045266172337653112, -1067163928471571944130959387690136575, -325569474015707366993415111213769464771, 24497391964761793051819627830914062265, 427113083195760353642854637206837939104, -60694056256408084704450181052246458937, -512657977749871107307574507521934707238, 105570493529468120878552184829499164006, 563894611892264795247609021917165734731, -150785179217374699567914051765319568099, -569209887753395627987605440852341312943, 186267309079608532226506004735596760653, 527943021199293164400861861494590136969, -203900133477740219704486690585686932351, -450392146402966674411892682344226183402, 200506220506334259609085684490907721970, 353703822054475945382706872492998730427, -178654485126738929230161022806033661968, -255851293377255123149236641014198621837, 145091364509018407928058492388402254774, 170518588676713529204151078535884958280, -107862493688531087805684501458880454897, -104710887413817983648765773935362508802, 73638228350578352387644502338529078203, 59221301125422426985141175045650640888, -46283623216757648480985890291886192083, -30820548328630497694707089819795704677, 26834849298126581792590076065525480665, 14736345751878814558410584089893867222, -14374688531093980860568769792522922683, -6456600238660098384444522407590098514, 7122996454780578233318160755614561104, 2581615165507946846518551185413273448, -3268214205213562416503682398787361505, -935717944913626858784977371035073388, 1389493969283011221118464774012732340, 303949504762325653128886723558538195, -547674437074997993068946437236309674, -86612900511752397774341220100422875, 200189693361855676507633753404297519, 20661762458094326258646359478200997, -67867777553601590844737455681705610, -3588547629355495094149747247813352, 21337968990700151299533391999329914, 133115864324901986168447838824699, -6219967817157694633030076553021433, 233182497623204558863926927326177, 1680176143088505244219929148872197, -132776015127244755927560279590474, -420279796823685315431379290644202, 50035316841928727679517497546965, 97254855218262577388967224648421, -15391608105154348083267049424754, -20792821124400692280092828456101, 4104288565666703223109676620083, 4100405154520745840583982158749, -972986837994424208767093023351, -744279235423549319321152042921, 207661573372001464384919087121, 124013661494085880589469443525, -40171789866470776947633906598, -18902067438045138267674408009, 7069316996473776552079095181, 2623255078816869842073565451, -1133629670328827290357459543, -329376114982671854494164142, 165723268721372482415586386, 37072028258440630985704446, -22073252634912987784406828, -3686475828385137896472914, 2674915582523868301006379, 315737342815457742674088, -294285381574712825745016, -22068530519708814923533, 29305871990108137500140, 1070160802840262940549, -2631522409184428809949, -4036038814152433008, 212046231030659187366, -6548366078917406476, -15240386225870249562, 938607403778546754, 969582500401021337, -88693025714856621, -54068012378376188, 6575792337157330, 2608867606419421, -400528975859926, -107004469592450, 20294353305991, 3634491516361, -853394431943, -97942027317, 29412181939, 1922139156, -812074140, -21064932, 17308391, -110919, -267722, 8986, 2677, -152, -13, 1]>],Snew);
    return Vf;
end function;