
// Make newform 6017.2.a.d in Magma, downloaded from the LMFDB on 12 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_6017_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6017_2_a_d();".
// 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_6017_a();"
function MakeCharacter_6017_a()
    N := 6017;
    order := 1;
    char_gens := [3830, 2190];
    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_6017_a_Hecke(Kf)
    return MakeCharacter_6017_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_6017_2_a_d();".
// 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_6017_2_a_d( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_6017_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![-19904, -1531840, -16796460, 1411900308, 43752308043, 235068351096, -5200620397816, -56966338525759, 84143189734153, 2776444259132956, 2997759606691267, -67717438203133303, -141545518826859837, 1041660155752849684, 2773253949068992904, -11266901932564791460, -34369213970324258102, 91246161737389211119, 305173937600980136033, -576125700184365775646, -2066428544777674851673, 2916146128171487504430, 11088587735682227509914, -12072784819816305787560, -48415282610868079775566, 41493140566091962913140, 175374931709239937196456, -119721261538399502803847, -534949682725897135047015, 292417572466213449058363, 1390487729360610582995189, -608159090155536197853778, -3109706805489892876304424, 1080705131386222291767650, 6031727413082246545082319, -1641878111112167625579872, -10215325321016685148175480, 2125427518023521299612661, 15192533836231990460416361, -2320317545740175375680168, -19938783831639281690736467, 2083317960881684566190573, 23189155108492944934760231, -1439172116719969163974381, -23986466027228859500448802, 587383694425542045657846, 22136261587639906509229441, 198982589061557620511855, -18275576306228804166140388, -712095148867854910618820, 13529113590010471174043105, 891801590499784235376421, -8998030591592053072796191, -811982207002447993817523, 5385312591816506689164941, 604544951780867235097267, -2904225935818487824100848, -384069233414244901986971, 1412691384385305014937307, 212514967031207301990207, -620264186122080261644824, -103596633559488682887416, 245928127647034540594458, 44802971145105996800804, -88065209330261616375803, -17265957978760673606205, 28477181771155560879121, 5945739578994892883522, -8311526501082235021925, -1832576533483722166843, 2187782230784723233150, 505923479270818540524, -518747843020992739556, -125105877230224576008, 110624438814532614496, 27691952362587977893, -21174064982285270784, -5479535898415523592, 3628314471000234411, 967365879688246359, -554852709197422013, -151958585485480163, 75428002837509708, 21165418675738388, -9071894595700481, -2602346351200627, 959686452480329, 280875476229742, -88650728941838, -26425838241509, 7086487243503, 2148173885130, -484618530959, -149187868457, 27935171401, 8722602827, -1330805366, -421009081, 50982788, 16324926, -1509048, -488643, 32379, 10594, -448, -148, 3, 1]>,<3,R![-2485795611644, -97829094178904, 1812205288716705, 54824670175458033, -523792833756543385, -4582263536769834037, 44459768986338919272, 118894238050447110946, -1523321440821170351789, -1398202737893805924850, 29834676501669593705756, 5682980359356620729837, -389917878528004105642131, 58742457628341637128890, 3696558291349090427415068, -1131114758116104975047772, -26752885806846980989544576, 9595930020331720015365793, 152903997752180297723211790, -53615488144556721156797270, -706812816782534280361762672, 216280679967405778686664994, 2689361263605750546669706998, -644824162212709742155591369, -8536207868508731051943421484, 1380164535836093056464541968, 22841203972323932210195182655, -1781518542964954393528824184, -51962370513661628205069463058, -385351140758974256000695237, 101202564525827634899147758069, 9346849479063209104487503332, -169718366024550102628315216491, -29845211753293506799435509212, 246252491989062508493272771407, 63488669250451840312119876065, -310353922435795699397601441070, -105177315076873525498049805413, 340817620609182948086394039448, 143259964498093535773918637684, -326877808203534161385464558590, -164778757389781707973254250916, 274199242935060765973228497690, 162593282159012319015421074427, -201236652746679519492976053312, -139074791418775534926404233204, 129066241011569838366209101495, 103879371851018712642073072721, -72101035041850543214889931509, -68121934450584149358751453455, 34840384656016021337899478703, 39379118571207643362141818251, -14363508649019376928178765159, -20125800365887584585018733560, 4907347719044405385332584546, 9112851738906900955850230041, -1290682173174112251963199315, -3660426110503439676195806417, 194018255798078970921279318, 1305002450555451915430570199, 33958265870786010943295018, -412821738880402598576253854, -40765560202955356275701724, 115729009809469707179251342, 19469159036670161892224231, -28680600755664834693984211, -6817519314357021583223083, 6257834089236515840842039, 1947449359185803527750087, -1194237014690447420077748, -471309717126635409286890, 197196243114158302740418, 98274554661323447554327, -27645234384688527719413, -17793119374898486600376, 3168062751554030142153, 2805498643751400946550, -269237630759451235780, -385103534047104666947, 10596591032403571689, 45882749980387737561, 1485271854474050467, -4717580571970298052, -413591732626694492, 414739571435573919, 59009944350245580, -30729962783214623, -6185923498355679, 1874353924495844, 513089344752140, -90112277344893, -34364289978102, 3082409106001, 1857366714208, -47860986191, -79862217662, -2071588901, 2652787684, 190707793, -64496240, -7677676, 1025495, 187989, -7408, -2717, -46, 18, 1]>],Snew);
    return Vf;
end function;