
// Make newform 6041.2.a.f in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_6041_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6041_2_a_f();".
// 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_6041_a();"
function MakeCharacter_6041_a()
    N := 6041;
    order := 1;
    char_gens := [864, 4320];
    v := [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_6041_a_Hecke(Kf)
    return MakeCharacter_6041_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6041_2_a_f();".
// 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_6041_2_a_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_6041_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![57534003, -6361432074, -314366227737, 46998763558460, -756568969696590, -22957514601076403, 354151989298481959, 5307159082277259053, -45721022201641143638, -529864428353477729853, 3068688043871774273708, 28439339035559961421295, -127576024896006060078644, -940641372831605779163201, 3566472903315508058951841, 20868719168298623457891302, -70560500282195572355021169, -329065704560731082188841676, 1026126518902169389545825138, 3849903761932722981341636202, -11314835245983584900557112303, -34564964133769885311972241839, 97157221786695061576054819937, 244710802192422167441701805089, -664827104097908956621034564081, -1396912084480963417073244997281, 3698359646782034613750669145409, 6548905203210369840660456166127, -17014442496005855714543912524247, -25603225719666576220759467616928, 65691671278601898109286368749616, 84548956322913273460469992632676, -215550285565869800445474937145577, -238390458682053413377905510873396, 607602909695200589658978246296618, 579143183149548256829786897770630, -1485112904383121408141009046676632, -1221609516295564608628236625107438, 3172892471788726489363027861902348, 2251786144436374258861804065878822, -5966706893139962538009016471922508, -3646622026463033282456733995438434, 9936551788626006996998378456008350, 5210698050613206589657660496882199, -14732151494192224733246374292813943, -6591286020505264638148051154383470, 19536717163288739566584788614132971, 7397130355380471451762719670779059, -23268812693223018744109071161594718, -7371590037947421899680034323444947, 24980737933791529641877593496086720, 6517895283243648588147198286022821, -24251079566101876868832054077988725, -5096165522968826856293145519506389, 21348865167431306693216673176433264, 3496628673553100113718370059318596, -17084963012504240615429209213145850, -2071835472997160118690195963843143, 12456485023277457319603769743271176, 1022587958606564089101212522543971, -8289854025081157954902558410463150, -380010582264906811740381014061842, 5044133495078599753337320552594931, 61245773010255382677290659703637, -2810163192832641513039593829082076, 54306719765859220576725937456952, 1435170485972081287055578679202740, -70104243825833773030511980398416, -672563951873850270785382363977661, 51573898011308473006952008060179, 289444820219086269192303060038283, -29831996558883646472579248160324, -114461369798634771463085996016909, 14675956348469478170728493553340, 41609032845655887416079582959042, -6338888755553157007814595655697, -13907261443967885496259413637610, 2442773997142354402792065414726, 4273897256778026245883097620956, -847635601488746598215453019527, -1207391379686339636058046058268, 266343096972672558580449021695, 313423359331810460938315065388, -76056100898427162112162948106, -74711758483961765995877950207, 19781831206904180115229131019, 16338903441158471095632494432, -4692642633968285356539226394, -3274224460141076761573773462, 1015929435467624192294301664, 600309626066567514219978964, -200740912213631378603073379, -100503714332876512824921394, 36186989682399103107261247, 15327837423196632968250938, -5946119569555006022683016, -2123080593667106107795794, 889418976511766474191330, 266073861026227099179150, -120892345119618188574982, -30026572165167309457842, 14897929740279940215574, 3032246745080328696304, -1659840850579044321499, -271716530956809318589, 166620642892433587747, 21347335308314051570, -15007345681581786617, -1443420072535743257, 1206702014344926201, 81311740845064442, -86090101667252760, -3556536922399793, 5408801217429662, 95299485851154, -296484393915817, 1181623916111, 14014163951153, -332827909247, -562664003543, 23565951005, 18809209344, -1101579171, -509286443, 37663821, 10728739, -946079, -164947, 16720, 1646, -187, -8, 1]>],Snew);
    return Vf;
end function;