
// Make newform 930.2.n.h in Magma, downloaded from the LMFDB on 25 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_930_n();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_930_n_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_930_2_n_h();".
// 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_930_2_n_h();".
// 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 := [12851, -73519, 274580, -652345, 1014415, -1042897, 699483, -289745, 62400, -2185, -147, -1202, 480, -60, 5, -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], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-3265763473393338711863191411345, 11456330628240068357637938427999, -43400069378555293292301566317112, 87227013597503290618417020629940, -104931746814290847736868416041548, 76807429790805254368589160739546, -33158490879816571942413260174007, 7011061192510602284544734103246, -60390001173110533704205244515, -43719634977046924108962551686, -143449490434185843031757914498, 54074430053964935169047259599, -5847932363375733433252536267, 454642135257016153777677250, -504646929512976890497221763, 100088349171015463663880816], [2432054689959008736271955604856, -9639099017232392800687731037822, 15419305728016429960557834157345, -27090209423483029764701745141093, 38666701433427233655510616524551, -36551277121293757643195285806656, 20627455348358108371990451602931, -6217748222086829339666660957995, 513205486148578354014107077599, 135832888339413745073980002557, 51346841598413227880090960875, -41750337174754291989349315977, 6702361361979112055382235630, -75170297328050902412616558, 226222368817637316589270116, -115503386275919477965347643], [9766064023617170590224092808989, -39653728578724565795390752563108, 126918923437692669143338134916660, -228845247118184021493610268948343, 264478533471293026541042531043397, -186568536869247490647807826188050, 76328246556930830542379479752654, -14263644062230145642642778705360, -331588296670156476849489703246, -15543625802022652588377384016, 364462689261061743860368382693, -116118567510895265871703004548, 10218524284159446343073124390, -1399083663172131995284811573, 1206689587068232865481313397, -182306882795156956529944138], [574824402489950639176648206282, -3228901293194488933352712275657, 8911382321366949719358888482908, -34869099510987746139326388104544, 69243020313937186563261420590115, -75742042806446422186923284178235, 46115674763981167670419858083106, -14454443936656341920986335022544, 1190642370840898739739411649342, 355650734130836024649468337700, 105298205995885655479447816164, -95728483213498980599729338907, 15309311579452963923643222418, -54753381720615092665945564, 499851217189271908425729415, -267872744379589568741842489], [479955009670246896417948626818, 48858195008461400178894845422, 13818261754071428769608772973467, -64368938012934330668982904574676, 115687146179786325569310928705295, -112206139941989709882640354513475, 61408588995994646032989610028824, -17277728006105657375126805122591, 1090044670431285135647326039808, 362418380979748745566623022785, 178197010178434026884837785186, -118580669734855555864339572253, 17300678585491174499833895837, -291133853146961018527918331, 747990876795248058889024325, -303136675452287903298322056], [9113472569919452397003935131039, -42950638073387430024675954919489, 128285239893197968371082792482892, -233879717801903313221670989844210, 271048754683930058578452567723368, -201605750209487674045943340563664, 92210168445583023861593953931687, -22374828441420286757267304025546, 1121551359007511542759477454115, 244825176904747990556811878906, 334456611542427467808780770740, -163417371209079704173802329449, 22174549622106308707655890687, -1126200521084205735727803000, 1207427945649844646161159503, -377010885008550592635170302], [2059158419521791850509330766475, -7098801861775648865124317028278, 30987203107776527178396313260026, -94797850303136008032073262120034, 159321178479541014038777804722867, -157533476410016784343039828495455, 90357052785126394232859837645019, -27293517244814522692065536240648, 2180305452371444825110443614547, 616481321266530319309290815344, 224152096552739237292521715200, -183216711918740965233986244918, 29000599817140021357660775081, -282595196296671715204568514, 1002197851240818395839851072, -503663920665630164013962945], [-205900280071002643813471879295, 874226421602522561923634868153, 10305409031734646902691458361954, -62886220089114974500497879332673, 127418347560501672873393333651854, -141105452588202400804814409297217, 87407427703535750466598416090276, -28233627730416117829065491385762, 2424218001665229620936329302004, 730390620006498078382050859498, 191202705848398583062940683291, -185519241148340628443533109927, 30346526668960121806764604674, 219163726885988166627892367, 989157524666281919369366434, -518549229960251998528431137], [-31198773127888251811745150524201, 180199231884638643953488654443548, -548941249359476044134657373812252, 1006702723937138817262060110916128, -1134291525768723825577383217116641, 774215921924026353917596617145943, -306529111562104477893346154821639, 56548087063458456479711253666386, 560993925611314061206736757241, 257223609794673786313726186338, -1446810089832881397383268506926, 463230412206541667024545714378, -45934281425549416118110566107, 6254053842500698028538683198, -4621452763321439701998160646, 788700379896405494890752555], [-5270416253687425795164482118507, 34177983342865802383241560846813, -115622013530275985840736139791419, 259822062461139103116628253069541, -362603490548528797217608476150159, 323085877307013050685314664106622, -172918481352990911241888575002064, 49187287715602256801757642459367, -3423835277263753672098696739928, -993364797184466314387748529133, -498508858208141055811311413385, 337303569558653406429887667358, -50729752878012917167408265149, 759860611709209652450015066, -2108004905987356028977897649, 869353466431330371903191501], [-5791193462065655939061142801083, 28641892237880940898368945389351, -99703375972654416108123640534970, 201483663659922155834322821485027, -255691876575853809392122090724392, 202659491444639721842802213760201, -96084889956705373575105397840508, 23490814052570436238089832262690, -980981852631985348913937310556, -314360188230947969818196581514, -349793652786747953849602009449, 170480760036591981179295144711, -22133266738924779659388042330, 986066700325309062561149647, -1303380308547599180511016712, 382306067038565199188628297], [319795813502296267486975825134, 5063616394208549728693987156220, -13421241367535276593691962916289, -1424776518427986213284890956559, 42679782373106444789769290154809, -61369562242114449624446527250944, 39852316526119363026363821191595, -12309445378945838296509965959913, 770814188867555948785038486167, 340179166571771590866760313743, 100515084411656034427654104685, -81463163707893036199964952185, 11801306107096129801194460576, 114814928755048929855325446, 500353247209301819223902434, -210275423051595494468756737], [10842162982775897890267915150423, -1750069753612177430015605423388, -68231728438525916585257521335400, 212703665017386032521073131376415, -374265776337441214595670676115197, 397597679334625399319820889835770, -241484930949502139829568376793986, 76267579565248447408459411465660, -6248573537414079529684389348910, -1906723682287971562805434154124, -560572951910491767041162742629, 504705356790352127816102098232, -80502899186472262199372967070, -177887877536057609612869175, -2755255288765990758332602177, 1388435052432364503015752334], [-23157786579480468350279748096404, 124554632889870292325673053255015, -342037012825561670131904154106628, 643091977077265779540497368089684, -861548472871865166027017879891203, 758836381690581799714825159708323, -403544013108358691896268324031940, 113009077133159295483652092455444, -7237763174904591845715032321112, -2240010788297304500290039503376, -1211215611306665219226477114332, 779688858582523868565277238265, -113164257454784593874520596348, 1915593218679674504264323524, -5071832855639565665263879113, 1951635990038649212520217421]];
    Rf_basisdens := [1, 1, 2189738197079155432490833008240, 2189738197079155432490833008240, 2189738197079155432490833008240, 2189738197079155432490833008240, 2189738197079155432490833008240, 2189738197079155432490833008240, 2189738197079155432490833008240, 2189738197079155432490833008240, 2189738197079155432490833008240, 2189738197079155432490833008240, 729912732359718477496944336080, 364956366179859238748472168040, 2189738197079155432490833008240, 2189738197079155432490833008240];
    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_930_n();"
