
// Make newform 405.2.k.a in Magma, downloaded from the LMFDB on 03 January 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_405_k();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_405_2_k_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_405_k();"
function MakeCharacter_405_k()
    N := 405;
    order := 9;
    char_gens := [326, 82];
    v := [2, 9];
    // 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_405_k_Hecke(Kf)
    return MakeCharacter_405_k();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_405_2_k_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_405_2_k_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_405_k();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![9, -27, 225, -330, -666, -12900, 68263, -79101, 76308, 24095, -34695, 85896, 119194, 35388, -1086, -41647, -21393, 10452, 14845, 2430, 621, 212, -315, -93, 169, 36, -3, -7, 0, 0, 1]>],Snew);
    return Vf;
end function;