
// Make newform 576.2.bd.a in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_576_bd();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_576_2_bd_a();".
// 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_576_bd();"
function MakeCharacter_576_bd()
    N := 576;
    order := 16;
    char_gens := [127, 325, 65];
    v := [16, 9, 16];
    // 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_576_bd_Hecke(Kf)
    return MakeCharacter_576_bd();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_576_2_bd_a();".
// 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_576_2_bd_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_576_bd();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![191120240768, -524142598656, 2578107271424, -6226921575936, 10464470433920, 11193482380800, -175886996791552, -284390744010240, 401367771964992, 1994614564333568, 4220607906462720, 6269551231116288, 6313497622018816, 4197856087416320, 1434827809356544, -1267686871519744, -1729016746715552, 261453551358592, 641918927735232, -966638942173312, -499952232884000, 384092985580928, 389284839549376, -78916418656128, -132448041540304, 52090061149184, 41233601353216, -11367746700800, -11403963982464, 1201440847616, 3727053925760, -842303412480, 22859382040, -231253314016, 128275129648, -80050666528, 60985842520, -26988300896, 9176878352, -2779499296, 606863084, -124681600, 57100736, -14027712, 3101104, -886816, 73136, 41696, -17502, 7928, -2348, 296, 74, -88, 36, -8, 1]>],Snew);
    return Vf;
end function;