
// Make newform 650.2.bd.b in Magma, downloaded from the LMFDB on 02 January 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_650_bd();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_650_2_bd_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_650_bd();"
function MakeCharacter_650_bd()
    N := 650;
    order := 20;
    char_gens := [27, 301];
    v := [17, 5];
    // 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_650_bd_Hecke(Kf)
    return MakeCharacter_650_bd();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_650_2_bd_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_650_2_bd_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_650_bd();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![6046717133209600000000, -45276947571507200000000, -645369010948326400000000, 2832063938784473600000000, 18457889447559651072000000, 14186775498096261248000000, 593971481268436778648000000, 1081649845258033241557600000, -3301818501266588950499190000, 7753767883136871020243910000, 16536473230446439551094045000, -100963513471055286099385790000, 272751416709243572554746295500, -66688231920458087075923303000, -2034906396895882802623638792750, 7710036609925775029587485418250, -9103323543562224943273025631975, -18171601270611833438627459650200, 95578775140865963404776372128300, -172440838975300605651303924310400, 94352858467756088071843964787170, 260881589640633261806827129122100, -751002758537078890517082277237560, 937905337386125749758787417242560, -394905892042613898609069004910789, -852067896045131348041343619146162, 2263133996662410597178913826993302, -2997174261341175360058908691155580, 2156963505129818426857090485106967, 508013786785189608277193631174086, -4123773895568247533350407513191046, 6400835415141792161837462482220772, -4647064890059133720774138197610447, -1301552609548571616644573620507846, 8318442963423011163396269631047656, -11136876591055534927199705355975394, 6270922653442596274629222821798385, 3911451473543922690223008331146156, -13293006074230510154431855894762990, 15495035485112490918719566436599458, -8297905887785868895955518674878809, -3217918911718314975857224054373968, 12637240281192498346202969744862882, -15880859863301115956367283461000200, 12515135184207502209579200499090615, -7195306127394540065807307898391184, 3276529515505093390274719182050450, -1752173961353063664115287375722314, 2762935797310777926096235525108687, -3872436875638145810947226360093674, 4158756055770397426037271952062222, -3800140515451070504722142211897948, 2493078893829348139596708842810717, -1505036415499834861880984325944042, 911971644430674938252087629361454, -324846007359275941210959966794276, 347417753854533527956203404623926, -348462617302543057533053863702180, 200432088398179280539099801431752, -241894988485781555480413202234482, 124732801280606519158190403995698, -40597720874879717788142800971352, 45727670948775881517713633987694, 9659440731987299862836664078688, 519823550626419253611119270543, -8201584592652033443960862010668, -5757656560874033364682024792046, -6524594757608955118856176201512, 1717103696891662340013226661473, 1848028824268007222344426695484, 2304542174796374185994219966758, 1221573335984819598634867032700, -391277436275601407463831946131, -495320655058074272553151799700, -498129173925040911540939590158, -171510282893655714035930326314, 57814166866490796207228786321, 77446206006444610980217422974, 65569679536467864357712667056, 18827226760151587982745584400, -3152091170547706384455367620, -6499465669435910732855393960, -4990674262387923342583213706, -1483965681794795297308693736, 92194462603495522068465321, 309478236750515805255660838, 268057096120366971576329626, 73197382348864475697097272, 1676958672025410414445056, -10443949937834432423677590, -10761531866845206429038972, -2565842351948508989630084, -162880474497981906315354, 309291543718517066252062, 380339265577045851737308, 73937629331683576425364, 7355897148224458129160, -7547618566383398538862, -12136962586261379298946, -1729569006186851557710, -304669259271589084657, 125549925784146424918, 343138026101064961650, 22855159775156082510, 12993934041888274398, -1141100741445203892, -8203262473114322338, 111404875725144736, -342376526304017390, 16277796149271270, 181245981038402298, -8351216812359510, 8629944701876241, 335678181840510, -3307503709056394, 284475854152616, -163419951077128, -8962003178470, 54045545503134, -6710332292830, 3110927384522, 56938317440, -729540233240, 102282825686, -45159435892, 344470246, 8055339192, -974115122, 505059340, -11254, -69778082, 7496506, -4151921, 75274, 536206, -40818, 36372, -1188, -3048, 136, -251, 8, 10, 0, 1]>],Snew);
    return Vf;
end function;