
// Make newform 238.2.p.b in Magma, downloaded from the LMFDB on 21 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_238_p();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_238_2_p_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_238_p();"
function MakeCharacter_238_p()
    N := 238;
    order := 16;
    char_gens := [171, 71];
    v := [8, 3];
    // 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_238_p_Hecke(Kf)
    return MakeCharacter_238_p();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_238_2_p_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_238_2_p_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_238_p();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![5345344, 0, 195613696, 0, 1325185024, 0, -1804846336, 0, 720202362880, 0, -3214715320064, 0, 3683683405760, 0, 975893668736, 0, 3239852871040, 0, 188977956160, 0, 344687940416, 0, -131921274496, 0, 14190625056, 0, 2764664512, 0, -879946784, 0, 105761152, 0, 61995232, 0, 885472, 0, 407400, 0, 30992, 0, 2048, 0, -168, 0, -64, 0, 0, 0, 1]>],Snew);
    return Vf;
end function;