
// Make newform 429.2.n.d in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_429_n();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_429_2_n_d();".
// 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_429_n();"
function MakeCharacter_429_n()
    N := 429;
    order := 5;
    char_gens := [287, 79, 67];
    v := [5, 4, 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_429_n_Hecke(Kf)
    return MakeCharacter_429_n();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_429_2_n_d();".
// 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_429_2_n_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_429_n();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![3025, 9625, 190210, -611615, -73939, 12002753, 71925139, -18310715, 209636465, -171365691, 343944082, -278921289, 332704930, -225463345, 196076179, -98920373, 73887661, -33921100, 27419430, -12514176, 8606137, -3099939, 2123330, -709035, 469061, -149477, 91859, -27085, 14625, -3421, 1832, -429, 210, -45, 19, -3, 1]>],Snew);
    return Vf;
end function;