
// Make newform 462.2.w.b in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_462_w();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_462_2_w_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_462_w();"
function MakeCharacter_462_w()
    N := 462;
    order := 10;
    char_gens := [155, 199, 211];
    v := [5, 10, 7];
    // 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_462_w_Hecke(Kf)
    return MakeCharacter_462_w();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_462_2_w_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_462_2_w_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_462_w();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![2900399739136, 27610352605440, 32559457830592, -264665135410560, 3771711309968, 309437856145440, 1039230289819724, -1612682730335860, -838219225153175, 1573542742528000, 1885336502761788, -2559057408274900, -2465967034123310, 4112260798262380, 1249651747966721, -3876557315338940, 584242228630161, 2037650573801880, -832631222623520, -625678802659640, 371042200639422, 118455056100940, -81207683298548, -24908334817140, 18740175204366, 3787830126600, -3477556641530, -443328120220, 529444899250, 40579019000, -65920685942, -3919956200, 8229164271, 145755260, -798433000, 5680080, 69322780, -1415240, -5368055, 144760, 373482, -14840, -19614, 780, 976, -20, -39, 0, 1]>],Snew);
    return Vf;
end function;