
// Make newform 216.3.p.b in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_216_p();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_216_3_p_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_216_p();"
function MakeCharacter_216_p()
    N := 216;
    order := 6;
    char_gens := [55, 109, 137];
    v := [3, 3, 4];
    // 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_216_p_Hecke(Kf)
    return MakeCharacter_216_p();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_216_3_p_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_216_3_p_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_216_p();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<5,R![358628125468262400, 0, -976335082686666178560, 0, 2657225112979175083194624, 0, -2083606733974200670567296, 0, 1058132405272496522900400, 0, -308579748941050774004376, 0, 63934766382808694810673, 0, -8157519137669082514317, 0, 743736619369179988308, 0, -50373543727284752943, 0, 2661925178189571849, 0, -111618882769275558, 0, 3784106595265245, 0, -104016298280787, 0, 2327328612189, 0, -41961529638, 0, 603811641, 0, -6712983, 0, 55716, 0, -309, 0, 1]>],Snew);
    return Vf;
end function;