
// Make newform 369.2.u.a in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_369_u();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_369_2_u_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_369_u();"
function MakeCharacter_369_u()
    N := 369;
    order := 20;
    char_gens := [83, 334];
    v := [20, 11];
    // 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_369_u_Hecke(Kf)
    return MakeCharacter_369_u();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_369_2_u_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_369_2_u_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_369_u();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![361, 1710, 446, -4460, 8872, 9200, -20711, 2910, 26542, -19800, -9388, 10130, 6223, -6000, -3108, 4080, 402, -2270, 1377, -480, 200, -110, 44, -10, 1]>],Snew);
    return Vf;
end function;