
// Make newform 224.3.s.b in Magma, downloaded from the LMFDB on 28 September 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_224_s();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_224_s_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_224_3_s_b();".
// 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_224_3_s_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 ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [208849, -248608, 114964, -156928, 27401, 203528, -49760, -33728, 32608, 4440, -4526, 144, 469, -16, -26, 0, 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], [19593464920057236434122950881109, -3080762339053380854480283054134, -88457341854902593335381060785800, -83096953370417874484163105963710, 14160472018443853370010318486950, 6665949738835295403921831086648, -19786405682174364109141729822900, -1919852721388660753134380819828, 2682209474043646001676873266628, -218500635534359350729438131136, -310573020706495203943514945672, 18466990664549970723854697428, 17937804992802510950044866537, -175722177961496578640865646, -744327595600429275881449294, -2920417443677474293913902], [-3286263117449365410102954785844, 3232418508440853343831275449960, -9349541338079118005059857391953, 2129928673592806212368161833504, 394717378852979064578167551616, -1855079890192905098726607507180, 473191360106891395382899928664, 202745664387160665881013574208, -114659322642441135223486994952, -6332471382800274132497845056, 11148510041927868533000295192, -607867478339680085525445660, -543969869770112203177631988, 27595582130743566079841576, 24764143983284374176395421, -3515304493583606735135952], [7385860188895574436656992849363, -8403237557696221261342105089459, 3653225388259983436664143334390, -5104731955019441877585892054673, -3729807910919652247800742026214, 2663256405889607525415415377260, -358917417736567570954159885656, -727155270139808660498290086006, 109397774130481521364257407586, 62897025351342307275446286156, -19373728230501465036814065604, -4814066789420379222535386834, 1112658279033969221325555216, 285301886851739906742316053, -44439187972352536048517534, -8161932957484190343665273], [-2510289020758883104864126050023, 13844783294622013114953545762, -8610918321458095981929337389994, 410971772490892892566561077754, 3148129401873306054350610561234, -1538010994203696118079073494136, -341285354834289306388036193488, 385877809481960472865171774452, 1199461520202643096021191028, -42812468468772730417302451304, 4524753164058537579368230272, 3276954039482169644025472164, -259187322942024133059057463, -176973453028403935236629214, 10008573052443251558227112, 4687764179358667903827490], [15530645078820716406525243786690, -5422442965226334273104713972494, 143990978934001807227407665421, -1643834893522645703950405785162, -6294626994688832428341199761172, 3124297095707150083277879952764, 450738148978600311581503338592, -1432416807939321269362752830100, -5636154129460707453505177806, 177952670383067575630013044528, -22048454616262823264454109000, -16821636988084766687601118704, 1381335733635573158052227528, 958767424475648734860770778, -38472491138586635287049351, -33282229045960332120189538], [3686481877316456037642549777, 9341327103233175018294227090, -10981892368336939613161395337, -9591582687049399777297302042, -8021116023302597726209967294, 1423302805080590158619506672, 1724782533273118586212671000, -2202446682825009641121408292, -362422523161540239768290176, 327897110740258740307119480, -8063335103197233251269908, -37567134568520370754247220, 1203281739031657890480621, 2106362162310834996966530, 19379552843836720073999, -87428286339522377943258], [11417432982080716379376990, -33962809459441010571298260, 5618854490528863822096597, -13407128082587646721614288, -40095443257835374287069696, 5677044395320575039843008, 4980438225173244013489056, -7059892149907340387084928, -861897353924990552955686, 966301607286958942241280, -59136687103919879272608, -107123109897527970241392, 5610165377095918036704, 6110172991187791613532, -60099576570060185087, -248197947118550681400], [240280225958040430804, 39937799358222111906, -46922766637244959676, 46812769807129599650, -34262171840112781800, 6044728226531394560, 10200336255773301928, -9401792267255930460, -1553113751898048416, 1467376262123572708, -33874814941456464, -160496373722473788, 4445925380328116, 8997681016250754, 84134512548244, -351675045716698], [-14533939374009833087029953469310, 13601908630252322638109559396486, -19525905518592239978294821230153, 18961486930358497597998978789294, -3745588134230839817513260298772, -6902930136209520467640495576284, 1393217405592119165630488565872, 2031688006206730749761713738884, -115466418759491887857358509212, -264172546670815086094319045696, 31896157981372677800461070740, 29217098080882129982745649904, -2078568130378060934191309418, -1594389811523605380678926738, 6414494618062250722833405, 63639144463555960591721974], [-58462958599992042806209428082540, -16747421159312610875411267144572, 6607831348977807077678926088293, -9551699356684231544304330269744, -12957304972252303076939512340488, 454959023222686822309815272616, 1339247919214851606512552225104, -1811051396750949056384208440312, -281779664556308665645602840258, 247279220502483540515161299120, -13276930719192805530130032752, -28661777910076909183262856616, 1481577348717818925767409120, 1649016860697231478334790588, -14634704533463944714948623, -70111144892064841956500440], [-10633248927716884130454269230408, 23879833636573578975503954997536, -9481277531835610000306716967200, 13808957934494828563854816716056, 14259256397530350047124855724312, -5579452416269829664084613518320, -180105560603671271291170131328, 2490757642557419927641111076204, -28915162462218712367220940608, -278528711106182749022865537984, 44524432609998588989374596888, 27806563838614510724187553632, -2999093933608546370064748072, -1611655880642224052917094404, 87079907287736416336762704, 60827347242699394445343576], [27467563155200666421329751733813, -3204558575958688980395837064956, -14667955760828431672788846547954, -58340171134673012396525541961512, -5113904201372731045639409256930, 12573298901280221526822142798796, -7654605427314589762379655284652, -4887351733396643936936710328208, 1025813084779868491212154221300, 435573479950636950805498066904, -181003040957991941067297226416, -48030780904789997927635935828, 11164156593633746237684672865, 3039311297013383670434188692, -355138569385413589648032772, -121738657247652783765789184], [84532328347093586797598177342770, -6578572297763928167919523468228, -5342930036735067248094069235549, 2401574208024055886806248985832, -21684711784008114382880006260324, 1998806027831375158237887887624, 3897557035774817798654835114960, -4206616565364615728098865010200, -676803797285059604462147245826, 617038112727940613753063509032, -21972480516256830512530933400, -69540748591711531657786821928, 2684642974495777820589183692, 3940902050635990653869263764, 6636949758964923720295999, -160761995294534487157365352], [-2983335376820692431243826356249, -2383988750917451285403829020232, -11295940470559589579471527293907, -826011000274627583269874467184, 6191114890646005602837878433702, -1815092118953849364446744169332, -1807166925510726355173003430176, 933857833471067471618577274704, 237465373791342638086163220512, -149802516474780429570759711648, -9500439822074708222757066260, 15165493386490648690889378900, 344757146604194862076515043, -790132698906394841922174584, -36528720565211174405552059, 29649830917054226444680776], [1031469506213893538816888075262, 1557726429555851573246291360570, -7702171767715200461868482215343, -5427825086915057975768278901462, -149185748967100920283355108324, 213067903825452474960571126140, -653418190278837048505212207972, -402878647740215817621185243704, 50481760520350222075367733290, 40848949176919293801541657144, -14166657318955342136358878618, -5325245369078152301533506712, 956286745043098251144238692, 339297524978299406620694046, -27373945785170343714276959, -15210254090489262517236326]];
    Rf_basisdens := [1, 7796941779471309921306022253466, 7796941779471309921306022253466, 3898470889735654960653011126733, 1113848825638758560186574607638, 7796941779471309921306022253466, 17061141749390174882507707338, 48349829031640073677491906, 45742705762379025631, 7796941779471309921306022253466, 7796941779471309921306022253466, 3898470889735654960653011126733, 7796941779471309921306022253466, 7796941779471309921306022253466, 1113848825638758560186574607638, 556924412819379280093287303819];
    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_224_s();"
