
// Make newform 1620.3.o.g in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1620_o();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1620_3_o_g();".
// 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_o();"
function MakeCharacter_1620_o()
    N := 1620;
    order := 6;
    char_gens := [811, 1541, 1297];
    v := [6, 5, 6];
    // 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_o_Hecke(Kf)
    return MakeCharacter_1620_o();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_1620_3_o_g();".
// 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_o_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1620_o();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<7,R![1509541505956, 1477835376952, 1134980174724, 430655189624, 144431792234, 24464622840, 6159686170, 684910540, 198230175, 11250064, 3508258, 108708, 46349, 512, 258, 4, 1]>],Snew);
    return Vf;
end function;