
// Make newform 750.2.g.f in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_750_g();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_750_g_Hecke();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_750_2_g_f();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_750_2_g_f();".
// 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 ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [11105, 21080, 1135, -10440, 18271, 14670, -15752, -11958, 6259, 4642, -1584, -936, 262, 94, -24, -4, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-3937464960694376208807150, 10909980253880609874290, 4367880524954808485966775, -3793916280374814064053405, -4124409552879054036847250, 6541910923410674123460038, 3383528419425177424453517, -3722976693962032640661930, -995606786520726165159631, 940839863277170749902944, 129297227346064400578539, -114171670315622323364112, -7361565068046490698696, 6575637123195862599235, 74147766037120284798, -124331836970744504653], [7156143218758356286761830, 11309202599703784457448365, -3854641598501837716805475, -1174098052347100141915960, 12660157620475920634264621, -520837642160472819150593, -8305753956702263280322716, -395430506863010239140326, 2708996138401524234569682, 226513676475120458160054, -516605312765193244552153, -21053103630938467151890, 50578789975047200516323, -921402929145846731332, -2183126573404481428433, 209159736194390048391], [2136427940493114503422100, 648738016230841178303300, -1056349544697974528792295, 1751624753872932949676820, 1561882257402276944726861, -1439503235730439393390400, -1201274203759528179191999, 521913912002145220106872, 469952553315433857842339, -132289916480158900957958, -96439403899597794479889, 23588922138538677715666, 9842957759035774370007, -2318583371847014159396, -425968439454909023504, 102309325228650587446], [-9407164594818287670817255, -17734990834966873730081015, 4133943182196483827525490, 4925945238169235710102170, -19148256425341350974570756, -8085776684625405647461687, 13763120912521780127885204, 5474050671796158148715760, -5213351275070544328036707, -1387265760628987533293941, 1150222220431644145305581, 108110770501365951462261, -124610339454716337184667, 2490277702882352021335, 5808783625511129416298, -670479263019788745785], [-2686892356943722466767320, -1107814885746452854956660, 3317734863222409081306840, -1780293400073412257719180, -3808469691277882506316428, 1829541259881354437224758, 2456515842661058092401641, -794296728242089068127598, -865180285576144364779891, 224574784032425709435836, 164810455922834007902603, -40151303735551147100534, -15994665739743758299833, 3827536126025598552754, 661637860075799467724, -161168803239414780910], [1025511991580005661458970, 2233536035317308402213160, -1332489074800974413015230, 47852376229771545163160, 1984064979606023800874943, -552527714012012839873230, -1736893910036273955685895, 317412747752376679716350, 733989392081838127266340, -130154545341889076617028, -157188061964900911061375, 31059323892781834514230, 16401138606042229504145, -3474010950605366952410, -719766109199837227876, 164194301487618633410], [37013945057741259112165345, 35595526950785121038204610, -18490124851268324162235165, 5489966983986384854079830, 22846655483573752362728564, -16098263057030993567480452, -16118425636653729282281897, 7320601361282167300608548, 5642406357669034386077444, -1895809192339090928409754, -1003793325992617889898975, 284678894770484789278470, 89796640790059785170276, -23177084126480302713084, -3309109148671381347040, 825056642206646510094], [-1862833702346511294005, -138919009303557699665, -397177517625382665270, 505928391316692432855, 923340028190882985219, -490690606807926089402, -644079276196991518248, 153197059671127395164, 310048599187705680258, -45801221197687274008, -82481752825489061671, 13887839469746901817, 9933253670715682559, -1860609118043167572, -492665369409056577, 104598747224765426], [18643312122164707842914550, 20901413307917712051094190, -19060768052021310152386215, -474060716346173434011010, 25809069667239674846026920, -228956620702937293280472, -16997086547094582400276701, -930510402260991489977198, 6061236953707159374779795, 177628563116669271684179, -1227766370670126017216354, 49886061591338898032808, 125296370582894203734943, -12322052446611331480586, -5521435521997049744420, 859713236482115609852], [-47144183174991746287899365, -9053887991424944922843230, 42303268443597858106548325, -23595384347996078052222815, -42553858164431329311678133, 21944052692670850116485037, 25268828066017828142550770, -10080713695248487371901390, -7812655204639800338589865, 2694574233052155278678463, 1316936298960483886112208, -422002315761784881699595, -116807717399885052847095, 35341444863509058882955, 4487270811728375756266, -1299460115152502818714], [-7059007511747828921024195, 16902766314303507068679540, 7139685534975283351542585, -24004942108699133343922970, -19653504225630344950830459, 16502279233119671663573202, 17123602090687909484947781, -6153182205258557589646920, -7016503552026061478237508, 1690323491955496542009196, 1495723271670466969311864, -328474931937103535490956, -156344262534607442120813, 34052760586501547966220, 6900925397189051255252, -1574592836099337492490], [447549436734811744865, -4675679905232544341130, 1163746031625484625835, 3978851942084407266110, -3031581271759148501187, -2091724606383707231214, 2766600939541982046314, 732992288018196793613, -1246646574051873818054, -80770827777351194341, 289468012713592247678, -17249871320965632266, -31863082084194063237, 4022774968630009901, 1471708972889622906, -262837931740539278], [28618714464164239808312900, 29567004918840064282809300, -23458020504097178603691515, 27756165531065041896261570, 55972537153637957963167105, -24738962377274390845889010, -43571452012557918258947878, 9804946141833297228418482, 15856621799947896145515181, -2893036099906017171709470, -2974115515932565987189328, 547695740967263618074580, 280490443341696305981869, -54486762474848731757146, -11172455764491969352578, 2365643750506328162390], [65518010360836941583122880, 47689420538635743669219245, -58426962480746019385967885, 20855257506891577069134660, 74171394571608120776072916, -28289173160041205306722842, -55567324465729717195955414, 13081532680110449770817232, 21409153250151372843474469, -4113043054477141084514633, -4420227892556850128769322, 870047975964352242942891, 454378839163092906914867, -93871916386571627516816, -19902964987349651471199, 4440686169386381053775], [-75703546008947066945526650, -75965468295132556936805890, 87542704144517841307017610, -16613144882732870207385855, -110696767774899917556625145, 24574219343129833574456582, 76261374056709458463173010, -9878555739706953941970584, -28289655256498226674975694, 3417436366642788689691063, 5704652211920580391491333, -837401864414122805737204, -575907897989313445655630, 98590510294232394702802, 24775096076881407709297, -4950975914693728326203]];
    Rf_basisdens := [1, 6049168327849478338182775, 6049168327849478338182775, 1209833665569895667636555, 6049168327849478338182775, 1209833665569895667636555, 1209833665569895667636555, 6049168327849478338182775, 759850311248521333775, 6049168327849478338182775, 6049168327849478338182775, 6049168327849478338182775, 759850311248521333775, 6049168327849478338182775, 6049168327849478338182775, 6049168327849478338182775];
    Rf_basisnums := ChangeUniverse([[z : z in elt] : elt in Rf_num], Kf);
    Rfbasis := [Rf_basisnums[i]/Rf_basisdens[i] : i in [1..Degree(Kf)]];
    inp_vec := Vector(Rfbasis)*ChangeRing(Transpose(Matrix([[elt : elt in row] : row in input])),Kf);
    return Eltseq(inp_vec);
