
// Make newform 38.6.e.b in Magma, downloaded from the LMFDB on 16 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_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_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_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_38_6_e_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_38_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<3,R![24227477420742825950247932066841, -781573836623449892395443336207, 10781606383775689000134184278399, -14701575655209362589231652116, 2778289770682951921591886661597, 8253270839814892741832047123662, 3838509027696090424769766065187, 372687745877776275895734896763, 33035341343358872047838210406, 613424559170117408632591158, -34952978025475179280077915, 29050721023158260327521404, 5166684424483772779037251, 58778026500883279485012, -17159491943766804967269, -84528141517183855888, 47233123107364385358, -3392896628383558539, 184115923574177765, 419577557776863, -103379177959089, 1369681139096, 130874817399, -7869926751, 451067492, 35547, -27969, -7489, 285, -15, 1]>],Snew);
    return Vf;
end function;