
// Make newform 21.8.g.b in Magma, downloaded from the LMFDB on 27 December 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_21_g();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_21_8_g_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_21_g();"
function MakeCharacter_21_g()
    N := 21;
    order := 6;
    char_gens := [8, 10];
    v := [3, 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_21_g_Hecke(Kf)
    return MakeCharacter_21_g();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_21_8_g_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_21_8_g_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_21_g();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,8,sign)));
    Vf := Kernel([<2,R![683173281605171253573112767184896, 0, -205027142479117702608131123576832, 0, 52276306224263979542419882377216, 0, -2429246588759910974060126797824, 0, 71443706837989906554396344320, 0, -1355016326174288122775076864, 0, 18848935098933275944108032, 0, -192655711932540690878464, 0, 1515349782370765347840, 0, -9129121533409158144, 0, 43090952288627904, 0, -157316012820720, 0, 447659189388, 0, -958606738, 0, 1524771, 0, -1599, 0, 1]>],Snew);
    return Vf;
end function;