function MakeCharacter_930_n()
    N := 930;
    order := 5;
    char_gens := [311, 187, 871];
    v := [5, 5, 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;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_930_n_Hecke();"
function MakeCharacter_930_n_Hecke(Kf)
    N := 930;
    order := 5;
    char_gens := [311, 187, 871];
    char_values := [[1, 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, -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, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 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, 1, 0, -1, -1, 0, 1, 0, -1, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 1, 0, 0, -1, 0], [0, 1, -1, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0], [0, -1, -1, 0, 0, -1, 0, -1, 2, 0, 1, 0, 0, 0, 0, 0], [-1, 1, -1, 0, 0, 0, 0, 1, 1, -1, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, -1, 0, 0, 0, 0], [-1, 2, -1, -1, 0, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 1], [0, 1, -1, 1, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0], [-1, 0, 2, 0, -1, 0, 1, 0, -1, -1, -1, 0, 0, 0, -1, 0], [0, 1, 0, 0, 1, 2, 0, -4, -1, 1, 0, -1, -1, 0, 0, 0], [0, -1, 1, -1, -1, 0, 0, 1, -1, -2, 0, 1, 2, 1, -1, 0], [2, 1, -1, 2, 1, 1, -1, -1, -1, 0, 1, -1, 1, -1, 0, 0], [-1, -1, -1, -1, 0, -1, 0, 0, 2, -2, 0, 0, 0, 1, 0, 1], [2, 1, -1, 2, -2, 1, -1, -1, -1, 0, 1, 0, 0, -1, 0, 0], [3, 0, 2, -3, 1, 0, 1, 3, -1, 1, 0, 0, 0, 1, 0, 0], [-6, 0, -2, 0, 1, 0, -1, 0, 1, 1, -1, 0, -1, 0, -1, 0], [-1, -1, -1, -1, 0, -1, -6, 0, 2, 2, 0, -2, 0, 1, 0, 1], [2, -1, 0, 2, 0, -1, -3, -4, -1, 1, 1, -1, -1, 0, 1, -1], [1, -1, 0, 0, 0, 0, 1, -1, 2, 0, 1, 2, 0, -1, 0, -1], [-2, 1, -1, -2, 2, 0, 1, 2, 1, 1, 0, -2, -1, 1, -1, 1], [0, 0, 0, 0, 1, 0, 0, 0, 0, -2, 2, 2, 3, 0, 1, -2], [1, 0, 1, 1, 3, -1, 6, 5, -1, 2, -1, -2, 1, 0, -1, 1], [-4, 0, -1, 2, 0, -1, 5, 3, 0, -3, 0, 0, 0, -1, 0, -1], [-3, 2, -2, -4, 0, 0, 3, -2, 2, 0, 0, 0, 0, 1, -1, 0], [2, 2, 1, 2, 0, 1, 5, -1, -4, 0, -2, 1, 0, -1, 0, -1], [3, 0, -1, 2, -2, 2, -3, 0, -1, 0, 0, 0, 0, 0, 0, 0], [2, -1, -1, 2, -3, 0, -2, -2, 0, -1, -2, 1, -2, 0, -1, 2], [5, 3, -2, 5, 3, 1, -6, 1, -2, 0, -1, -2, 2, 1, 0, 0], [-2, 1, 2, -2, 1, -1, 2, 1, -1, 0, 0, 0, 1, 0, -2, 0], [-3, 0, 1, -3, 2, -2, 2, 1, 1, 0, -1, 0, 0, 1, -2, 2], [2, 3, -1, 1, 4, -1, 0, -2, -1, 0, 2, -1, 1, -2, 2, -2], [1, 0, 0, 1, 0, 0, 0, -1, 0, 0, 1, 0, -4, -1, 1, 0], [-8, 1, 3, -8, 0, -2, 7, 5, -2, 0, -2, 0, 0, 0, -1, 2], [-2, -2, 0, -7, 0, -4, 5, 4, 2, -2, 0, 0, 2, 2, -2, 1], [-7, 1, 1, 0, 0, 1, 13, 8, -2, 2, 0, 1, 0, 0, 0, 0], [-3, 1, -2, 3, 1, -2, -4, -5, 3, 1, 0, -1, -1, 1, -1, -1], [-1, -3, 1, -7, -1, 1, -1, 2, 1, 0, -2, 0, 0, 2, -3, 3], [4, 1, 0, 4, 1, 1, -4, -3, 1, 2, 0, -2, -1, 0, -1, 0], [5, -4, 2, 6, 1, -2, -1, -8, 1, 1, 0, 0, -2, 2, 0, 0], [2, 2, -2, 2, 3, 1, 0, -1, 0, 3, 1, 0, -2, -2, 1, 0], [-3, -1, 0, -3, -1, -1, -2, -3, -1, 1, 1, -1, -2, 0, 1, -1], [4, 1, 2, 4, 0, -1, 2, 1, -1, 0, -3, 0, 0, 0, -2, 3], [1, -2, 1, 0, -2, 0, -1, 0, 1, 0, 0, 0, 0, 0, -1, 1], [3, -4, -2, -2, 2, -2, -3, 0, 3, 2, 1, 0, -3, 0, 1, 0], [-4, 0, -4, -4, 2, 0, -2, 4, 2, 2, 0, 0, -1, -1, 0, 0], [2, -3, 2, 2, 0, -2, -2, -10, -1, -1, 0, 0, 1, 0, 0, -3], [2, 2, 0, 9, 1, 4, -7, -4, -2, -1, 0, -1, 1, -2, 2, 0], [2, -2, 3, 2, 0, -4, -2, 0, 3, 0, 0, -2, 2, 0, 0, 0], [3, 1, 0, 3, 0, 0, -1, -3, -2, -2, 0, 1, 0, -2, 0, -2], [-2, 0, 1, -2, -2, -1, 2, 1, -1, -1, -2, 1, -1, 0, 0, 2], [4, 0, 1, -2, 2, -2, -4, 0, 1, 0, 0, -5, 5, 0, 1, -1], [-7, -1, 0, -1, 0, 0, -11, 7, 2, 1, 0, 0, 0, 0, 0, 0], [1, -2, 1, -5, 2, 0, 0, -1, 1, 0, 1, 0, 0, -1, 1, -1], [3, 2, 1, -3, 0, 6, 5, 3, -4, 2, 0, 0, -2, -2, 2, 0], [-1, 2, 3, 0, 0, 3, 2, 4, -4, -2, -2, -1, 0, -1, 0, -1], [0, 1, -2, 0, 5, -2, 2, -10, 3, 2, 0, -5, -2, -2, 2, 2], [2, 1, 0, 2, 4, 2, 0, -12, -1, 3, 0, -4, -3, -2, 2, -1], [8, 2, -1, 8, 4, 3, 3, 6, 3, 2, 0, -2, 2, 0, -1, 0], [3, 0, -4, 3, 0, -4, 2, -7, 0, 3, 2, 1, 0, 1, 0, 1], [8, 1, 1, 14, -1, -3, -8, 0, 1, 0, 0, 0, 0, 0, 1, -1], [-1, 2, -6, 5, -3, 1, -2, -4, 2, -3, 0, 0, 5, 3, 0, 0], [12, -2, 2, 17, 0, -2, -11, -1, 2, 0, 1, 2, -2, -1, 0, 0], [8, -1, -2, 8, -3, 1, -14, -13, 1, -1, 0, 1, -2, 0, 0, 0], [3, -3, 1, -3, -3, -4, 5, -3, 1, 0, 0, 3, 0, -2, 2, 0], [-19, -2, -3, -19, -2, 1, 20, 21, 1, -2, -1, 2, 0, 0, 0, 1], [-12, 6, 0, -6, 0, 3, 3, 9, -3, 0, -2, 0, 0, 3, -2, 0], [-8, -3, -3, -1, 0, -3, 7, 5, 6, -1, -1, -1, 0, 1, 0, 1], [2, 2, 0, 2, 2, 4, 0, 2, -2, -1, 0, -2, 1, -2, 2, 1], [-1, 1, -1, 5, -7, 1, 5, -4, -1, 0, 4, 3, -3, -4, 4, -4], [4, 0, 2, 2, 1, 0, 1, -2, -1, 1, 1, 0, 2, -3, 1, 0], [-8, 0, 2, 4, 3, 0, 1, -4, -1, 3, 3, 0, -2, 0, 3, 0], [1, 0, 0, 1, 2, 0, 6, 6, 0, 4, -1, -4, -2, 0, 1, 1], [6, 0, 0, 6, -4, 0, -12, -12, 0, 0, 3, 0, -4, 0, 1, -3], [-5, -1, 1, -5, 0, 1, 2, 6, 2, 2, -2, 2, 0, 3, 0, 3], [0, 4, -8, 6, 0, 2, -2, -4, 2, 0, 0, 0, 0, 1, 0, 0], [2, 1, 1, 2, 2, 4, -1, 8, -3, 1, 0, -2, -1, -1, 1, -3], [2, 6, -2, 0, -1, 3, 2, 3, -2, -1, 2, 0, -4, -2, 2, 0], [-1, -2, 2, -7, -2, -2, -4, 5, 2, 0, -5, -1, 1, 5, -1, 1], [1, 4, -2, 0, 5, 0, -1, 0, -2, 0, 0, -3, 3, 0, 1, -1], [12, -2, 0, 12, -2, 2, -8, -4, 0, 0, 4, 2, -2, -4, 0, 0], [15, -4, -2, -8, -1, -2, -3, 6, 3, -1, 2, 0, 0, 0, 2, 0], [-2, 2, -8, 11, -1, 1, -3, -10, 3, -1, 0, 0, 2, -1, 0, 0], [-7, 1, 3, -1, 0, 3, 2, 10, -2, -2, 0, 4, 0, -1, 0, -1], [12, 0, 0, -12, -4, 0, -12, 0, 0, 0, 0, 3, -3, 0, 1, -1], [3, 0, 2, -3, 0, 2, -12, -1, 0, 2, 1, 3, 0, 1, 0, 1], [-4, 2, 2, -4, -1, 0, -8, -8, 0, 2, 0, -2, -3, 0, -1, 0], [0, -4, 1, 1, -3, -6, -2, -6, 2, -3, 0, 3, 3, 1, -1, 0], [1, 1, -1, 1, -5, 0, 1, -1, 1, 0, 0, 5, 0, -2, 2, 0], [-3, -1, 0, -3, 0, 0, 7, 3, 2, 2, 0, 3, 0, 2, 0, 2], [1, 0, -2, 2, 0, -2, -13, -3, 0, 0, 4, 1, 0, 0, 0, 0], [9, 2, 0, 15, 0, 1, 1, -14, -1, 0, -1, 0, 0, 2, -1, 0], [10, -1, 2, 10, -2, -3, -8, -2, 2, 0, 2, 3, -3, -2, 1, -1], [4, -2, -3, 4, 2, 1, -4, -3, 1, 1, -2, -1, 1, 0, 2, 2], [4, -3, 3, -2, 4, -3, -3, -1, 3, 0, 1, -6, 6, -1, 2, -2], [8, 10, 4, 2, 1, 5, 7, 3, -7, 1, -1, 0, -5, -3, -1, 0], [-8, -2, -1, -8, -1, -1, 1, 0, -1, 2, -2, -2, -3, 0, -4, 2], [-6, -3, -4, -1, 0, -4, -1, 2, 6, 1, 4, 2, 0, 2, 0, 2], [-1, 1, 2, -1, 6, -1, -4, -5, -1, 0, -3, 0, 6, 0, -3, 3], [18, 2, 2, 12, 3, 1, 2, -11, -2, 3, 3, 0, -6, -2, 3, 0], [9, 0, -8, 3, -1, 0, -4, -3, 4, -1, 2, 0, 2, 1, 2, 0], [4, -2, -4, 4, -7, 2, -4, -2, 2, -3, 1, 3, -4, 0, 6, -1], [5, 4, -2, 7, -1, 0, -6, 1, -2, 0, -1, -3, 3, 1, 1, -1], [-4, 3, -2, 7, 3, 2, -9, -17, 1, 0, 0, -3, 0, 2, -2, 0], [5, -5, 4, -13, -2, -2, 14, -7, -3, 0, 0, 2, 0, -1, 1, -1], [16, 1, -1, 16, 1, 2, 2, 4, 2, -2, -2, 2, 3, 0, 0, 2], [2, 4, -2, -4, 4, 4, 8, -16, 0, 6, 0, -4, -6, -4, 4, 2], [1, 3, -1, 6, 3, 4, -4, 4, -1, 6, 0, -3, -6, -2, 2, -3], [-14, 4, -3, -8, 2, 2, 17, -3, -3, 0, 3, -4, 4, -3, 3, -3], [-1, 1, 0, -1, 3, 1, -4, -3, 1, 0, 3, 0, 3, 0, 1, -3], [-5, -3, 1, 1, -6, 1, 5, 0, 1, 0, 0, 2, -2, 0, 1, -1], [13, 6, -2, -5, -1, 3, 2, 8, -2, -1, -2, 0, 0, -4, -2, 0], [1, 0, 1, 1, 4, -1, 0, -1, -1, 4, 0, -4, 0, 0, 4, 0], [-3, -2, -1, 3, 3, -6, -5, -15, 4, -5, 0, -3, 5, 2, -2, 1], [-16, -4, -6, 1, 0, -6, 4, 10, 8, 1, 0, -1, 0, 1, 0, 1], [-8, 1, -1, -8, -8, 2, -4, -2, 2, 0, 2, 0, -8, 0, 1, -2], [-4, -3, 0, -10, 1, -6, 6, -2, 3, 3, 0, -1, -3, 4, -4, 2], [-15, 1, 0, 3, 0, 0, 11, 15, -2, -3, -1, 6, 0, -2, 0, -2], [0, -2, 1, -1, -2, -2, 0, -7, 0, 5, 0, 2, -5, 1, -1, -2], [-11, -3, 1, -4, 0, 1, -1, 12, 6, -2, -3, -2, 0, 0, 0, 0], [12, 2, 0, 0, -4, 1, 1, 1, -1, -4, 2, 0, 4, -1, 2, 0], [-10, -2, 2, 2, 3, -1, 0, -3, 0, 3, -1, 0, -4, -2, -1, 0], [2, -3, -4, 1, 0, -4, -13, -6, 6, -6, 1, 4, 0, 0, 0, 0], [1, -3, 0, 13, -4, -6, -12, -19, 3, -5, 0, 4, 5, -1, 1, -4], [0, 2, 0, 0, 7, 2, -6, -4, 2, 5, 1, -5, 2, 0, 4, -1], [17, 4, 2, 5, 1, 2, 3, -3, -3, 1, 2, 0, 1, -2, 2, 0], [4, 4, -1, 10, 0, -1, -7, -5, -8, 2, 2, -1, 0, -5, 0, -5], [-4, -2, -3, -4, 7, 1, -2, -1, 1, 4, 1, -4, 3, 0, -1, -1], [10, 6, -4, 4, 9, 3, 1, -1, -1, 9, -1, 0, 2, 0, -1, 0], [-7, 0, 6, -13, 1, 0, 3, 13, -3, 1, -5, 0, -1, 4, -5, 0], [0, -1, -2, 0, 2, 1, 6, 7, 1, 3, -1, -3, -1, 0, 2, 1], [-1, -4, 1, -7, -5, 2, -1, 2, 1, 0, -2, 1, -1, 2, -4, 4], [7, 0, -5, 7, 0, -5, -5, -12, 0, 2, 5, 0, 0, -2, 0, -2], [19, 0, 2, 14, -1, 0, 1, -14, -1, -1, 1, 0, 2, -2, 1, 0], [-3, -4, 0, 3, 5, -8, -6, -5, 4, -1, 0, -5, 1, 3, -3, 3], [-5, -3, -1, 1, 0, -8, -5, -5, 5, 1, 0, 0, -1, 4, -4, 6], [-11, 2, 1, 1, 0, 1, 11, 12, -4, -9, 2, 8, 0, 0, 0, 0], [-15, 4, -2, -15, 1, 0, 12, 3, -2, 0, -3, 1, -1, 3, -3, 3], [0, -6, 2, -2, 0, -3, -2, -1, 2, 0, -2, 0, -3, 4, -2, 0], [-16, 6, -4, -10, -7, 2, 10, 6, -4, 0, -6, 2, -2, 6, -2, 2], [-2, 0, -4, -1, 0, -4, 3, -2, 0, 3, -2, 0, 0, 5, 0, 5], [0, 0, -1, 24, -1, -2, -23, -14, 2, -4, 0, 1, 4, -1, 1, -1], [-12, -1, -4, 5, 0, -4, -3, 8, 2, -5, 4, 6, 0, -2, 0, -2], [4, -6, 4, -2, 4, -4, 2, -14, -2, -2, 0, -4, 2, 0, 0, -4], [-9, 0, -1, -13, 2, 2, 4, 5, -1, 0, -5, -2, 2, 5, -5, 5], [-14, 1, 0, -14, -8, 1, 8, 9, 1, -1, -1, 1, -7, 0, 3, 1], [9, 2, 2, 4, 0, 2, -11, -7, -4, 2, -2, -5, 0, -4, 0, -4], [-3, -6, 6, -3, 5, -3, 0, 0, 0, 5, -2, 0, 1, 3, -2, 0], [8, 3, -1, 2, 0, -1, -12, -9, -6, -5, -2, -3, 0, 2, 0, 2], [0, 8, -6, 12, -6, 4, -4, 4, -6, 0, -4, 2, -2, 4, -4, 4], [2, -2, 0, 19, 5, 2, -3, 1, 0, 0, -1, -3, 3, 1, 1, -1], [-3, 3, -3, 9, 7, 0, -9, 3, 3, 5, 0, -7, -5, 0, 0, 3], [-6, 2, 7, -1, 0, 7, 17, 13, -4, 1, 1, 0, 0, -4, 0, -4], [3, -2, 1, 3, 0, -2, -1, -11, 0, -3, 0, 0, 3, -2, 2, 0], [-15, -1, -4, -15, -1, 3, 4, 7, 3, 0, 3, 0, -1, 0, 6, -3], [-3, -4, 0, -15, 7, -2, -2, 13, 2, 7, -2, 0, -2, -1, -2, 0], [8, -4, -4, 8, -8, 0, -9, -9, 0, 1, 2, -1, -9, 0, -1, -2], [30, -3, 2, 30, 6, -5, -18, -23, -5, 3, 3, -3, 3, 0, 2, -3], [-17, 0, 4, -5, 0, 4, 22, 21, 0, 2, -3, 1, 0, 1, 0, 1], [-2, 4, 1, 4, 0, 1, -9, 3, -8, 3, -4, 2, 0, -1, 0, -1], [12, -10, -2, 7, -4, -5, -6, -12, 6, -4, 2, 0, -4, 0, 2, 0], [-4, 2, -3, -16, 0, -2, 15, -4, 4, -1, 0, 0, 1, 1, -1, 5], [-4, -6, 2, -10, -4, 2, 4, 0, 2, 0, 0, 3, -3, 0, -4, 4], [-17, -2, -5, 1, 0, -5, 21, 12, 4, 3, 3, -1, 0, 2, 0, 2], [4, 0, 0, -20, -7, 0, 0, 20, 0, -7, -1, 0, -4, 1, -1, 0], [-5, -6, 0, -10, -3, -3, -3, 7, 3, -3, 4, 0, 4, -4, 4, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_930_n_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_930_2_n_h();".
// 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_930_2_n_h(:prec:=16)
    chi := MakeCharacter_930_n();
    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_930_2_n_h();".
// 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_930_2_n_h( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_930_n();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<7,R![16, 112, -56, -4074, 24239, 6515, 73817, -28408, 16548, -3063, 5737, 1445, 714, 176, 49, 7, 1]>],Snew);
    return Vf;
end function;