
// Make newform 6038.2.a.b in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_6038_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6038_2_a_b();".
// 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_6038_a();"
function MakeCharacter_6038_a()
    N := 6038;
    order := 1;
    char_gens := [3021];
    v := [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_6038_a_Hecke(Kf)
    return MakeCharacter_6038_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6038_2_a_b();".
// 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_6038_2_a_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_6038_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![5806105, -59950729, -553152427, 3349983720, 23268983195, -37123613132, -332891189775, 154259821176, 2485710657204, 17579363983, -11502975791285, -3107740796495, 36053081777720, 16413439699319, -80552052784185, -49299567369702, 132137635186546, 101392823541877, -161323125998308, -152585661242942, 146163354877103, 173576438052829, -95348687122826, -151874565401826, 40127939550285, 103038932429675, -5194916481182, -54223757454007, -6709004447306, 21945422657431, 6204156516560, -6676240091879, -3043013180644, 1443678973078, 1020790523541, -185470760844, -247029553017, -701518138, 43163000131, 6298421341, -5235760368, -1523842826, 388053915, 205464064, -7929754, -17170134, -1603001, 823789, 180358, -14065, -8000, -503, 120, 21, 1]>],Snew);
    return Vf;
end function;