function MakeCharacter_224_s()
    N := 224;
    order := 6;
    char_gens := [127, 197, 129];
    v := [6, 6, 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;

// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_224_s_Hecke();"
function MakeCharacter_224_s_Hecke( : Kf := false)
    N := 224;
    order := 6;
    char_gens := [127, 197, 129];
    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, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0]];
    assert UnitGenerators(DirichletGroup(N)) eq char_gens;
    values := ConvertToHeckeField(char_values : pass_field := ISA(Type(Kf), Fld), 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]];
    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 := 3;
    raw_aps := [[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, 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, 1, 0, 0, 0], [0, 0, 1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 1, 0, -1, 1], [1, 0, 0, 0, 0, 0, 0, 2, 0, 0, -1, 0, 0, -1, 0, 0], [-2, 0, 0, -2, 0, 2, 0, 2, 0, 0, -1, 1, 0, 0, 0, 0], [0, 0, -1, 0, -2, 0, 3, 0, 0, 0, 0, 0, 2, 0, -2, 1], [0, 1, -1, 0, -1, 0, -1, 0, 0, -1, 0, 0, 1, 0, 1, 0], [-1, 0, 0, -2, 0, 4, 0, 0, 2, 0, 1, 0, 0, -1, 0, 0], [0, 1, 2, 0, 1, 0, 1, 0, 0, -1, 0, 0, 2, 0, 1, -2], [0, 0, 0, -6, 0, 3, 0, -9, 1, 0, 2, -2, 0, 1, 0, 0], [5, 0, 0, 2, 0, 0, 0, 10, 3, 0, 1, -6, 0, 1, 0, 0], [0, 0, -2, 0, -4, 0, 2, 0, 0, 2, 0, 0, 0, 0, -4, 2], [0, 2, 5, 0, 7, 0, -12, 0, 0, -1, 0, 0, -6, 0, 2, -3], [5, 0, 0, -3, 0, -3, 0, 5, -9, 0, 1, 8, 0, 2, 0, 0], [0, -2, 5, 0, -4, 0, -2, 0, 0, 0, 0, 0, -4, 0, 0, 4], [18, 0, 0, 0, 0, 7, 0, 9, 5, 0, 0, -4, 0, 3, 0, 0], [0, 0, 9, 0, 2, 0, -20, 0, 0, 0, 0, 0, -2, 0, 2, -2], [0, 0, -10, 0, 2, 0, 0, 0, 0, 2, 0, 0, -6, 0, 2, 2], [-13, 0, 0, -6, 0, 6, 0, 13, 8, 0, 0, 8, 0, 0, 0, 0], [0, 1, -1, 0, -3, 0, -3, 0, 0, -3, 0, 0, -3, 0, 1, -4], [0, 0, -2, 0, 6, 0, 2, 0, 0, -2, 0, 0, -10, 0, 2, -6], [2, 0, 0, 0, 0, 10, 0, 1, 14, 0, 0, 0, 0, -14, 0, 0], [37, 0, 0, -2, 0, 0, 0, 74, 7, 0, 1, -14, 0, 1, 0, 0], [-20, 0, 0, 3, 0, -3, 0, 20, -2, 0, -18, 16, 0, 0, 0, 0], [0, -3, 35, 0, -19, 0, -19, 0, 0, 3, 0, 0, 13, 0, -7, 8], [0, 0, 13, 0, 2, 0, 15, 0, 0, 2, 0, 0, 4, 0, 0, 3], [14, 0, 0, -7, 0, -7, 0, 14, -20, 0, -2, 22, 0, -4, 0, 0], [83, 0, 0, -2, 0, 4, 0, 0, 7, 0, 1, 0, 0, -1, 0, 0], [0, -2, -6, 0, -10, 0, 16, 0, 0, -4, 0, 0, 14, 0, -4, -2], [0, 6, -21, 0, 22, 0, 5, 0, 0, -6, 0, 0, -10, 0, -2, -8], [-34, 0, 0, -16, 0, -16, 0, -34, -26, 0, 5, 21, 0, 10, 0, 0], [0, 6, 6, 0, -18, 0, -14, 0, 0, 0, 0, 0, 18, 0, 0, 6], [0, 0, 0, -10, 0, 5, 0, -64, 8, 0, 16, -14, 0, 8, 0, 0], [0, -9, 22, 0, -21, 0, -7, 0, 0, 7, 0, 0, 32, 0, -11, 18], [61, 0, 0, -17, 0, 17, 0, -61, 19, 0, 7, 12, 0, 0, 0, 0], [0, 4, -3, 0, 2, 0, 3, 0, 0, 2, 0, 0, 16, 0, 4, -16], [0, 3, 2, 0, -12, 0, 36, 0, 0, -1, 0, 0, 10, 0, -5, 12], [62, 0, 0, 0, 0, 11, 0, 31, -1, 0, 0, -10, 0, 21, 0, 0], [0, -2, 11, 0, 19, 0, -43, 0, 0, -4, 0, 0, -11, 0, -1, -3], [-80, 0, 0, 22, 0, 0, 0, -160, 2, 0, -6, -4, 0, -6, 0, 0], [0, 0, 13, 0, 1, 0, 14, 0, 0, 1, 0, 0, 2, 0, 0, 7], [-26, 0, 0, 10, 0, 10, 0, -26, -12, 0, -13, 25, 0, -26, 0, 0], [-75, 0, 0, -6, 0, 12, 0, 0, 26, 0, 15, 0, 0, -15, 0, 0], [0, -1, -32, 0, -1, 0, 3, 0, 0, 5, 0, 0, 2, 0, -9, -2], [0, 0, 46, 0, 4, 0, -18, 0, 0, -6, 0, 0, 8, 0, 4, -6], [0, 2, 0, 0, 8, 0, -52, 0, 0, -2, 0, 0, -12, 0, 10, -20], [0, -6, 13, 0, -19, 0, -5, 0, 0, -6, 0, 0, -11, 0, 5, 11], [64, 0, 0, 0, 0, -37, 0, 32, 12, 0, 0, -14, 0, 16, 0, 0], [0, 0, 0, -24, 0, 12, 0, -106, 15, 0, 30, -17, 0, 15, 0, 0], [0, 1, 4, 0, 22, 0, -18, 0, 0, -3, 0, 0, -14, 0, 19, -4], [11, 0, 0, 0, 0, 0, 0, -11, 12, 0, 2, 10, 0, 0, 0, 0], [0, -8, -12, 0, 25, 0, -61, 0, 0, -4, 0, 0, -33, 0, -7, 2], [-88, 0, 0, 0, 0, -22, 0, -44, -5, 0, 0, 1, 0, 3, 0, 0], [0, 3, -2, 0, 3, 0, 2, 0, 0, 4, 0, 0, -13, 0, 25, -21], [79, 0, 0, 15, 0, -15, 0, -79, -17, 0, -15, -2, 0, 0, 0, 0], [0, 7, -45, 0, 15, 0, 29, 0, 0, -3, 0, 0, -13, 0, -1, -6], [175, 0, 0, 9, 0, 9, 0, 175, 13, 0, -1, -12, 0, -2, 0, 0], [165, 0, 0, -6, 0, 12, 0, 0, 19, 0, 3, 0, 0, -3, 0, 0], [0, -8, 39, 0, -27, 0, 5, 0, 0, 2, 0, 0, -3, 0, -15, 3], [-120, 0, 0, -14, 0, 0, 0, -240, -8, 0, -30, 16, 0, -30, 0, 0], [0, -18, 2, 0, 10, 0, 34, 0, 0, 20, 0, 0, 30, 0, -4, 10], [0, 9, -40, 0, 37, 0, -10, 0, 0, 0, 0, 0, -1, 0, 19, 1], [-182, 0, 0, 0, 0, 34, 0, -91, 26, 0, 0, -2, 0, -22, 0, 0], [0, 0, 0, 38, 0, -19, 0, 47, 11, 0, 22, 2, 0, 11, 0, 0], [0, 10, -11, 0, -12, 0, -13, 0, 0, -12, 0, 0, 6, 0, 10, 14], [115, 0, 0, 6, 0, -12, 0, 0, -63, 0, -19, 0, 0, 19, 0, 0], [0, -14, 3, 0, 18, 0, -12, 0, 0, -2, 0, 0, 12, 0, -18, 16], [-49, 0, 0, 24, 0, 0, 0, -98, -26, 0, 13, 52, 0, 13, 0, 0], [-38, 0, 0, -6, 0, 6, 0, 38, -38, 0, -21, -17, 0, 0, 0, 0], [0, 18, 37, 0, -21, 0, 34, 0, 0, -21, 0, 0, 12, 0, 18, -5], [0, 3, -38, 0, -5, 0, 0, 0, 0, -14, 0, 0, 3, 0, 17, -3], [0, 0, 0, -38, 0, 19, 0, -1, -27, 0, -54, 42, 0, -27, 0, 0], [0, -2, -124, 0, -17, 0, 79, 0, 0, -2, 0, 0, 17, 0, -11, 0], [0, 8, -59, 0, -41, 0, 78, 0, 0, 7, 0, 0, 12, 0, -28, 17], [88, 0, 0, -29, 0, -29, 0, 88, 38, 0, 14, -52, 0, 28, 0, 0], [380, 0, 0, 0, 0, 45, 0, 190, 32, 0, 0, -10, 0, -12, 0, 0], [0, 0, 0, -28, 0, 14, 0, 14, -7, 0, -14, 3, 0, -7, 0, 0], [-22, 0, 0, -4, 0, 4, 0, 22, 26, 0, 65, -39, 0, 0, 0, 0], [0, -10, 2, 0, -6, 0, 18, 0, 0, 12, 0, 0, 30, 0, -12, 26], [-69, 0, 0, 26, 0, -52, 0, 0, -36, 0, 21, 0, 0, -21, 0, 0], [0, -11, -36, 0, -69, 0, 169, 0, 0, 17, 0, 0, 74, 0, -23, 40], [175, 0, 0, -22, 0, 0, 0, 350, -57, 0, -29, 114, 0, -29, 0, 0], [0, 2, -11, 0, 21, 0, 2, 0, 0, -7, 0, 0, -2, 0, -2, -7], [0, 6, 29, 0, -26, 0, 9, 0, 0, -26, 0, 0, -34, 0, 6, -39], [59, 0, 0, 6, 0, -12, 0, 0, -1, 0, -11, 0, 0, 11, 0, 0], [0, 0, 0, -36, 0, 18, 0, 107, -18, 0, -36, 72, 0, -18, 0, 0], [119, 0, 0, -24, 0, 0, 0, 238, -28, 0, -35, 56, 0, -35, 0, 0], [0, -18, 26, 0, -44, 0, -2, 0, 0, 4, 0, 0, 0, 0, 10, 22], [0, -6, 23, 0, -46, 0, 17, 0, 0, 6, 0, 0, 34, 0, -22, 20], [0, -5, -6, 0, 9, 0, 0, 0, 0, 24, 0, 0, -5, 0, -29, 5], [0, -21, -34, 0, 83, 0, 2, 0, 0, -4, 0, 0, -37, 0, 25, -29], [0, 18, -68, 0, 95, 0, -1, 0, 0, -22, 0, 0, -15, 0, 41, -40], [0, 4, 29, 0, -10, 0, 23, 0, 0, -10, 0, 0, -8, 0, 4, 8], [0, 6, 4, 0, 12, 0, 64, 0, 0, -2, 0, 0, -16, 0, 26, -48], [-72, 0, 0, 0, 0, -31, 0, -36, -38, 0, 0, 32, 0, -26, 0, 0], [-155, 0, 0, -50, 0, 50, 0, 155, -4, 0, 34, -38, 0, 0, 0, 0], [0, 10, -65, 0, 36, 0, 7, 0, 0, 6, 0, 0, -64, 0, 44, -21], [0, 0, 0, -86, 0, 43, 0, -122, 48, 0, 96, -38, 0, 48, 0, 0], [0, 2, -68, 0, 55, 0, -33, 0, 0, 10, 0, 0, -71, 0, 49, 8], [-280, 0, 0, 37, 0, 37, 0, -280, 48, 0, 4, -52, 0, 8, 0, 0], [0, -8, 43, 0, -14, 0, 6, 0, 0, 16, 0, 0, -2, 0, -30, 2], [0, 0, 0, -36, 0, 18, 0, -411, 16, 0, 32, 0, 0, 16, 0, 0], [0, 0, 1, 0, 125, 0, -155, 0, 0, -28, 0, 0, -97, 0, 13, -41], [191, 0, 0, 36, 0, -36, 0, -191, -54, 0, -46, -8, 0, 0, 0, 0], [0, 26, 14, 0, -34, 0, 38, 0, 0, -12, 0, 0, 10, 0, 20, -26], [460, 0, 0, 0, 0, -6, 0, 230, -35, 0, 0, 27, 0, -19, 0, 0], [0, 11, -14, 0, 19, 0, -14, 0, 0, -12, 0, 0, -29, 0, -7, -5], [-263, 0, 0, -126, 0, 0, 0, -526, -61, 0, 25, 122, 0, 25, 0, 0], [0, 16, -27, 0, 47, 0, -26, 0, 0, -5, 0, 0, -48, 0, 16, -21], [54, 0, 0, 11, 0, 11, 0, 54, 74, 0, 48, -122, 0, 96, 0, 0], [-283, 0, 0, 50, 0, -100, 0, 0, 5, 0, -1, 0, 0, 1, 0, 0], [0, 6, 65, 0, 54, 0, -20, 0, 0, 16, 0, 0, -14, 0, 10, 14], [0, -10, -54, 0, 26, 0, 4, 0, 0, -12, 0, 0, -22, 0, 56, -2], [-105, 0, 0, -28, 0, -28, 0, -105, 20, 0, -30, 10, 0, -60, 0, 0], [0, 12, 14, 0, -26, 0, 118, 0, 0, 2, 0, 0, 30, 0, 14, -14], [0, 13, -8, 0, -17, 0, 18, 0, 0, -38, 0, 0, 31, 0, 33, -31], [0, 0, 0, -10, 0, 5, 0, 321, -27, 0, -54, 38, 0, -27, 0, 0], [0, -38, 46, 0, -118, 0, 44, 0, 0, -4, 0, 0, 50, 0, -4, 34], [-267, 0, 0, -71, 0, 71, 0, 267, 59, 0, 41, 18, 0, 0, 0, 0], [-133, 0, 0, -42, 0, 84, 0, 0, -67, 0, 5, 0, 0, -5, 0, 0], [-688, 0, 0, 0, 0, 75, 0, -344, 8, 0, 0, 4, 0, -16, 0, 0], [0, 12, 73, 0, -15, 0, -141, 0, 0, 2, 0, 0, -11, 0, 17, -15], [0, 4, -169, 0, 42, 0, 151, 0, 0, -14, 0, 0, -4, 0, -4, -14], [226, 0, 0, 32, 0, -64, 0, 0, -24, 0, -56, 0, 0, 56, 0, 0], [0, 0, 0, 82, 0, -41, 0, -59, -5, 0, -10, 46, 0, -5, 0, 0], [0, 7, 171, 0, -25, 0, -147, 0, 0, -3, 0, 0, 27, 0, -41, 14], [0, 18, -16, 0, -2, 0, 22, 0, 0, -34, 0, 0, -66, 0, -16, 16], [-266, 0, 0, 0, 0, -1, 0, -133, 83, 0, 0, -64, 0, 45, 0, 0], [0, 14, 55, 0, -91, 0, -31, 0, 0, 2, 0, 0, 61, 0, -55, 57], [0, 28, 2, 0, 96, 0, -22, 0, 0, -22, 0, 0, 4, 0, 12, -50], [0, 10, -7, 0, 1, 0, 4, 0, 0, 1, 0, 0, 32, 0, 10, 47], [-99, 0, 0, 82, 0, -164, 0, 0, -128, 0, -41, 0, 0, 41, 0, 0], [432, 0, 0, 0, 0, 4, 0, 216, -111, 0, 0, 43, 0, 25, 0, 0], [-95, 0, 0, -66, 0, 0, 0, -190, -33, 0, 9, 66, 0, 9, 0, 0], [-74, 0, 0, -1, 0, 1, 0, 74, 4, 0, 12, -8, 0, 0, 0, 0], [0, -16, 3, 0, -32, 0, -26, 0, 0, -10, 0, 0, -42, 0, 20, 42], [65, 0, 0, -4, 0, 0, 0, 130, 88, 0, 95, -176, 0, 95, 0, 0], [619, 0, 0, 10, 0, 10, 0, 619, -26, 0, 16, 10, 0, 32, 0, 0], [0, -16, -6, 0, 10, 0, 66, 0, 0, 10, 0, 0, 10, 0, -18, 30], [0, 0, 0, 166, 0, -83, 0, 98, 14, 0, 28, -144, 0, 14, 0, 0], [0, 27, -70, 0, -1, 0, 102, 0, 0, -12, 0, 0, -41, 0, 5, -17], [0, 20, -78, 0, -22, 0, 52, 0, 0, 26, 0, 0, 10, 0, -82, 6], [156, 0, 0, 65, 0, -65, 0, -156, -6, 0, -64, 58, 0, 0, 0, 0], [0, -2, 0, 0, 36, 0, 92, 0, 0, 2, 0, 0, -32, 0, 34, -68], [5, 0, 0, -20, 0, 0, 0, 10, -8, 0, 87, 16, 0, 87, 0, 0], [-15, 0, 0, -94, 0, 94, 0, 15, 82, 0, 110, -28, 0, 0, 0, 0], [0, -48, -17, 0, -16, 0, 69, 0, 0, 6, 0, 0, 46, 0, 50, 5], [0, 15, -13, 0, -23, 0, -21, 0, 0, -23, 0, 0, -1, 0, 15, -38], [0, 0, 0, -70, 0, 35, 0, -448, 10, 0, 20, 22, 0, 10, 0, 0], [196, 0, 0, 120, 0, 0, 0, 392, 40, 0, -64, -80, 0, -64, 0, 0], [0, -4, -14, 0, -2, 0, -12, 0, 0, 10, 0, 0, -26, 0, 10, 14], [0, 38, -143, 0, 177, 0, -10, 0, 0, -31, 0, 0, -122, 0, 46, -73], [0, -38, 75, 0, -92, 0, 26, 0, 0, 46, 0, 0, 122, 0, 16, 30], [0, -30, 318, 0, -134, 0, -112, 0, 0, 28, 0, 0, 18, 0, -44, 58], [0, 6, 37, 0, -33, 0, 10, 0, 0, -33, 0, 0, -48, 0, 6, 23], [542, 0, 0, 0, 0, -84, 0, 271, -42, 0, 0, -40, 0, 122, 0, 0], [-176, 0, 0, 156, 0, 0, 0, -352, -52, 0, -132, 104, 0, -132, 0, 0], [221, 0, 0, -161, 0, 161, 0, -221, 105, 0, 19, 86, 0, 0, 0, 0], [0, -12, 25, 0, 30, 0, 43, 0, 0, 30, 0, 0, 24, 0, -12, -16], [-929, 0, 0, -34, 0, 68, 0, 0, 75, 0, -27, 0, 0, 27, 0, 0], [0, 4, 6, 0, -50, 0, -4, 0, 0, 38, 0, 0, -18, 0, -62, 34], [0, 50, -57, 0, 112, 0, -89, 0, 0, -8, 0, 0, -138, 0, 38, -52], [14, 0, 0, 14, 0, 14, 0, 14, -64, 0, -97, 161, 0, -194, 0, 0], [0, -17, 188, 0, -37, 0, 15, 0, 0, 29, 0, 0, -2, 0, -61, 2], [0, 41, 12, 0, 39, 0, -126, 0, 0, -22, 0, 0, -99, 0, 33, -55], [-545, 0, 0, -31, 0, 31, 0, 545, 43, 0, -21, 64, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_224_s_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_224_3_s_b();".
// 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_224_3_s_b(:prec:=16)
    chi := MakeCharacter_224_s();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 3));
    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_224_3_s_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_224_3_s_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_224_s();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,3,sign)));
    Vf := Kernel([<3,R![5764801, 0, -9546376, 0, 13700498, 0, -3222016, 0, 545827, 0, -41216, 0, 2258, 0, -56, 0, 1]>],Snew);
    return Vf;
end function;