
// Make newform 429.2.bg.a in Magma, downloaded from the LMFDB on 20 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_429_bg();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_429_2_bg_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_429_bg();"
function MakeCharacter_429_bg()
    N := 429;
    order := 15;
    char_gens := [287, 79, 67];
    v := [15, 6, 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_bg_Hecke(Kf)
    return MakeCharacter_429_bg();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_429_2_bg_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_429_2_bg_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_429_bg();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![152587890625, -1434326171875, 1546630859375, -36023925781250, 467757255859375, -823171492187500, 7410872082968750, -65163020402125000, -220413780314258750, 1649876944176928125, 2411725161651818500, -7974260706621220125, 15191424066467334325, 67094889495602069325, 6588412739732490465, 148140728585326117725, 303317940015277538931, -1098660293901373338763, -1347123113428205780672, 2031635019296805896296, 2613434829919842707795, -690675919974174669188, -1919080752633707315523, -3481907697305689269668, -1410325612465988345341, 13692151869674815112094, 9625898660298911203073, -25648648618756965570591, -15533776812919368014807, 17505102336365998913108, 6389375606856595609887, 26307978970413668534074, 34722356641191733494220, -43664839876742172462953, -45873695570789590850719, 21287516121519837426866, 16487519075644462398750, 8399792247827239292755, 13992240380691401615611, -17189138475896175332344, -18810379332907668837799, 10394811236618862261645, 10268488584975854773590, -778092081446187673837, -1633667772953860759523, -3935747696962692962359, -2799544419267575228297, 3414056475442442531820, 3079962223467718006539, -1105244884110160399957, -1327428090805163475484, -217519658923997889178, 36098363253479665595, 369848990254796080679, 259305533860033036523, -173242358770298125593, -141838427682537393716, 46417285702433621981, 32886342848664620022, -2696346003754484996, 5077902502876360518, -4841975113951017063, -7950765276384835127, 2410766691442154563, 3123623558349074441, -419116257182253342, -349594612720449731, -12331133362771435, -160280102112811440, 21660411234291646, 79155311363939573, -5572756708501968, -14318501609111912, 801460679298680, -173364939162031, 42793627629882, 844606644398389, -40523844889193, -246334401078594, 3779819474733, 29300903995909, 850388036538, 3262640928296, -93223698381, -2008990347992, -41771152285, 374248632951, 16401032846, -23343422086, -3435946218, -5918004916, 321751540, 2049915640, 70833624, -293951240, -29521910, 10300989, 4539776, 4710855, -292771, -1124305, -31530, 126951, 14284, -4759, -2452, -1094, 218, 249, -8, -24, 0, 1]>],Snew);
    return Vf;
end function;