
// Make newform 1620.3.t.f in Magma, downloaded from the LMFDB on 17 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1620_t();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1620_3_t_f();".
// 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_1620_t();"
function MakeCharacter_1620_t()
    N := 1620;
    order := 6;
    char_gens := [811, 1541, 1297];
    v := [6, 1, 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_1620_t_Hecke(Kf)
    return MakeCharacter_1620_t();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1620_3_t_f();".
// 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_1620_3_t_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1620_t();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<7,R![17424859594601536, 0, -38203781472698688, 0, 77840214971174544, 0, -12376530555225872, 0, 1342366541599500, 0, -76507326662148, 0, 3106792494870, 0, -72024338430, 0, 1195527555, 0, -12104630, 0, 88353, 0, -366, 0, 1]>,<17,R![41987187424, 0, -42366144912, 0, 10180375374, 0, -157133482, 0, 827391, 0, -1662, 0, 1]>],Snew);
    return Vf;
end function;