
// Make newform 403.2.k.d in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_403_k();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_403_2_k_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_403_k();"
function MakeCharacter_403_k()
    N := 403;
    order := 5;
    char_gens := [249, 313];
    v := [5, 3];
    // 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_403_k_Hecke(Kf)
    return MakeCharacter_403_k();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_403_2_k_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_403_2_k_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_403_k();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![16, 1264, 178024, 2887658, 19583167, 632607, 218606274, -1012683302, 3150000737, -6468382362, 11222242030, -16062790712, 21332625972, -25261493102, 28719319595, -30552381649, 32494057544, -32310813167, 31249494666, -27769865374, 23586131884, -18251798759, 13480512441, -9116293940, 6054724348, -3762510134, 2329259996, -1344041697, 780997075, -417019371, 224162618, -109981204, 54862603, -25122980, 11826327, -5081827, 2253797, -901525, 368767, -134555, 50593, -17069, 6032, -1866, 594, -157, 40, -7, 1]>],Snew);
    return Vf;
end function;