
// Make newform 368.2.j.d in Magma, downloaded from the LMFDB on 18 January 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_368_j();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_368_2_j_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_368_j();"
function MakeCharacter_368_j()
    N := 368;
    order := 4;
    char_gens := [47, 277, 97];
    v := [4, 3, 4];
    // 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_368_j_Hecke(Kf)
    return MakeCharacter_368_j();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_368_2_j_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_368_2_j_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_368_j();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![1024, 1024, 512, 8960, 128448, 216288, 191264, 181608, 1333905, 2287968, 2060448, 956452, 297732, 128540, 108712, 51084, 13442, 2240, 1720, 828, 208, 12, 8, 4, 1]>],Snew);
    return Vf;
end function;