
// Make newform 360.2.bd.b in Magma, downloaded from the LMFDB on 17 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_360_bd();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_360_2_bd_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_360_bd();"
function MakeCharacter_360_bd()
    N := 360;
    order := 6;
    char_gens := [271, 181, 281, 217];
    v := [3, 3, 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_360_bd_Hecke(Kf)
    return MakeCharacter_360_bd();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_360_2_bd_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_360_2_bd_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_360_bd();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![850305600, 0, 286442762400, 0, 80987787623520, 0, 4672176564306600, 0, 188257298040366904, 0, 3928331098605255398, 0, 58523257699661791731, 0, 419420931283551929805, 0, 2101747965918946112331, 0, 4111461308225707756740, 0, 5203115021764283238157, 0, 4602236952236663664641, 0, 3075666688187831684571, 0, 1591771206337828901162, 0, 655717864385423519644, 0, 217514746068943799034, 0, 59048177881743949596, 0, 13263025741218630216, 0, 2492197405194318657, 0, 394661554571210197, 0, 53004917663876843, 0, 6058808326507254, 0, 590858772542016, 0, 49153498170126, 0, 3483086879196, 0, 209286427008, 0, 10591430625, 0, 446057901, 0, 15371411, 0, 420748, 0, 8745, 0, 125, 0, 1]>],Snew);
    return Vf;
end function;