
// Make newform 387.2.y.c in Magma, downloaded from the LMFDB on 16 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_387_y();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_387_2_y_c();".
// 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_387_y();"
function MakeCharacter_387_y()
    N := 387;
    order := 21;
    char_gens := [173, 46];
    v := [21, 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_387_y_Hecke(Kf)
    return MakeCharacter_387_y();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_387_2_y_c();".
// 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_387_2_y_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_387_y();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![729, -2187, -3645, 570078, 2584548, -11970180, 32196879, -59216562, 84622680, -96433893, 90878850, -70159041, 49222027, -41014841, 47124101, -54009346, 53464867, -45434277, 34355723, -23244725, 14446237, -8211111, 4355116, -2104739, 946422, -396145, 169168, -77367, 38698, -18892, 8492, -3288, 1093, -296, 65, -10, 1]>],Snew);
    return Vf;
end function;