
// Make newform 336.2.bq.b in Magma, downloaded from the LMFDB on 24 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_336_bq();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_336_2_bq_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_336_bq();"
function MakeCharacter_336_bq()
    N := 336;
    order := 12;
    char_gens := [127, 85, 113, 241];
    v := [12, 3, 12, 4];
    // 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_336_bq_Hecke(Kf)
    return MakeCharacter_336_bq();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_336_2_bq_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_336_2_bq_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_336_bq();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![13049256881422336, 23441778828902400, 21055489966080000, -268174734305263616, -31292918347012767744, -35244552019029000192, -10065586279942193152, -520076304108044156928, 61379928119718870777856, 178765342415655236796416, 256242341424693900214272, 4371704808306409578954752, -14197459298660771650600960, -87492279648749965157597184, -34736850215156361946202112, -675345993480054786398093312, 4752231435959959744391151616, 6181588668503316103257128960, 4324222107351550522705313792, 12239850448110423794211880960, -283656748428101336236029378560, -261946956630233089719516790784, -113801273793026480471879450624, 154640571618091446757492260864, 12167119992154508290946168258560, 4637641451199993707866147913728, 2519564846173036055641569886208, -48665932319099565991829707948032, -210460102328285280776615059324928, -24297865198686289826800796237824, 126363979290658006214344343552000, 664208842979650211288264410136576, 2097543836366558677781693981732864, 665396606920504042300760441470976, -573115517719010980238303742263296, -4588513966152575605063584034226176, -12674971355860628915345487899856896, -5693797456757178776394711118364672, 4384858387025021443892681492692992, 13274913180994906474358549819531264, 41585515098115121648682030518190080, 54111707856174568789111552367515648, 44866297782062498490931167146696704, 40539932548139659279008353273806848, 22523073688392321419372620749526016, 869215058226108819604980670497792, -4922607760824447640808142988759040, -7498874979458214913027341391519744, -6363785480966960852341521453323648, -1672901056251469430176164151008768, 218459044605016432678136791212544, 936436958774610721850616467303424, 999718037300232264545793084957824, 340730924278503114726405362429568, 38525285707682543854724722662400, -68168146638370328375990388819200, -96665317710458434583443174529504, -35704916743140253694275217807968, -5408912586305812752763541594368, 4096749532150769189817717240672, 6713026731452672932848409891696, 2401452067065557323874940427648, 373463635249528594242848397568, -191242121070219253715287390560, -336123964218163288052086350895, -114468721607857650933487821896, -17203141469483015420103872736, 7215802287031864806466973872, 12824284131622547221572302817, 4111715508152890403355258336, 591026416076874573411750496, -212457774524674482876420728, -377419768398432331489129964, -114706694960520191069012200, -15879506006029174022544160, 4903658343007959642978016, 8779541703750356190771155, 2547873257080852402015104, 344491672240395133032800, -86525652148974148695864, -161884523811323455429751, -45451353248798082330768, -6108900118008791843328, 1145741746493383858736, 2389209222458923327350, 658005855337625820368, 89423478242010314368, -10516049972510828592, -28057910088769825827, -7707111918600816168, -1073608433899579168, 52783551215782304, 262543874983712855, 73227453868877920, 10556316933176032, 164817659430728, -1924901474501427, -556499571786832, -83322829944192, -5931522147248, 10943317049526, 3363814275312, 524222040064, 62734022928, -45888139591, -15629738056, -2530855840, -402292320, 133941795, 54479008, 9170400, 1775208, -200268, -127176, -22176, -4896, -47, 176, 32, 8, 1]>],Snew);
    return Vf;
end function;