
// Make newform 380.2.n.a in Magma, downloaded from the LMFDB on 20 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_380_n();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_380_2_n_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_380_n();"
function MakeCharacter_380_n()
    N := 380;
    order := 6;
    char_gens := [191, 77, 21];
    v := [3, 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_380_n_Hecke(Kf)
    return MakeCharacter_380_n();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_380_2_n_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_380_2_n_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_380_n();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![9834496, 0, 89062400, 0, 500950528, 0, 1701741760, 0, 4148852832, 0, 7410414636, 0, 10186042973, 0, 10762202703, 0, 8892116523, 0, 5654962054, 0, 2792444019, 0, 1047905415, 0, 306343209, 0, 69587636, 0, 12475873, 0, 1746767, 0, 191688, 0, 15975, 0, 992, 0, 41, 0, 1]>],Snew);
    return Vf;
end function;