
// Make newform 333.3.bb.c in Magma, downloaded from the LMFDB on 17 June 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_333_bb();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_333_3_bb_c();".
// 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_333_bb();"
function MakeCharacter_333_bb()
    N := 333;
    order := 12;
    char_gens := [38, 298];
    v := [12, 1];
    // 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_333_bb_Hecke(Kf)
    return MakeCharacter_333_bb();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_333_3_bb_c();".
// 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_333_3_bb_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_333_bb();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<2,R![2866249, 3667038, 10356855, 7039242, 5241238, 5503628, -3142611, -4029320, -782512, -587782, 953231, 580954, -105304, 166188, -10553, -67892, 17400, -1602, -35, 598, -114, 8, -1, -4, 1]>],Snew);
    return Vf;
end function;