
// Make newform 8047.2.a.b in Magma, downloaded from the LMFDB on 24 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_b();".
// 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_b();".
// 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_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8047_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![33720492213, 828901996542, -14571284620428, -212271684318918, 2220804682617996, 23978202431646429, -173421872669246583, -1600017283933529055, 8077300022254556643, 70761595207078445570, -243225417829010602900, -2203744187621309829345, 4950080451701198439682, 50363295001877745292660, -68917179509472501243575, -872968780019036034649291, 623845364753082260913872, 11798260958657610801956158, -2557763164244040926611240, -127238936902995519940252291, -22101973929996985618747300, 1116287227505656309485017695, 547859773998294591221019720, -8095528004063081367991780996, -6139282997971587741587623767, 49182539272559719835631626695, 48878147940365225934165555905, -253088245773827285120984382130, -306383069513351787458906533771, 1113234458122821837185065601115, 1580709077052099888656597044682, -4216676267079750430457373521796, -6883526821901351089423950965128, 13833884094879393296846704316885, 25725179394531929685627395333715, -39475531279451791316104366313364, -83506825157062513332427785140977, 98209296251784937826491433271155, 237642299135260023399973040254135, -213028214744086430676561382994644, -597289756488380941834543935521552, 401509751244085787035444873988780, 1334006449586618862480679755293635, -651351450355749803243827156231880, -2661138948313314573007570874822784, 889527557268811123500446121731051, 4762176698179732863315876150318488, -966545789300188401908935904057581, -7673496702520674840697515600251514, 683577015864135645212209900209596, 11169333217321441440226171494863720, 126582859989532260650860447642064, -14726872782561916835961698125978516, -1492523557625493300124004567326366, 17630981463449517010530363450618150, 3233638386415350001210021264483872, -19204579778198984441534148143066491, -4984412937617966292869214759929282, 19064798529542314714274294930546247, 6320297525266641000568970085394423, -17272611527296322331825607279438212, -6925220332553898756918388720896601, 14296982294540928268937771999739184, 6710520264964700581858002397929668, -10819595367487907453537680393748743, -5825641213224949325510936362904544, 7488972027035498986742978267457011, 4568014637941079517856628689129281, -4740931862058119505928880849939996, -3253030818863521209816428719629334, 2743495431201831386941624104583241, 2112088390953204870911003444284367, -1449546251455695385573882284416432, -1253808476216009657726311937933289, 697829141341118181276979544063176, 681960414850110314868953504824586, -305060771957420576654618791976838, -340386622233086107838221282254049, 120437932188671348036696641313673, 156084823548912322748171573849621, -42550288648971416630877482025527, -65804829153759117988154338978767, 13233627706728115550208162399469, 25518882510273477340186816263979, -3504573999450455583587016182238, -9104270379966418254245217068159, 725903949902204576109066622976, 2987862459200675572701669125207, -80754602962364842835455000975, -901652327872448583699589918404, -19711842841002252098629406986, 250025561117011799380236823332, 16975015062964168055922428207, -63644511095161982976998396285, -7125751944565166961436542304, 14851647574671273388759201110, 2301467395864781161952462852, -3171345350213267953675874126, -627502848689133368005421064, 618235456791326855839827889, 149491846695166896372024726, -109696512237987536609336541, -31617097716413752224248625, 17645814944911751391552377, 5984201901455885130436621, -2559763083666032446514843, -1017591913606827895411198, 332407580142519505416581, 155690956114295055267342, -38226096137538112000523, -21428018398059644906195, 3826165151026063948110, 2648863132973278365013, -323017343752992087968, -293298514359786135244, 21420741295327190927, 28975324570893624629, -865771373323516527, -2540592374489264954, -22958127057828620, 196362399114034517, 8837826890962325, -13259723429342118, -1051178887803038, 773159169084867, 87555571188804, -38312599881217, -5702094377458, 1577133849952, 298488254411, -52060884841, -12559253973, 1293461357, 417762435, -20774374, -10622567, 86510, 194514, 4951, -2288, -122, 13, 1]>],Snew);
    return Vf;
end function;