
// Make newform 4013.2.a.b in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_4013_a();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_4013_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_4013_a();"
function MakeCharacter_4013_a()
    N := 4013;
    order := 1;
    char_gens := [2];
    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_4013_a_Hecke(Kf)
    return MakeCharacter_4013_a();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_4013_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_4013_2_a_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_4013_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![608498, 72070939, 737853448, -158338766068, -3770991541273, 99750912342314, 2694890169330813, -23988900960396085, -667477077029548577, 1105903439233954677, 72081187686181320284, 131825071640495434371, -3783840883031688276748, -14013635625741257183493, 115530700845980034603924, 616170625958091364164149, -2236317293979586987249571, -16750448817726942534655217, 27385080730755298301528824, 320469768468476795394281630, -166669479111338490588267759, -4611400787621037937965213404, -946386178151527472714362430, 51993010303150929544619077286, 38064685138458398293971035067, -472276120394543967847520609184, -543990307423809817458210217401, 3525703947690012740636652074671, 5344379670099632153382795829743, -21951842738147949918975314123943, -40796019487113313085854000344531, 115224261327092120097806716371056, 254408644168989191193554172291571, -513676600829044960226992963763371, -1332484750349085568798036291893225, 1952897630588240335160849310020453, 5967860513830549040368825999710750, -6331216161711615905840688860607953, -23152726665882054807389936221614272, 17389949131165292195965852450181589, 78576669710586501219971788663533247, -39702117086102522959028254362510823, -235129027065227717592925438854349170, 71533639703424522776134139040678495, 624366964868267180919962527096542178, -84560945579029065372928810653249867, -1479229176582354746102406701694149291, -14456204770362845754166181709634581, 3141039180740691231009509852347598754, 432278313452106130590553050354342775, -6001213721566390870731780268681926522, -1517187468795868140132100321660866590, 10350639500639690894950214683606782628, 3716570449442372297713236812400487044, -16161064905686903867542724154043942802, -7426088163880102984448394191651306465, 22895744766192082527427938904020674902, 12751374859352989481409083015371073468, -29486991146048365442899823973741339325, -19286709195402590046487212465840843452, 34570299875736107620211928340424435246, 26060045910329803008841042316382239846, -36928232610617527003592682091640027595, -31741504793709787483430784801204082999, 35952199648020546448288428569017787893, 35070280243409586140698561331374122991, -31886768566143800889500842371533231254, -35311276545185448398663573950173523684, 25726606648143385869666422794370090579, 32514868257311093032960035792958395802, -18826299410132488066744020049594689076, -27456673412281530722853811639631264456, 12429137769586718900714608700613705071, 21309375048108447762194197623403108416, -7332206371803400443233690656695600380, -15227206708512852882922642410366080479, 3794769729741291424571892216549746403, 10032547924864076671153301852526399202, -1655962154461084112219735489057248464, -6101345013878639938349757472059685552, 544884460154902520827635526455915938, 3427883651453660487279086600560764060, -68851513291559216509492087798127584, -1780179863516078513322557379613093159, -78601691427434897469564356273514976, 854831725053613326591584984407242766, 89558458574223933185673834361556654, -379581708494824408118465943232841122, -61872964869506510233830888266784983, 155827933702079907933861247154833708, 34295884008761351581711427523290554, -59111332494544831828937540604685627, -16392879821346612770496106796609604, 20700845016834006191460313867166420, 6959471955856804945467580633483300, -6683425014118147298347078815168026, -2663632166635443040912221257172904, 1985341927135341022979851470951989, 926831978629349948479603822332748, -541066458445529274876887055422718, -294676999554442023077788333089524, 134721402006681164364257686377448, 85870865849088927738280367794064, -30456847588821345274969276183423, -22976613238969370634795117768819, 6190325172465479490940786567308, 5650228638286015639186883406746, -1112117196930576916978736093282, -1277285988764778248856018139807, 170796092033433056475723521280, 265342113932216069857111630007, -20632837227316833179177689752, -50611304953926649256624176696, 1374625225553336376814300835, 8851478771434158294743687251, 172909418973222220325452467, -1416694308415823313346035745, -90096595335524525955331796, 206976497901320497360648713, 21988991172604876094398020, -27511299809930334016224080, -4092449813059682536573588, 3312659771418996243179197, 638338327067677061563862, -359297491977993998208179, -86291746176258623873189, 34833460151647297859856, 10254393816379932915787, -2985592097509092264993, -1077414353270767853813, 222437648215708294157, 100205967888190069982, -13989119470788498607, -8233859352796348905, 697975518458058003, 595070619345658486, -22756623078829172, -37562088837688808, -95989718294540, 2050385897936684, 81262627785719, -95462616031543, -7145105350786, 3717601408021, 410369023092, -117624076481, -17608388089, 2882831855, 577228371, -49812155, -14201953, 455851, 248978, 2130, -2786, -113, 15, 1]>],Snew);
    return Vf;
end function;