
// Make newform 731.2.k.b in Magma, downloaded from the LMFDB on 18 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_731_k();"
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_731_2_k_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_731_k();"
function MakeCharacter_731_k()
    N := 731;
    order := 7;
    char_gens := [173, 562];
    v := [7, 3];
    // 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_731_k_Hecke(Kf)
    return MakeCharacter_731_k();
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_731_2_k_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_731_2_k_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_731_k();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![234897341502321, 9909769777383906, 207334981656246843, 3011312552582751219, 35603842950244814409, 350233411613421777348, 2897409023805544940506, 20893712711598650128238, 134543828092850549873014, 790486578598087707050091, 4600043128795107852506833, 24672650299101369956913645, 113256791322759450134130922, 500061162153224379474203008, 2290086388501510389444308614, 8545089392689653358819355222, 32815119310617928968942801135, 106925245074237526450410307273, 358529173377047921086468237154, 1016925818640909703269468218139, 3028470673583581559448823296320, 7514418458340273113280254622536, 20391946255507674542593146485271, 42355399832376302771372615034162, 110113314944209329664944108978057, 179299691566729805665529571643637, 490701192952318905468979014026855, 609712870349527579711335491922867, 1765932500656369636682877059425666, 1664031093404652261780838287286616, 5593260093897927044854278555629188, 4698576231695625386698950962811542, 18957886797182050600958253648159820, 12539234082072758717215678194570704, 56427473461049250595172814996469538, 22669829223964082205947103442275634, 148478421192457106252076015865327615, 19063003351227848493772777074030640, 361090508689814823152142796149509336, -34740748488425844654253618625175978, 831450077329704033193897883002698430, -238159444407065017481516917665000665, 1814365716466658125716608327564632640, -825746640385634925201685459530534390, 3749527632777952655823113577046590950, -2253159058171033997238667746001550623, 7299112738643456085938114605538313836, -5190577700506942637911281286777638563, 13234470316340226567285487113722922777, -10257451046845964995379436569006686129, 22035515106903050795650375396455385767, -17552601534436661334180274841816678882, 33319127861431433538686747188979228103, -26285520648970108624771031158072848159, 45540139084759593543612489340785603123, -34803772935693670099457685186262967861, 56412916852848192622342225725436292688, -41210734729479620493615357342486715996, 63841116960305714876721848817269036468, -44188193508454931303501098418336300242, 66644422511572892577914716837912031955, -43413165137171672906398099295078455253, 64662461878082480092034923847301881453, -39439770086392630134430878085981524949, 58495235717674155402353514913184508956, -33304928768149260886379345623619426943, 49292727265911325340045451432969383125, -26151750739704499568587115584572803832, 38617380881732110207770338874041535451, -19044291386642897000385641612997044271, 28123440339687130161571987525416627138, -12835354976876253129989786588286440218, 19090963011196852685391735831946587967, -8012169574291372755127283342399373174, 12137342299778675112133701659865278937, -4649014575621049245192664934135802700, 7265181659454132353828488057658937832, -2521559064974671022831908853747539082, 4113378053891983838228100982343453512, -1285811430711095762888596908451542815, 2210805749305287207992447307220266953, -619076632913111080363696656031943419, 1131316820097177474923100291950813155, -282176918797157713623394549821050738, 552625524704307552617897483521791476, -122013265578856131957752332103013418, 258266088125105272342182638547870886, -50173869851044025607090131114639243, 115677873237221559944303429831352180, -19691208449611389470362318855356655, 49717443319624258688703835725242324, -7406123766364331122913008384107390, 20523758940946114392943203889554967, -2679563247729506242718208109554058, 8145171483673903782743117760509555, -935931050379315600082805877593359, 3110416394234918509793356608858682, -317071446612796322928993700517450, 1143673105333934748354663485433009, -104823064654466715557549724898560, 405086093343948970051778999766464, -34050903961628780617256045421909, 138263506547071343819625935935456, -10929313435674982953937764403700, 45495986783313493869347868529934, -3474801227783161307341777605916, 14440755228367646987068566752416, -1093868628284672359193720068395, 4423864242695419274754472994908, -340195078971330127103763117806, 1308582413916766263751378262877, -104150232212491478312804287635, 373877798707713321154694795200, -31248870382634134699830845647, 103205922207848779827510974233, -9144472809685877753429259485, 27532583714874528743752352966, -2598376758253407057215441087, 7100042913508397962769747651, -714473707853748961931386913, 1770085302824222628039727559, -189649280279226802251223697, 426604562831505353095458979, -48503627441321484185146895, 99376820485511318004550776, -11933897086383648601206759, 22370670685299216706852864, -2821132216411347453443927, 4865157675436174577628698, -640158129358453253833966, 1021848548535327413319361, -139345889850588682109343, 207174372635095526861351, -29079767581432508531598, 40521983933076570466169, -5814240663545485129006, 7641685870126036530518, -1113116973440503225480, 1388642782662726515858, -203974900233525075546, 243039775833490434189, -35774949332709351712, 40947247670704099090, -6005996547340558075, 6637007826760501168, -964957045250734826, 1034218534022328929, -148267048236483138, 154803139225079602, -21764687475872815, 22234963091764851, -3049039329094421, 3060942732974356, -407209553340849, 403258069583959, -51771194696693, 50747422071711, -6248933789412, 6086180990952, -713120439090, 693555052205, -76555733421, 74803926942, -7689301603, 7598549987, -717994004, 722348320, -61675826, 63729368, -4769772, 5155277, -319362, 374892, -17353, 23692, -677, 1230, -14, 47, 0, 1]>],Snew);
    return Vf;
end function;