
// Make newform 8041.2.a.j in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_8041_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8041_2_a_j();".
// 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_8041_a();"
function MakeCharacter_8041_a()
    N := 8041;
    order := 1;
    char_gens := [6580, 2366, 562];
    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_8041_a_Hecke(Kf)
    return MakeCharacter_8041_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_8041_2_a_j();".
// 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_8041_2_a_j( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_8041_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![37225728, -1854841728, -12270831104, 245161967424, 1664799614576, -7511847611384, -64296203492500, 96058417973202, 1249266543552922, -445228023392152, -14972530538627826, -2726790292020834, 123175986248836147, 56282210416921363, -742616317373262744, -438936197838581702, 3426661996512428422, 2196686923843920160, -12474119160920790390, -7958711121352149080, 36620010129237759709, 22030074016548070451, -88133541935367606008, -48044004109359867162, 176117551008203730507, 84172517831571423359, -295191927449447531828, -119952617520172875654, 418451400257911116838, 139994577155327339524, -505151966242935093399, -133913161064822792062, 522348683620501760450, 104160145852070393714, -464935145745144803711, -64231195506633417918, 357689611816374548260, 29145164225348061813, -238659190742287630974, -6978663364385474926, 138480453469182319015, -2619869448814229291, -70021401199612451358, 4443224026705630535, 30896665232221898528, -3240757246846284133, -11905348938395220617, 1711858857419530251, 4006088640252150598, -724141627097801446, -1176256424820333948, 254627580013583349, 300851039862942056, -75722834685289362, -66845461566930350, 19209155783962184, 12849688451457214, -4172545272295176, -2124675153628141, 776591383406470, 299712888884452, -123622463871571, -35644406124508, 16762495300274, 3510679633792, -1923484281045, -278056897517, 185044591488, 16734621568, -14730735453, -658852359, 952823355, 5442703, -48790759, 1361090, 1902472, -108602, -53052, 4383, 942, -99, -8, 1]>],Snew);
    return Vf;
end function;