
// Make newform 150.3.k.a in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_150_k();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_150_3_k_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_150_k();"
function MakeCharacter_150_k()
    N := 150;
    order := 20;
    char_gens := [101, 127];
    v := [20, 19];
    // 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_150_k_Hecke(Kf)
    return MakeCharacter_150_k();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_150_3_k_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_150_3_k_a( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_150_k();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<7,R![12821429097291977761, -45809399400441629132, 81835693100405150792, -4961459032142572564, 12447955605293321678, -41852960322497705512, 71043557766745632696, -3674078155579683000, 2215541712759687909, -4615821805971911968, 3108429779364139912, -704144985634328076, 102565118295437700, -27365458011627264, 15237353540809448, -3820444601576048, 520885885975198, -35543587433072, 11708421404408, -3207442469676, 466723416510, -16158882444, 3196275472, -1025374732, 166638564, -1854300, 364296, -142288, 25448, 284, 32, -8, 1]>],Snew);
    return Vf;
end function;