
// Make newform 1849.4.a.l in Magma, downloaded from the LMFDB on 17 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1849_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1849_4_a_l();".
// 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_1849_a();"
function MakeCharacter_1849_a()
    N := 1849;
    order := 1;
    char_gens := [3];
    v := [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_1849_a_Hecke(Kf)
    return MakeCharacter_1849_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1849_4_a_l();".
// 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_1849_4_a_l( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1849_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![-2529533386365239033856, 12209595934718941986816, 155934491844585254289408, -188990798671911485177856, -2592083561540781905805312, 744818236566826902355968, 19480279901349842081284096, 2192936704506297486016512, -78244083184919594758701056, -23595891646173815750656000, 184867564746078408743485440, 67657981395793818177290240, -284530292118177648585682944, -104133669750272832279310336, 306586103550170392809271296, 101984255664253459668672512, -242652951666750664525835776, -68757702887731642279067008, 145768377586674742423989504, 33291913702876384233666560, -68035648592675135956465920, -11812364028581812133549432, 25104060895554202837291896, 3065681596991483814085508, -7420670733956834319773837, -558037159542351783297983, 1775331047413372317015630, 58852123543519659971410, -346458603055378259276252, 1494064276645621067631, 55469913015820749464926, -2094308551955825146762, -7314136751374773477710, 496554627949543300927, 795804600342809660872, -76000609290317529832, -71440360616391816753, 8676938553226084948, 5278558527812491047, -774689085493537061, -319296020833109291, 55145123993405874, 15664305748907456, -3151744185800009, -613680777583165, 144547602732607, 18702041278648, -5283409360092, -422041101572, 151834865223, 6271784460, -3354837506, -35445407, 54981878, -791213, -629257, 22002, 4487, -234, -15, 1]>],Snew);
    return Vf;
end function;