
// Make newform 1386.2.bk.d in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1386_bk();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1386_2_bk_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_1386_bk();"
function MakeCharacter_1386_bk()
    N := 1386;
    order := 6;
    char_gens := [155, 199, 1135];
    v := [6, 1, 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_1386_bk_Hecke(Kf)
    return MakeCharacter_1386_bk();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1386_2_bk_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_1386_2_bk_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1386_bk();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![256, 0, -5264, 0, 104833, 0, -69149, 0, 35812, 0, -5519, 0, 628, 0, -29, 0, 1]>,<13,R![4096, 0, -4496, 0, 948, 0, -56, 0, 1]>],Snew);
    return Vf;
end function;