
// Make newform 6027.2.a.bn in Magma, downloaded from the LMFDB on 20 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_6027_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6027_2_a_bn();".
// 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_6027_a();"
function MakeCharacter_6027_a()
    N := 6027;
    order := 1;
    char_gens := [4019, 493, 2794];
    v := [1, 1, 1];
    // 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_6027_a_Hecke(Kf)
    return MakeCharacter_6027_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6027_2_a_bn();".
// 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_6027_2_a_bn( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_6027_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![-64, -704, 6016, 22264, -74409, -169628, 315110, 394052, -651445, -389144, 731270, 158124, -475368, 7612, 184284, -31692, -42236, 12536, 5308, -2332, -267, 216, -8, -8, 1]>,<5,R![-1116416, -8672768, -1768832, 69193856, 27441760, -186454880, -63926168, 232669320, 68806647, -153572120, -40498636, 58500508, 14446546, -13600884, -3267228, 1982492, 473976, -181168, -43608, 10044, 2446, -308, -76, 4, 1]>,<13,R![3175599616, 25200331264, 72277847424, 87566532992, 16594444336, -61616847424, -44994053936, 13105855680, 21697315153, 188476468, -5602718226, -560453560, 929270326, 106309600, -103824930, -9417544, 7678512, 434096, -360718, -9908, 10172, 88, -156, 0, 1]>],Snew);
    return Vf;
end function;