
// Make newform 585.2.bt.b in Magma, downloaded from the LMFDB on 23 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_585_bt();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_585_2_bt_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_585_bt();"
function MakeCharacter_585_bt()
    N := 585;
    order := 6;
    char_gens := [326, 352, 496];
    v := [4, 6, 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_585_bt_Hecke(Kf)
    return MakeCharacter_585_bt();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_585_2_bt_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_585_2_bt_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_585_bt();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![1679616, 0, -645077520, 0, 207986575905, 0, -13403025785016, 0, 571426360165638, 0, -13669165919878920, 0, 227532377812276935, 0, -2608590008749321692, 0, 22163234466847868046, 0, -143835706055502434430, 0, 738285852318835293567, 0, -3071843633794295357424, 0, 10576713534967074171108, 0, -30609722253266032025844, 0, 75420945741005663885794, 0, -159867945535602617001824, 0, 294126059241198238163703, 0, -473316060229287674611044, 0, 670773755333636483228703, 0, -842246045326334970880800, 0, 942086206223990175148175, 0, -943247435974770937577584, 0, 848999572769416892234751, 0, -689582719800823888702818, 0, 507128231263498837658364, 0, -338671059959412571820514, 0, 205911172596605210704171, 0, -114231343122259726379882, 0, 57931858177087397298669, 0, -26901125401185685627788, 0, 11452934306857721515785, 0, -4475203590992428688376, 0, 1606209272097885368850, 0, -529805562651938209992, 0, 160647743518776343158, 0, -44779398121306074390, 0, 11471121401863195773, 0, -2699001550017530640, 0, 582733106368599651, 0, -115303228587833916, 0, 20872150648146381, 0, -3448872448300682, 0, 518730124869562, 0, -70764250326246, 0, 8716749266898, 0, -964097691276, 0, 95063249334, 0, -8280112066, 0, 629426852, 0, -41081196, 0, 2249817, 0, -99900, 0, 3402, 0, -80, 0, 1]>],Snew);
    return Vf;
end function;