
// Make newform 390.2.s.c in Magma, downloaded from the LMFDB on 19 September 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_390_s();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_390_2_s_c();".
// 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_390_s();"
function MakeCharacter_390_s()
    N := 390;
    order := 4;
    char_gens := [131, 157, 301];
    v := [2, 1, 2];
    // 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_390_s_Hecke( : Kf := Kf)
    return MakeCharacter_390_s();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_390_2_s_c();".
// 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_390_2_s_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_390_s();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![160000, 0, 0, 0, 13023616, 0, 0, 0, 18386480, 0, 0, 0, 3792536, 0, 0, 0, 83553, 0, 0, 0, 570, 0, 0, 0, 1]>,<17,R![26419600, -4687680, 415872, 1702752, 802236, 78472, 28320, 26460, 11301, 2514, 338, 26, 1]>],Snew);
    return Vf;
end function;