
// Make newform 38.8.e.b in Magma, downloaded from the LMFDB on 25 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_8_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_8_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_8_e_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_38_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,8,sign)));
    Vf := Kernel([<3,R![1381703885095198039464071634844105424810130300411661306449, 17742913727562424006692638783234729646409246031230374372, 81352379815612415224585953461864643807616742177966287551, -7598578084756393944020955365372237580569570062657337124, -165784249288788990222415846188632711544263194750398942, 2150914796929019101697670044469292826377809780739080, 2536609177119857844900457661757230791197897243604380, 30390260029264301418993489646360292274090380755968, 3400738451913484496063797424588988493032818926377, -204306048913897576609101464249848853868640142004, 2608577837521288500258821829767036481350674470, 829889746959805976182159909858522607397789768, 11428270435256549702374097440861014903357594, -379701181289033732631717418456848042673812, -216249408069687273444581744519043981456, 51660078949738679554534127190956924256, 274869958154674656694701695789783070, 27951880255470314675006859065573964, 2388293569322073600020290293480451, -10454103049703093493496820629392, -35141102826391478746571809956, 8716082178625307442620853308, 150668365164827723905614855, 4605964471317382496500872, 76248792747507645156206, 116865990265870630932, 653659224143707119, -31386993871238416, -364525997455731, 21156535535772, 411923695970, 1921137504, 10221195, -14356, 2814, 84, 1]>],Snew);
    return Vf;
end function;