
// Make newform 38.6.e.a in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_38_e();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_38_6_e_a();".
// 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_38_e();"
function MakeCharacter_38_e()
    N := 38;
    order := 9;
    char_gens := [21];
    v := [8];
    // 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_38_e_Hecke(Kf)
    return MakeCharacter_38_e();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_38_6_e_a();".
// 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_38_6_e_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_38_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<3,R![73358916052300043810121, -223511306113102758776856, 217544618265774259734072, -77326540642054142997408, 72235595881153408387563, -8297231823237821243796, 6925030236154654524441, -151880237620758155790, 11458052792922286503, -34563952233977828220, 7282341567484847307, -696453211160278938, 40880597724180739, -1808084931346332, 47400804602685, 1779128874234, -167145986970, -380500902, 397945576, -13323294, 110430, 4140, -27, -18, 1]>],Snew);
    return Vf;
end function;