end function;


// To make the character of type GrpDrchElt, type "MakeCharacter_750_g();"
function MakeCharacter_750_g()
    N := 750;
    order := 5;
    char_gens := [251, 127];
    v := [5, 2];
    // 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;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_750_g_Hecke();"
function MakeCharacter_750_g_Hecke(Kf)
    N := 750;
    order := 5;
    char_gens := [251, 127];
    char_values := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := true, Kf := Kf); // the value of chi on the gens as elements in the Hecke field
    F := Universe(values);// the Hecke field
    chi := DirichletCharacterFromValuesOnUnitGenerators(DirichletGroup(N,F),values);
    return chi;
end function;


function ExtendMultiplicatively(weight, aps, character)
    prec := NextPrime(NthPrime(#aps)) - 1; // we will able to figure out a_0 ... a_prec
    primes := PrimesUpTo(prec);
    prime_powers := primes;
    assert #primes eq #aps;
    log_prec := Floor(Log(prec)/Log(2)); // prec < 2^(log_prec+1)
    F := Universe(aps);
    FXY<X, Y> := PolynomialRing(F, 2);
    // 1/(1 - a_p T + p^(weight - 1) * char(p) T^2) = 1 + a_p T + a_{p^2} T^2 + ...
    R<T> := PowerSeriesRing(FXY : Precision := log_prec + 1);
    recursion := Coefficients(1/(1 - X*T + Y*T^2));
    coeffs := [F!0: i in [1..(prec+1)]];
    coeffs[1] := 1; //a_1
    for i := 1 to #primes do
        p := primes[i];
        coeffs[p] := aps[i];
        b := p^(weight - 1) * F!character(p);
        r := 2;
        p_power := p * p;
        //deals with powers of p
        while p_power le prec do
            Append(~prime_powers, p_power);
            coeffs[p_power] := Evaluate(recursion[r + 1], [aps[i], b]);
            p_power *:= p;
            r +:= 1;
        end while;    
    end for;
    Sort(~prime_powers);
    for pp in prime_powers do
        for k := 1 to Floor(prec/pp) do
            if GCD(k, pp) eq 1 then
                coeffs[pp*k] := coeffs[pp]*coeffs[k];
            end if;
        end for;
    end for;
    return coeffs;
end function;


function qexpCoeffs()
    // To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
    weight := 2;
    raw_aps := [[0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, -1, -1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, 0], [1, 1, 1, -3, 0, -1, 1, 0, 0, -1, 1, 0, 0, 0, 0, 0], [1, 1, 0, -2, 0, 0, -1, 0, 1, 0, -1, 1, -1, 1, 0, 1], [0, 1, 0, -1, 0, -2, 1, 0, -1, -1, 0, -1, 0, 0, 0, -1], [0, 0, 0, 2, 1, 2, 0, 0, -1, 0, 1, 0, 1, 0, 0, 0], [-1, 1, 0, -2, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0], [1, 0, 0, -1, 0, -1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, -1, 1, 2, -2, 0, 0, 0, 0, 0, 0, -1, 0, 1], [1, 0, 0, -2, -1, -1, 2, 0, 1, -1, 0, -1, 0, 0, 0, 0], [0, 0, -1, 0, -1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1], [0, 0, 0, 0, 1, -1, 2, -1, -2, 0, 1, 0, 1, 0, -1, -1], [0, 0, 0, 0, 0, -1, 1, 0, 0, -1, -1, 0, -1, 1, 0, 1], [2, 0, -1, -1, -1, -4, 3, 0, 0, -1, -1, -1, 0, 0, -2, -1], [1, 0, -1, 0, 0, 0, -2, 1, 1, 1, 0, 0, -1, 1, 0, 1], [0, 0, 1, -3, 0, -2, 2, 1, 1, 0, 1, 0, 0, 0, 2, 1], [2, -2, -1, 1, -1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 2, 1], [0, 0, 0, 2, -2, 2, 0, 0, 0, 0, 2, 1, 0, 1, 2, 0], [-2, 1, 1, -2, 0, 1, 2, -1, -1, -1, -1, 0, -2, -1, -3, -1], [-6, 0, -1, -1, -1, 0, -6, 1, 1, -1, -1, 0, 0, 0, 1, 0], [0, 0, 2, 3, 1, 2, -2, -1, -2, 0, 0, 0, 1, 0, -2, -1], [-2, 1, 1, 3, -1, -1, -3, 1, -1, -1, 0, -2, 2, -1, 0, 0], [0, 0, 2, -3, -2, -2, 0, 1, 1, 0, 1, 0, 0, 0, 2, 1], [7, 1, 1, -5, 0, 0, 5, 0, 2, 0, 0, 2, -1, 0, 0, 0], [-4, -1, 0, 4, -1, 2, -2, 0, 0, 1, -1, 0, -1, 0, 0, -1], [-2, 1, 0, 2, 1, 4, -4, 0, 1, 0, 0, 0, 0, 0, 1, 0], [-3, -2, 0, 2, 0, 5, -2, 0, -1, 2, 0, -1, 0, 0, 2, -1], [-3, 0, 1, 4, 0, 4, 0, -1, 1, -1, 0, 2, -1, 1, 0, 1], [-3, 2, 0, 3, 2, 1, -1, 0, -2, 1, -1, 0, -1, 0, -2, -2], [-2, -3, -2, 1, -2, -2, -3, 0, 1, 1, 0, 1, 0, 0, 0, 1], [3, 0, 0, -8, 0, 0, 8, 1, -2, 0, 0, -2, 1, -1, 0, 0], [-1, 1, 1, 5, 0, 0, -5, -1, 2, 0, 0, 2, -3, 1, 0, 0], [-11, 0, 0, 3, 2, 2, -3, -1, 0, 2, 0, 3, -2, 1, 0, 0], [7, -1, 0, -7, -1, -7, 7, 0, 0, 0, 2, 0, 2, -2, 0, 1], [4, 2, 0, -6, 0, -4, 0, 0, 0, 0, 0, 0, -2, 0, -2, 0], [4, 2, 3, 1, 3, 2, 2, -2, -1, 1, 3, 2, 0, 0, 1, 2], [0, 0, 2, 1, 0, 2, 0, 1, -1, 0, 1, -2, 2, -2, 0, 1], [-4, -1, 0, -1, 0, 1, 3, 1, -3, 0, 1, -4, 3, -3, 0, -3], [-2, -3, 0, 2, -3, 5, -5, 0, 0, 1, -3, 0, -3, 1, 0, -1], [-10, 2, 2, 2, 2, 2, -2, 0, 1, 2, 0, 0, 0, 0, 0, 0], [0, 0, -2, 4, 1, 2, -3, -2, -5, 0, 3, -1, 3, -1, -2, -2], [-1, 0, 0, -2, -1, -1, 2, 3, 1, -1, 0, -2, 4, -3, 0, 0], [0, 0, 0, 0, 0, -2, 0, 0, 2, 0, -2, 0, 0, 0, 2, 0], [-3, 3, 2, -1, 2, 7, -3, 0, -4, -1, 4, 0, 0, 0, 0, 0], [-6, 0, 2, 2, 2, 5, -5, 0, 1, 2, -2, -1, 0, 0, 1, -1], [0, 0, -1, -1, -1, -1, 6, 0, -1, 0, 2, -1, 1, -1, 1, 0], [-6, -3, -2, 6, 0, 6, -2, 0, 0, 2, -1, 0, -1, 0, -1, 0], [-6, 2, 2, 0, 2, 4, -6, 0, 0, 0, 0, 0, 0, 0, -2, 0], [-5, 0, 0, 5, 0, 5, -5, 0, -3, 2, 2, 0, 2, -3, -3, -1], [-5, 0, 0, 9, 3, 3, -9, 0, 0, 3, 0, 0, 0, 0, 0, 0], [-1, -2, -2, -3, -3, -3, 3, 0, -1, -3, 0, -4, 0, 0, 0, 0], [1, -3, 0, -1, -3, 1, -1, 0, 0, -2, -2, 0, -2, -2, 0, -3], [4, 1, -1, -8, 0, -4, -1, 1, 0, 1, 0, -1, -1, 0, -1, 0], [0, 0, 1, 4, 3, 4, -9, 0, 1, 0, 0, 5, -1, 5, 1, 0], [1, 0, 0, 0, 0, 11, -2, 0, 1, 0, 2, 3, 0, 0, 3, 3], [-13, 1, -1, 0, 0, 14, -2, 1, 1, 1, -1, 0, -2, 1, -1, 1], [5, 2, 3, 2, 0, -6, 4, 1, -1, -3, 0, -2, 1, -1, 0, -1], [1, -3, -3, -8, -1, -1, 8, 1, -1, -1, 0, -4, 3, -1, 0, 0], [-7, -2, -2, 2, 1, 1, -2, 0, -3, 1, 0, -3, 2, 0, 0, 0], [3, -2, -3, -1, -3, -3, 2, 3, 4, -1, -3, 1, 0, 0, 4, 1], [12, 0, 0, -12, 0, -17, 17, 0, 2, -1, 3, 0, 3, -1, 2, 1], [4, -4, -2, 12, 0, -4, -2, -1, 0, 2, 2, 1, 2, 0, 2, 0], [6, -1, 1, -6, 0, -4, -1, -1, 2, -1, -1, 3, 0, 2, 2, 2], [16, -1, 0, -16, -1, -10, 10, 0, 0, -1, 0, 0, 0, 0, 0, 1], [0, 0, 3, 5, -2, 6, 4, 1, -3, 0, 5, -3, 4, -3, 2, 1], [2, 2, 2, 1, 1, 1, -1, -1, 1, 1, 0, 0, 2, 1, 0, 0], [0, 0, -2, -4, -2, 0, -10, 4, 4, 0, -2, 0, 0, 0, 2, 4], [-5, -1, 0, 5, -1, 5, -5, 0, 2, 0, -2, 0, -2, 2, 2, 1], [-4, 1, 2, 4, 0, 4, 2, 2, 0, -2, 2, -2, 0, 0, 0, 0], [-4, 0, 0, 0, 0, 20, -2, 0, -2, 0, 0, -2, 0, 0, 0, -2], [0, 0, 0, -2, 6, 2, -6, 4, 0, 0, 2, 0, 4, 0, 2, 4], [-4, -1, -3, 2, 0, 4, -3, 3, 0, 3, 3, -3, 2, 0, 2, 0], [-2, 0, 0, 0, 0, -2, -3, -3, -1, 0, 2, 1, 0, 0, 0, 1], [0, 0, -2, -6, 2, -6, -14, 0, 0, 0, 2, -2, 0, -2, 2, 0], [5, -3, -3, 6, 0, 0, -6, -1, 2, 0, 0, 4, 3, 1, 0, 0], [-9, 0, 0, 9, 0, 16, -16, 0, 2, 2, -2, 0, -2, 4, 2, -2], [-2, 2, -1, 8, 0, 4, -3, -3, 2, 1, 5, 5, 2, 2, 4, 2], [0, 0, -3, -2, -2, -1, 2, 1, -1, 0, 3, -1, 2, -1, 2, 1], [-1, -5, -2, 2, 0, -2, 1, 0, -3, 2, 3, -3, 3, -3, 0, -3], [6, -3, -3, 1, 0, -9, 0, -2, -3, 3, 4, -1, 4, -3, 1, -3], [5, 6, 1, -5, 1, 6, 1, 3, 5, -5, -1, 4, 0, 0, 3, 4], [-6, 3, 3, 7, 5, 5, -7, 1, -1, 5, 0, -1, -1, -1, 0, 0], [3, 1, 1, 2, 5, 5, -2, -2, -1, 5, 0, 3, -1, 2, 0, 0], [-14, 4, 4, 19, 1, 1, -19, -1, 1, 1, 0, 2, -1, 1, 0, 0], [3, 5, 1, -4, 1, -1, 6, 0, 1, -4, -4, -3, 0, 0, -5, -3], [3, -2, 0, -3, -2, -10, 10, 0, 0, -3, -1, 0, -1, 3, 0, 2], [3, -2, -1, 0, 0, -4, 0, 2, -1, 1, -2, -3, 1, -1, 0, -1], [0, 0, -2, -7, -5, -9, 10, -2, -3, 0, -1, -3, 1, -3, -4, -2], [6, -1, 0, -6, -1, -8, 8, 0, 0, 0, 2, 0, 2, -2, 0, 2], [-4, 3, 0, 4, 3, 6, -6, 0, 0, -1, 0, 0, 0, 0, 0, -1], [-1, 1, 1, 7, 0, 0, -7, -1, 2, 0, 0, -1, 1, 1, 0, 0], [0, 0, 4, -2, 2, -4, 8, -2, -2, 0, 2, 0, 0, 0, 0, -2], [10, 1, 0, -10, 1, -5, 5, 0, 1, -1, 7, 0, 7, -1, 1, 3], [0, 0, 0, -4, -3, -5, 10, -1, 0, 0, 1, -1, -1, -1, 1, -1], [-3, 2, -3, -5, -3, -3, -8, -1, 6, -5, -1, 5, 0, 0, 0, 5], [-4, -4, 0, 4, -4, -9, 9, 0, -3, 1, -3, 0, -3, 1, -3, -3], [0, 0, -4, -11, -1, -11, 10, 0, -1, 0, 1, -1, 1, -1, 0, 0], [-1, 1, 1, 4, 5, 5, -4, -2, 3, 5, 0, 4, -3, 2, 0, 0], [-2, 2, 0, 2, 2, 8, -8, 0, -2, 2, -6, 0, -6, 3, -2, 0], [0, -2, -1, -3, 0, -3, 2, -2, -3, 1, 2, -1, -1, -3, -4, -3], [0, 0, 3, 18, -3, 19, -2, 1, -2, 0, 2, -3, 3, -3, 0, 1], [6, 0, 3, 3, 3, 0, 7, -4, -5, 3, 4, -1, 0, 0, -4, -1], [-17, 1, 0, 17, 1, 10, -10, 0, -5, 0, -2, 0, -2, 2, -5, -4], [6, -1, -1, 0, -4, -4, 0, 2, -4, -4, 0, -4, -1, -2, 0, 0], [-3, 1, 1, 11, 0, 0, -11, -1, -2, 0, 0, -1, -5, 1, 0, 0], [-10, 6, 6, 5, 4, 4, -5, 3, 0, 4, 0, -6, 0, -3, 0, 0], [17, 0, 0, -17, -4, -4, 17, 1, 0, -4, 0, -1, 3, -1, 0, 0], [-7, 4, 0, 7, 4, 3, -3, 0, -3, 2, 0, 0, 0, -2, -3, -3], [-18, -1, 0, 2, 0, 16, 2, 2, -2, 0, 1, -4, 5, -2, 3, -2], [-4, -2, -2, 8, 0, 2, 0, 0, -2, 2, 2, -2, 0, -2, -2, -2], [-3, -1, 0, 22, 0, 6, -3, 0, 3, 0, -3, 3, -1, 3, 2, 3], [-2, -2, 0, 2, -2, -8, 8, 0, 2, 2, -4, 0, -4, -2, 2, 0], [4, 6, 6, -2, 0, 0, 2, -2, -2, 0, 0, -2, -4, 2, 0, 0], [0, 0, 0, 19, 1, 15, -10, -4, 1, 0, -3, 5, -5, 5, -2, -4], [0, 0, 1, 9, -3, 9, 3, 0, 5, 0, -4, 2, -5, 2, 1, 0], [-5, -4, 0, 5, -4, 13, -13, 0, 0, -1, -2, 0, -2, -2, 0, -4], [6, -4, -6, -2, -6, -10, 8, -4, -2, -2, 0, -2, 0, 0, -4, -2], [-18, -5, 0, 5, 0, 6, -16, 1, -1, 5, -1, -2, 0, 0, -1, -2], [2, 2, 0, -2, 0, 12, 4, 3, 0, -2, -2, -2, 0, 0, 0, -2], [-16, 0, 0, -2, 0, 14, 2, -1, -2, 0, 8, -1, 4, -2, 2, -2], [6, 3, 0, -6, 3, -7, 7, 0, -2, -1, 1, 0, 1, 5, -2, 5], [-7, -2, -2, -3, -1, -1, 3, 0, -7, -1, 0, -4, 6, 0, 0, 0], [0, -5, 0, 0, -5, -6, 6, 0, 4, -3, 1, 0, 1, 2, 4, 3], [-8, -5, -7, 8, 0, 10, -9, 1, 2, 7, 3, 1, 2, 2, 4, 2], [5, 6, 3, -3, 3, -13, 4, 1, 0, -3, 1, 1, 0, 0, -2, 1], [-4, 4, 0, 14, 0, 6, -2, 0, 2, 0, 2, 2, -2, 2, 0, 2], [5, -1, 1, 2, 1, 9, 7, -1, 1, 2, -3, -2, 0, 0, 0, -2], [12, 1, 1, -7, -1, -1, 7, -1, -3, -1, 0, 2, -3, 1, 0, 0], [3, 0, 0, -14, -5, -5, 14, 0, 3, -5, 0, -4, 0, 0, 0, 0], [-12, -6, -6, 11, -2, -2, -11, 4, 2, -2, 0, -1, 6, -4, 0, 0], [5, 3, 4, 1, 4, 11, 4, -3, -7, 1, 8, 1, 0, 0, -2, 1], [0, -4, -4, 12, 0, 3, -7, -6, 3, 4, -4, 9, -6, 3, -3, 3], [1, 3, 0, -3, 0, 0, 1, 1, 4, -3, -4, 0, 0, 0, -7, 0], [-3, 6, 0, 3, 6, 10, -10, 0, -2, 3, -3, 0, -3, 5, -2, -2], [0, 0, -6, -12, -1, -9, 6, 3, 8, 0, -7, 4, -5, 4, 1, 3], [11, -5, 0, -11, -5, -12, 12, 0, 1, -1, -1, 0, -1, -1, 1, -2], [1, 4, 5, 1, 5, 17, 0, 1, 2, 1, -1, 1, 0, 0, 4, 1], [0, 0, -1, 5, 1, 5, -2, 0, 1, 0, 5, 1, -1, 1, 6, 0], [19, 1, 2, 1, 2, -23, 23, -4, -4, 1, 0, -4, 0, 0, -4, -4], [-11, 1, -1, -2, -1, -7, -15, 2, 3, -2, 1, 4, 0, 0, 4, 4], [0, 0, 3, -1, -1, -1, 0, 0, -5, 0, 8, -7, 5, -7, 3, 0], [-13, 2, 5, 3, 5, 5, -10, -1, 0, 3, -3, -3, 0, 0, -4, -3], [0, 0, 0, 5, 0, 4, -2, -1, 3, 0, -6, 4, -4, 4, -3, -1], [8, 4, 4, -18, -2, -2, 18, 0, -4, -2, 0, -2, -6, 0, 0, 0], [16, 0, 0, -16, 0, 6, -6, 0, -2, -4, 0, 0, 0, 0, -2, 2], [-10, 1, 0, 10, 1, 29, -29, 0, 0, 1, -5, 0, -5, 3, 0, -1], [5, 0, 4, 4, 4, 13, 1, 3, 2, 4, 2, 4, 0, 0, -4, 4], [-6, 6, 4, 14, 0, 8, 2, -2, 2, -4, -6, 4, -4, 2, -2, 2], [-3, -7, -4, 10, 0, 4, -5, -2, 1, 4, 9, 3, 7, 1, 8, 1], [5, 2, 0, -5, 2, 4, -4, 0, 2, -1, 7, 0, 7, 1, 2, 0], [5, -2, -2, -18, -3, -3, 18, -2, 1, -3, 0, 1, 2, 2, 0, 0], [13, 5, 3, -2, 3, -17, 11, 5, 5, -2, -3, 2, 0, 0, 0, 2], [-2, 5, 5, 22, 0, -2, 9, -1, -4, -5, -1, -3, 2, -4, -2, -4], [0, 0, -7, -3, 3, 0, -24, 3, -2, 0, 0, 2, 5, 2, -2, 3], [-16, -1, 0, 16, -1, 15, -15, 0, -1, -2, 1, 0, 1, -3, -1, 2], [2, -4, 0, -2, -4, -4, 4, 0, 5, -1, 4, 0, 4, 0, 5, -1], [0, 0, 4, 1, -1, 6, 7, 5, 6, 0, -3, -3, -1, -3, 3, 5], [0, 0, -2, -10, -1, -14, 8, -4, -3, 0, 5, -4, -1, -4, 2, -4], [8, 4, 3, -12, 0, -8, 3, 3, 0, -3, 3, -3, 4, 0, 4, 0], [0, 0, 1, 14, -2, 16, -4, 2, 4, 0, -4, -2, -2, -2, 0, 2], [12, 3, 3, 0, 3, -20, 14, 2, -3, 0, 1, -2, 0, 0, 0, -2], [-19, 5, 0, 8, 0, 22, -3, -4, 3, 0, 9, 7, 3, 3, 6, 3], [10, 7, 0, -10, 7, 1, -1, 0, -4, 1, 3, 0, 3, 0, -4, -5], [0, 0, 2, 0, 0, 4, -20, 4, 2, 0, -2, -2, 2, -2, 0, 4]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_750_g_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_750_2_g_f();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_750_2_g_f(:prec:=16)
    chi := MakeCharacter_750_g();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 2));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(997) - 1;
    while true do
        trunc_vec := Vector(Kf, [0] cat [f_vec[i]: i in [1..prec]]);
        B := Basis(S, prec + 1);
        S_basismat := Matrix([AbsEltseq(g): g in B]);
        if Rank(S_basismat) eq Min(NumberOfRows(S_basismat), NumberOfColumns(S_basismat)) then
            S_basismat := ChangeRing(S_basismat,Kf);
            f_lincom := Solution(S_basismat,trunc_vec);
            f := &+[f_lincom[i]*Basis(S)[i] : i in [1..#Basis(S)]];
            return f;
        end if;
        error if prec eq maxprec, "Unable to distinguish newform within newspace";
        prec := Min(Ceiling(1.25 * prec), maxprec);
    end while;
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_750_2_g_f();".
// 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_750_2_g_f( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_750_g();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![316, 1304, 592, -1328, 205, 148, -33, -4, 1]>],Snew);
    return Vf;
end function;