
// Make newform 546.2.bu.b in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_546_bu();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_546_2_bu_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_546_bu();"
function MakeCharacter_546_bu()
    N := 546;
    order := 12;
    char_gens := [365, 157, 379];
    v := [6, 12, 5];
    // 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_546_bu_Hecke(Kf)
    return MakeCharacter_546_bu();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_546_2_bu_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_546_2_bu_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_546_bu();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![19932921856, -474052952064, 5637061214208, -20195400200192, -406256678912, 361900045579264, 1738701615452672, 2560828641516160, 2241292404985616, 3275595727110656, 14454131288404480, 22959633701101376, 18970884773546496, 5008288133911360, 15052840552124032, 24021474431880928, 19813980041664776, 3140779861754688, 5960068263383424, 9452637204802320, 7803058190479728, 1018023608785424, 1118561198689664, 1766115378287408, 1480224468757921, 176285406069296, 106918253887360, 169264786069312, 147830526866764, 16183148656688, 5357198347520, 8583677974304, 8096813883208, 783889003040, 146945201024, 239729134224, 252658019140, 20767672288, 2261326080, 3765338832, 4596834686, 308463952, 19168000, 32571264, 48653252, 2525712, 81408, 140800, 287904, 10400, 128, 224, 860, 16, 0, 0, 1]>],Snew);
    return Vf;
end function;