
// Make newform 966.2.k.b in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_966_k();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_966_2_k_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_966_k();"
function MakeCharacter_966_k()
    N := 966;
    order := 6;
    char_gens := [323, 829, 925];
    v := [6, 5, 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_966_k_Hecke(Kf)
    return MakeCharacter_966_k();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_966_2_k_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_966_2_k_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_966_k();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![136048896, 0, 2207015424, 0, 29661493680, 0, 90918197280, 0, 205281126009, 0, 153945801396, 0, 76536141381, 0, 24076396956, 0, 5522654530, 0, 928788420, 0, 120172829, 0, 11822508, 0, 900834, 0, 51252, 0, 2165, 0, 60, 0, 1]>],Snew);
    return Vf;
end function;