
// Make newform 1849.4.a.i in Magma, downloaded from the LMFDB on 19 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_i();".
// 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_i();".
// 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_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1849_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![1651856004935548928, -82260807360241827840, -531092760752833413120, 144705449928338223104, 3856990142374501713920, 1564681533306286054400, -11784224319046721060352, -7194374950347044332288, 20592265282295756891008, 14280247339550011492480, -23412752090055212321888, -16974282360743358715232, 18572783543421760019008, 13566692591936284020264, -10724131854221258094720, -7759009842997111669977, 4632518886634039987386, 3304151371387437985708, -1525312598382370236542, -1076844921121088175846, 387788315548068246851, 273868323045666810674, -76760593615093112044, -55108844792806705327, 11875567884081789101, 8857890186268483216, -1433717479694624334, -1144263980650152844, 133779545178999837, 119179299748027760, -9410837257970579, -10012996386335263, 468145500571917, 677026138326206, -13068788444365, -36637127217046, -153098536947, 1571688953682, 38256545390, -52653591537, -2196694321, 1346150396, 76406200, -25331608, -1768829, 330340, 26833, -2664, -243, 10, 1]>],Snew);
    return Vf;
end function;