
// Make newform 384.6.f.e in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_384_f();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_384_f_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_384_6_f_e();".
// 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_384_6_f_e();".
// 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 := [8386816, 0, 0, 0, 8949568544, 0, 0, 0, 4098006217, 0, 0, 0, 8441320, 0, 0, 0, 5192, 0, 0, 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, 0, 0, 0, 0], [0, 0, -13007670695743153904, 0, 0, 0, -5835598220855211277, 0, 0, 0, -12019769956470792, 0, 0, 0, -7392863505464, 0, 0, 0, -1423883557, 0], [0, 2716987941781090225778752, -10401372150024040249126560, -88739499905504798275850032, 0, 1108326297000619810066276, -4931652765669594474052026, -40559125447481492306705755, 0, 2281675296972463730592, -10159676700829644475152, -83545626263893633949496, 0, 1403041960364985568, -6249170883296925744, -51386288160515109160, 0, 270188667554884, -1203647099846634, -9897196433216131], [0, 2716987941781090225778752, -154061690339172308880983296, -88739499905504798275850032, 0, 1108326297000619810066276, -65245314725445836837899984, -40559125447481492306705755, 0, 2281675296972463730592, -134361141842356595212416, -83545626263893633949496, 0, 1403041960364985568, -82635465662585436544, -51386288160515109160, 0, 270188667554884, -15915451814451280, -9897196433216131], [0, 8290688820128458882285120, -10401372150024040249126560, -270772046754320367251943728, 0, 3715616947437929477434372, -4931652765669594474052026, -123983907344652219970982027, 0, 7653610766154145624224, -10159676700829644475152, -255389535531461665097400, 0, 4706572393824709600, -6249170883296925744, -157082346303556144808, 0, 906246566233060, -1203647099846634, -30254684389925939], [0, -4304180885439770158835008, 0, -140607991742328594445600880, 0, -782126464676733006567412, 0, -63608566098397355161726367, 0, -1606888902993709344288, 0, -131019781055597514644952, 0, -988950337554660448, 0, -80585432342910822920, 0, -190718048886868, 0, -15521005659543719], [0, 2716987941781090225778752, -729274085647687680344570496, -88739499905504798275850032, 0, 1108326297000619810066276, -333501582428941867677393480, -40559125447481492306705755, 0, 2281675296972463730592, -686960499971028754596672, -83545626263893633949496, 0, 1403041960364985568, -422526616378001747904, -51386288160515109160, 0, 270188667554884, -81380041758115848, -9897196433216131], [0, 2716987941781090225778752, 10401372150024040249126560, -88739499905504798275850032, 0, 1108326297000619810066276, 4931652765669594474052026, -40559125447481492306705755, 0, 2281675296972463730592, 10159676700829644475152, -83545626263893633949496, 0, 1403041960364985568, 6249170883296925744, -51386288160515109160, 0, 270188667554884, 1203647099846634, -9897196433216131], [-1860793531876828969182976, 9066103485342945936749248, 0, 296071104113699520804345904, -910152561096506581944448, 4923588798997837228342300, 0, 136149161041151999900356423, -1884766712989508957184, 10148010199633940645472, 0, 280452052933059953170968, -1161602805298361344, 6243439556284290592, 0, 172498254772655186440, -223781016937600, 1202751124775740, 0, 33223918422578959], [-31803526100205582191742208, 25155625463833593714310464, 0, 821606296663709482006857584, -15374925115278095367161584, 10301136505329465094095348, 0, 375548675864490608437113455, -31622670536389435561344, 21209864066730927961632, 0, 773573429107681606303320, -19425038909702844544, 13041469266095195232, 0, 475800727002404846984, -3736490033643376, 2511168626661972, 0, 91641045763933943], [-366413161745523324812160, -2716987941781090225778752, 0, -88739499905504798275850032, -393049272788636932316472, -1108326297000619810066276, 0, -40559125447481492306705755, -814022369194997354688, -2281675296972463730592, 0, -83545626263893633949496, -503938742689487424, -1403041960364985568, 0, -51386288160515109160, -97754774539128, -270188667554884, 0, -9897196433216131], [-2198478970473139948872960, 10937814264516955005589440, 0, 357234773140922179315596944, -2358295636731821593898832, 4628624216220514263882876, 0, 163389767291029840752255401, -4884134215169984128128, 9530993625508232138592, 0, 336558833425464917422440, -3023632456136924544, 5860891097824818720, 0, 207006893553065845304, -586528647234768, 1128594952003740, 0, 39870333278003297], [-366413161745523324812160, -5503838380954774554031936, 0, -179755773329912582763896880, -393049272788636932316472, -2411971622219274643750324, 0, -82271516396066856138843891, -814022369194997354688, -4967643031563304677408, 0, -169467580897677649523448, -503938742689487424, -3054807177094847584, 0, -104234317232035626984, -97754774539128, -588217616893972, 0, -20075940411571035], [-8714690436337487277223168, -30941732014376855947928128, 0, -1010540650395543879435539792, 10807361690101268464429088, -14180837231438865756108052, 0, -462928695623211681404867225, 22362617543657660638464, -29209997450650404922656, 0, -953569719783989788015848, 13730458003181659904, -17965221751933928032, 0, -586512041878786877048, 2635180834563872, -3459941028783220, 0, -112964584978585553], [0, 74470744928237306644054080, 530889482417632408282388096, -2431866912316621349007707568, 0, 44409126668716174518168228, 244147734875505197747625512, -1120979433070204767753750963, 0, 91536837939140688333216, 502920040235337013546560, -2309109339829125767683320, 0, 56310455335340334816, 309333103444795518656, -1420271807755214781288, 0, 10846138039111044, 59579012815953128, -273550794865247259], [-25150633742487737654878976, -79552246375891269334805952, 0, -2598032921345906606832933008, -10410225810775986744740912, -39842669299316488464149148, 0, -1192443642111402607839251993, -21340958156850438809472, -82097925264534571834464, 0, -2456285746706041325329128, -13070323357590222464, -50502106603800938784, 0, -1510790255638335965624, -2506889803455152, -9727675375316412, 0, -290984556299407697], [0, -82193345142267700663895232, 520488110267608368033261536, 2684302543828071019313399504, 0, -40628767844893762328782092, 239216082109835603273573486, 1231677186694805707252665533, 0, -83725970002924566543840, 492760363534507369071408, 2537099929191500548051080, 0, -51509984089179913632, 303083932561498592912, 1560496465427573823128, 0, -9923184924394668, 58375365716106494, 300558176704002773], [5594307298398520561795584, 49073938985062747821426624, 0, 1602682858622942921044231600, 2730457683289519745833344, 24028014829434540212792652, 0, 735227017705515681205580071, 5654300138968526871552, 49506017849918286213600, 0, 1514473825650109694357784, 3484808415895084032, 30452100864502509216, 0, 931508551424097249928, 671343050812800, 5865443278334700, 0, 179412421823743471], [0, 125066394667656821064457792, 553760736126154797480507680, -4084614298650472921803221168, 0, 56925458111697687383869636, 254673718889186965643641250, -1870896183540064819836931667, 0, 117273416069688391038624, 524602541523557121597264, -3853788689117486925291000, 0, 72142863285237778912, 322669487284786540784, -2370349513639581202280, 0, 13897333871966884, 62147674431019154, -456538923650616251], [0, 118488106618860533828758464, -515287424192596347908698256, -3869656982989243288374525168, 0, 57707311226608273668496428, -236750255727000806036547473, -1774988181280282857780768627, 0, 118897174740823988202720, -487680525184092546833832, -3656247768172405901157624, 0, 73140056947953003936, -299959347119850130040, -2248850896642886572200, 0, 14088621761770188, -57773542166183177, -433138036298022363]];
    Rf_basisdens := [1, 12441066209394876, 47706811072134616986624, 23853405536067308493312, 47706811072134616986624, 23853405536067308493312, 23853405536067308493312, 5300756785792735220736, 11926702768033654246656, 23853405536067308493312, 1490837846004206780832, 5963351384016827123328, 2981675692008413561664, 11926702768033654246656, 23853405536067308493312, 23853405536067308493312, 23853405536067308493312, 11926702768033654246656, 23853405536067308493312, 11926702768033654246656];
    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_384_f();"
function MakeCharacter_384_f()
    N := 384;
    order := 2;
    char_gens := [127, 133, 257];
    v := [1, 1, 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_384_f_Hecke();"
function MakeCharacter_384_f_Hecke(Kf)
    N := 384;
    order := 2;
    char_gens := [127, 133, 257];
    char_values := [[-1, 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, 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]];
    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 := 6;
    raw_aps := [[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, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, -1, 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, 0, 0, 0, 0, 0], [0, 1, 2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 5, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, -2, 0, 0, -1, 1, 1, -1, 0, 0, 0, -1, 0, 0, 0, 0], [0, 0, 19, 0, -3, 0, 0, 2, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0], [305, 0, 0, 0, 0, 0, 0, 0, 5, 1, 0, 0, 0, -1, 0, 1, 0, -1, 0, 0], [0, 1, 27, 0, 9, 0, 0, 4, 0, 0, 0, 0, 0, 0, -3, 0, -1, 0, 2, -1], [5, 0, 0, 0, 0, -5, 0, 0, -14, -1, -1, 3, -6, 0, 0, 1, 0, -5, 0, 0], [0, -15, -156, 7, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, -2, 1], [1, 0, 0, 0, 0, -58, 0, 0, 0, -3, 4, -2, 1, 0, 0, 3, 0, -1, 0, 0], [0, -3, 215, 0, -119, 0, 0, 14, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, -6, -4], [1302, 0, 0, 0, 0, 0, 0, 0, 29, 0, -4, 5, -4, 5, 0, 0, 0, -8, 0, 0], [0, 7, 287, 0, 7, 0, 0, 26, 0, 0, 0, 0, 0, 0, -4, 0, 2, 0, 14, 6], [0, 236, 75, 8, 0, 0, -32, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -73, -764, -7, 0, 0, 15, 80, 0, 0, 0, 0, 0, 0, 7, 0, 7, 0, 14, -7], [0, 11, 221, 0, -376, 0, 0, -23, 0, 0, 0, 0, 0, 0, -22, 0, 8, 0, 22, 4], [-3597, 0, 0, 0, 0, 0, 0, 0, -28, -15, -4, -9, -4, -10, 0, -15, 0, -9, 0, 0], [-3060, 0, 0, 0, 0, 0, 0, 0, 9, 6, -15, -47, -15, -21, 0, 6, 0, -4, 0, 0], [-31, 0, 0, 0, 0, 55, 0, 0, 90, 3, 6, 11, -48, 0, 0, -3, 0, 31, 0, 0], [0, 268, -236, -7, 0, 0, -8, 34, 0, 0, 0, 0, 0, 0, -10, 0, -10, 0, -20, 10], [-11, 0, 0, 0, 0, 192, 0, 0, 1, 32, 133, -121, 65, 0, 0, -32, 0, 11, 0, 0], [4625, 0, 0, 0, 0, 0, 0, 0, -103, 36, -37, -143, -37, 2, 0, 36, 0, 71, 0, 0], [0, -12, 3949, 0, -263, 0, 0, 402, 0, 0, 0, 0, 0, 0, 83, 0, -61, 0, -24, -1], [-54, 0, 0, 0, 0, -23, 0, 0, 212, -50, 119, -46, -50, 0, 0, 50, 0, 54, 0, 0], [0, -267, -559, 2, 0, 0, 168, 27, 0, 0, 0, 0, 0, 0, -6, 0, -6, 0, -12, 6], [0, 393, -4892, 9, 0, 0, -97, 560, 0, 0, 0, 0, 0, 0, 7, 0, 7, 0, 14, -7], [38, 0, 0, 0, 0, 392, 0, 0, -142, 28, 384, -170, -286, 0, 0, -28, 0, -38, 0, 0], [27, 0, 0, 0, 0, -281, 0, 0, -114, 33, -299, 141, 142, 0, 0, -33, 0, -27, 0, 0], [0, 2729, 1009, -10, 0, 0, -152, -77, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 4, -2], [49, 0, 0, 0, 0, 258, 0, 0, -18, -129, 76, -68, 181, 0, 0, 129, 0, -49, 0, 0], [0, -30, -687, 0, 2028, 0, 0, 181, 0, 0, 0, 0, 0, 0, -16, 0, 60, 0, -60, -8], [0, -12, 8569, 0, 847, 0, 0, 1080, 0, 0, 0, 0, 0, 0, -112, 0, 152, 0, -24, 8], [124, 0, 0, 0, 0, 213, 0, 0, -568, 196, 501, -432, 98, 0, 0, -196, 0, -124, 0, 0], [0, -3271, -8080, 5, 0, 0, 347, 832, 0, 0, 0, 0, 0, 0, -28, 0, -28, 0, -56, 28], [0, -21, -723, 0, 2443, 0, 0, 242, 0, 0, 0, 0, 0, 0, -133, 0, 151, 0, -42, -12], [30795, 0, 0, 0, 0, 0, 0, 0, 869, -305, -432, -166, -432, 155, 0, -305, 0, -543, 0, 0], [0, 101, -1033, 0, 603, 0, 0, -146, 0, 0, 0, 0, 0, 0, -12, 0, -90, 0, 202, 50], [0, 4546, -2109, 244, 0, 0, 272, 93, 0, 0, 0, 0, 0, 0, 60, 0, 60, 0, 120, -60], [0, 3253, 984, -845, 0, 0, -35, 64, 0, 0, 0, 0, 0, 0, 50, 0, 50, 0, 100, -50], [328260, 0, 0, 0, 0, 0, 0, 0, 27, 94, 316, 557, 316, 15, 0, 94, 0, 90, 0, 0], [1212, 0, 0, 0, 0, 0, 0, 0, -1181, -6, 139, -69, 139, 61, 0, -6, 0, 408, 0, 0], [0, -43, 1959, 0, -2059, 0, 0, 76, 0, 0, 0, 0, 0, 0, -123, 0, 15, 0, -86, -97], [32, 0, 0, 0, 0, -787, 0, 0, 272, -368, 823, -332, -282, 0, 0, 368, 0, -32, 0, 0], [0, -144, 1523, 0, 3522, 0, 0, 577, 0, 0, 0, 0, 0, 0, 406, 0, 74, 0, -288, 96], [-235, 0, 0, 0, 0, -2577, 0, 0, 322, 383, -1040, 447, 356, 0, 0, -383, 0, 235, 0, 0], [0, 10956, 4432, -939, 0, 0, 664, -402, 0, 0, 0, 0, 0, 0, -66, 0, -66, 0, -132, 66], [0, 7937, 19560, 303, 0, 0, -383, -2176, 0, 0, 0, 0, 0, 0, 46, 0, 46, 0, 92, -46], [207, 0, 0, 0, 0, 1508, 0, 0, -635, 14, -1083, 631, 259, 0, 0, -14, 0, -207, 0, 0], [528490, 0, 0, 0, 0, 0, 0, 0, -901, -304, 460, 1043, 460, 179, 0, -304, 0, 56, 0, 0], [83700, 0, 0, 0, 0, 0, 0, 0, 2035, 10, 11, 843, 11, 229, 0, 10, 0, -592, 0, 0], [0, 15656, -5428, -2571, 0, 0, 1080, 1010, 0, 0, 0, 0, 0, 0, -170, 0, -170, 0, -340, 170], [-940, 0, 0, 0, 0, -428, 0, 0, 2958, -138, -1608, 662, 1368, 0, 0, 138, 0, 940, 0, 0], [555963, 0, 0, 0, 0, 0, 0, 0, -966, -83, -236, -1103, -236, -588, 0, -83, 0, 43, 0, 0], [0, -406, -25887, 0, 1603, 0, 0, -2468, 0, 0, 0, 0, 0, 0, 488, 0, 524, 0, -812, 100], [-623, 0, 0, 0, 0, 5487, 0, 0, 1754, 115, -832, 819, -908, 0, 0, -115, 0, 623, 0, 0], [0, 2937, 29572, 2059, 0, 0, 1277, -4016, 0, 0, 0, 0, 0, 0, -25, 0, -25, 0, -50, 25], [-455, 0, 0, 0, 0, -1964, 0, 0, 1727, -362, -1301, 1245, -771, 0, 0, 362, 0, 455, 0, 0], [0, 301, 2195, 0, 2166, 0, 0, 321, 0, 0, 0, 0, 0, 0, -624, 0, 334, 0, 602, 156], [0, 25, -33705, 0, -12327, 0, 0, -5272, 0, 0, 0, 0, 0, 0, 275, 0, 341, 0, 50, 333], [0, -203, 50381, 0, -19466, 0, 0, 3659, 0, 0, 0, 0, 0, 0, 32, 0, -82, 0, -406, -228], [873697, 0, 0, 0, 0, 0, 0, 0, 624, -765, -948, -599, -948, 486, 0, -765, 0, -811, 0, 0], [-44377, 0, 0, 0, 0, 0, 0, 0, -1174, -702, 140, 1290, 140, 1049, 0, -702, 0, 39, 0, 0], [0, -58, -19951, 0, -3665, 0, 0, -2352, 0, 0, 0, 0, 0, 0, -814, 0, 574, 0, -116, -178], [0, -421, 13667, 0, -15552, 0, 0, 39, 0, 0, 0, 0, 0, 0, 514, 0, 432, 0, -842, 52], [467715, 0, 0, 0, 0, 0, 0, 0, 4592, 1110, 266, 704, 266, -373, 0, 1110, 0, -545, 0, 0], [0, 53834, -7384, 345, 0, 0, -1080, 830, 0, 0, 0, 0, 0, 0, 346, 0, 346, 0, 692, -346], [0, -26337, 26864, 105, 0, 0, -809, -2912, 0, 0, 0, 0, 0, 0, 188, 0, 188, 0, 376, -188], [-1352, 0, 0, 0, 0, -5288, 0, 0, 3396, 660, -1380, -524, 3672, 0, 0, -660, 0, 1352, 0, 0], [1798799, 0, 0, 0, 0, 0, 0, 0, 2806, 593, -540, -423, -540, 472, 0, 593, 0, -185, 0, 0], [1073, 0, 0, 0, 0, 12547, 0, 0, -3638, 419, 17, 159, -930, 0, 0, -419, 0, -1073, 0, 0], [0, 46939, -672, 679, 0, 0, -1127, 256, 0, 0, 0, 0, 0, 0, -184, 0, -184, 0, -368, 184], [0, -429, 46599, 0, -12373, 0, 0, 4220, 0, 0, 0, 0, 0, 0, 219, 0, -121, 0, -858, -380], [1239712, 0, 0, 0, 0, 0, 0, 0, 3019, -1070, -220, 809, -220, -1241, 0, -1070, 0, -2490, 0, 0], [0, 1035, 42687, 0, -28037, 0, 0, 1206, 0, 0, 0, 0, 0, 0, -2390, 0, 616, 0, 2070, 148], [0, -51471, -27988, -5487, 0, 0, 999, 4112, 0, 0, 0, 0, 0, 0, -11, 0, -11, 0, -22, 11], [2356, 0, 0, 0, 0, -13894, 0, 0, -6079, -989, -697, 537, 772, 0, 0, 989, 0, -2356, 0, 0], [-406250, 0, 0, 0, 0, 0, 0, 0, -1178, -1132, -666, -874, -666, -422, 0, -1132, 0, -880, 0, 0], [0, 37621, 72858, -653, 0, 0, 3520, -8768, 0, 0, 0, 0, 0, 0, 80, 0, 80, 0, 160, -80], [0, 52653, -73040, 1383, 0, 0, 1625, 7328, 0, 0, 0, 0, 0, 0, 268, 0, 268, 0, 536, -268], [1921466, 0, 0, 0, 0, 0, 0, 0, -7453, 1072, 732, -3013, 732, -1381, 0, 1072, 0, 3096, 0, 0], [-1122931, 0, 0, 0, 0, 0, 0, 0, 4265, -3204, -2629, 65, -2629, 1046, 0, -3204, 0, -4277, 0, 0], [-932, 0, 0, 0, 0, 5397, 0, 0, 6536, -3740, -6951, 5184, 2090, 0, 0, 3740, 0, 932, 0, 0], [0, 61297, -40426, -237, 0, 0, -2464, 5316, 0, 0, 0, 0, 0, 0, -504, 0, -504, 0, -1008, 504], [-1878, 0, 0, 0, 0, 9154, 0, 0, 6499, -865, 6533, -2705, -4086, 0, 0, 865, 0, 1878, 0, 0], [-831294, 0, 0, 0, 0, 0, 0, 0, 5814, -1268, -2810, -1882, -2810, 798, 0, -1268, 0, -2940, 0, 0], [0, 1959, 65847, 0, 24889, 0, 0, 8824, 0, 0, 0, 0, 0, 0, -3267, 0, 1531, 0, 3918, 1091], [-1573, 0, 0, 0, 0, 16895, 0, 0, 4494, 225, 457, -3811, 10294, 0, 0, -225, 0, 1573, 0, 0], [0, 44087, -129142, 2491, 0, 0, 944, 13616, 0, 0, 0, 0, 0, 0, -68, 0, -68, 0, -136, 68], [1136240, 0, 0, 0, 0, 0, 0, 0, -5318, 12, -2288, -4546, -2288, 2722, 0, 12, 0, 2692, 0, 0], [482, 0, 0, 0, 0, -14979, 0, 0, -2444, 998, -5220, 3318, -512, 0, 0, -998, 0, -482, 0, 0], [0, 32416, 43283, -4280, 0, 0, 3008, -4171, 0, 0, 0, 0, 0, 0, -800, 0, -800, 0, -1600, 800], [0, -546, 70783, 0, 90794, 0, 0, 17981, 0, 0, 0, 0, 0, 0, 2098, 0, -1086, 0, -1092, -40], [-205651, 0, 0, 0, 0, 0, 0, 0, 2754, -5453, 316, 7755, 316, 1128, 0, -5453, 0, -5995, 0, 0], [0, 1427, 99835, 0, -19449, 0, 0, 7630, 0, 0, 0, 0, 0, 0, -298, 0, -1660, 0, 2854, 448], [1557, 0, 0, 0, 0, 28050, 0, 0, -3318, -1353, 444, -2352, 7521, 0, 0, 1353, 0, -1557, 0, 0], [0, 908, -32827, 0, -44579, 0, 0, -8908, 0, 0, 0, 0, 0, 0, -2745, 0, 1921, 0, 1816, 496], [0, -114753, -142500, 12961, 0, 0, -6441, 14576, 0, 0, 0, 0, 0, 0, -431, 0, -431, 0, -862, 431], [0, 1194, -153453, 0, -31597, 0, 0, -19988, 0, 0, 0, 0, 0, 0, -5987, 0, 863, 0, 2388, -1368], [0, -3276, 123241, 0, 14765, 0, 0, 16546, 0, 0, 0, 0, 0, 0, 7403, 0, -357, 0, -6552, 247], [0, 36537, -234714, -10017, 0, 0, -2496, 28860, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1763, 0, 0, 0, 0, -17418, 0, 0, -7150, 1861, 3092, -2948, 799, 0, 0, -1861, 0, -1763, 0, 0], [0, 2743, -42865, 0, 101890, 0, 0, 5385, 0, 0, 0, 0, 0, 0, -5840, 0, 650, 0, 5486, 148], [-729173, 0, 0, 0, 0, 0, 0, 0, 3536, -1402, -2486, -992, -2486, 2099, 0, -1402, 0, -1881, 0, 0], [0, -37697, 175161, -11350, 0, 0, 1368, -17933, 0, 0, 0, 0, 0, 0, 1550, 0, 1550, 0, 3100, -1550], [-902, 0, 0, 0, 0, 39700, 0, 0, 1436, 1270, 8968, -1080, -15966, 0, 0, -1270, 0, 902, 0, 0], [2070021, 0, 0, 0, 0, 0, 0, 0, 11997, 6349, 3832, 4492, 3832, -1233, 0, 6349, 0, 1939, 0, 0], [-1019260, 0, 0, 0, 0, 0, 0, 0, 6353, -4762, -1415, 2905, -1415, -1717, 0, -4762, 0, -7452, 0, 0], [6879, 0, 0, 0, 0, -23193, 0, 0, -23530, 2893, 6535, -6895, 4722, 0, 0, -2893, 0, -6879, 0, 0], [0, 145239, 34804, 13147, 0, 0, 6061, -8272, 0, 0, 0, 0, 0, 0, 307, 0, 307, 0, 614, -307], [-6465, 0, 0, 0, 0, 37112, 0, 0, 18239, 1156, -441, -2287, 6587, 0, 0, -1156, 0, 6465, 0, 0], [0, -2263, 20311, 0, -100340, 0, 0, -7369, 0, 0, 0, 0, 0, 0, 2714, 0, 780, 0, -4526, -516], [-1678, 0, 0, 0, 0, 2773, 0, 0, 6996, -1962, -2644, 7046, -13888, 0, 0, 1962, 0, 1678, 0, 0], [3450, 0, 0, 0, 0, -6898, 0, 0, -1831, -8519, -12177, 11045, -262, 0, 0, 8519, 0, -3450, 0, 0], [0, -4562, -373429, 0, 65187, 0, 0, -31772, 0, 0, 0, 0, 0, 0, 7157, 0, 1855, 0, -9124, -56], [-1380293, 0, 0, 0, 0, 0, 0, 0, 10837, 1279, 1544, 6218, 1544, 1195, 0, 1279, 0, -1935, 0, 0], [0, 453, -212493, 0, 49681, 0, 0, -17404, 0, 0, 0, 0, 0, 0, -4807, 0, 3715, 0, 906, -93], [0, -157920, -382501, 6604, 0, 0, 2080, 40005, 0, 0, 0, 0, 0, 0, 1272, 0, 1272, 0, 2544, -1272], [0, 163315, 85108, -5577, 0, 0, 13649, -10960, 0, 0, 0, 0, 0, 0, -653, 0, -653, 0, -1306, 653], [638045, 0, 0, 0, 0, 0, 0, 0, 28401, 2508, 2595, 9673, 2595, -3714, 0, 2508, 0, -8197, 0, 0], [0, -334, -187103, 0, -89027, 0, 0, -32438, 0, 0, 0, 0, 0, 0, 6969, 0, -1755, 0, -668, 2273], [0, -32076, 213272, 5969, 0, 0, -14856, -21618, 0, 0, 0, 0, 0, 0, -234, 0, -234, 0, -468, 234], [0, 3605, 439589, 0, -57547, 0, 0, 38800, 0, 0, 0, 0, 0, 0, -763, 0, -919, 0, 7210, 2764], [0, 138, -187187, 0, 15489, 0, 0, -17830, 0, 0, 0, 0, 0, 0, -4615, 0, 1237, 0, 276, -1551], [0, 274837, 310244, -16217, 0, 0, -223, -30256, 0, 0, 0, 0, 0, 0, -1265, 0, -1265, 0, -2530, 1265], [-7256282, 0, 0, 0, 0, 0, 0, 0, -3928, -4638, -376, 494, -376, -3124, 0, -4638, 0, -4370, 0, 0], [2810, 0, 0, 0, 0, -11167, 0, 0, -20428, 11998, 7859, -8366, -2618, 0, 0, -11998, 0, -2810, 0, 0], [0, -251793, 427336, 11497, 0, 0, -8505, -48576, 0, 0, 0, 0, 0, 0, 966, 0, 966, 0, 1932, -966], [0, -1108, -441449, 0, -54976, 0, 0, -54705, 0, 0, 0, 0, 0, 0, 248, 0, 6256, 0, -2216, 2144], [-9296389, 0, 0, 0, 0, 0, 0, 0, 7267, -13005, -5960, 7188, -5960, 5521, 0, -13005, 0, -13587, 0, 0], [-16845, 0, 0, 0, 0, 4259, 0, 0, 47982, 2553, -7858, -6687, 33224, 0, 0, -2553, 0, 16845, 0, 0], [0, 318133, 247616, 27843, 0, 0, -11939, -30176, 0, 0, 0, 0, 0, 0, -1960, 0, -1960, 0, -3920, 1960], [5579, 0, 0, 0, 0, -47286, 0, 0, -22940, 6203, -2972, 3246, -9997, 0, 0, -6203, 0, -5579, 0, 0], [-1362868, 0, 0, 0, 0, 0, 0, 0, 16499, -2150, 3627, 12619, 3627, -3427, 0, -2150, 0, -8792, 0, 0], [0, 5172, -392819, 0, -98711, 0, 0, -56766, 0, 0, 0, 0, 0, 0, -10885, 0, 299, 0, 10344, -121], [0, -2895, 459085, 0, 236213, 0, 0, 78504, 0, 0, 0, 0, 0, 0, 4989, 0, 2745, 0, -5790, 972], [0, -2122, -26835, 0, -109035, 0, 0, -13226, 0, 0, 0, 0, 0, 0, -1265, 0, 8179, 0, -4244, 1335], [-12479, 0, 0, 0, 0, -92930, 0, 0, 38556, -1119, -16148, 3322, 23449, 0, 0, 1119, 0, 12479, 0, 0], [0, 1670, -461495, 0, 7069, 0, 0, -53664, 0, 0, 0, 0, 0, 0, 5875, 0, -5775, 0, 3340, 1720], [0, 234, -262687, 0, 100509, 0, 0, -17686, 0, 0, 0, 0, 0, 0, -687, 0, -3283, 0, 468, -1751], [6026, 0, 0, 0, 0, -44371, 0, 0, -14172, -3906, -9854, -2506, 31132, 0, 0, 3906, 0, -6026, 0, 0], [0, -218619, -145851, 2230, 0, 0, -3832, 15039, 0, 0, 0, 0, 0, 0, 3426, 0, 3426, 0, 6852, -3426], [0, -407479, 116752, -29379, 0, 0, 22627, -10560, 0, 0, 0, 0, 0, 0, -2052, 0, -2052, 0, -4104, 2052], [-13315913, 0, 0, 0, 0, 0, 0, 0, 24846, 3097, -5396, -8423, -5396, -4224, 0, 3097, 0, -6593, 0, 0], [0, 163887, 301928, -1897, 0, 0, 25273, -40288, 0, 0, 0, 0, 0, 0, 3478, 0, 3478, 0, 6956, -3478], [-1509, 0, 0, 0, 0, 107462, 0, 0, 8850, -4323, 15516, 3564, -37401, 0, 0, 4323, 0, 1509, 0, 0], [0, -385, 316495, 0, 301771, 0, 0, 70868, 0, 0, 0, 0, 0, 0, -8173, 0, 8823, 0, -770, -60], [-2920000, 0, 0, 0, 0, 0, 0, 0, -2413, 11810, 8620, 5489, 8620, 1295, 0, 11810, 0, 13046, 0, 0], [0, -272881, -17320, 15749, 0, 0, -13557, 1344, 0, 0, 0, 0, 0, 0, 210, 0, 210, 0, 420, -210], [-18646, 0, 0, 0, 0, -68440, 0, 0, 66742, -10804, 16492, -1038, -19066, 0, 0, 10804, 0, 18646, 0, 0], [0, -1774, 1131751, 0, 41117, 0, 0, 134014, 0, 0, 0, 0, 0, 0, -5573, 0, 1201, 0, -3548, -3960], [-6996855, 0, 0, 0, 0, 0, 0, 0, 51894, 2303, -11644, -9389, -11644, -1644, 0, 2303, 0, -15543, 0, 0], [0, -13853, -62125, 0, 99241, 0, 0, 15362, 0, 0, 0, 0, 0, 0, 9077, 0, 10157, 0, -27706, -4236], [-13662254, 0, 0, 0, 0, 0, 0, 0, 2217, 188, 9212, 18917, 9212, -87, 0, 188, 0, -580, 0, 0], [10614, 0, 0, 0, 0, 8069, 0, 0, -44196, 12354, 32474, -24582, -3556, 0, 0, -12354, 0, -10614, 0, 0], [15074, 0, 0, 0, 0, 21246, 0, 0, -39591, -5631, -14257, 245, 33410, 0, 0, 5631, 0, -15074, 0, 0], [-14832643, 0, 0, 0, 0, 0, 0, 0, -31001, -22456, -7215, -2001, -7215, 460, 0, -22456, 0, -11969, 0, 0], [0, -3815, 553971, 0, -4355, 0, 0, 59816, 0, 0, 0, 0, 0, 0, 16179, 0, 885, 0, -7630, 4717], [0, -476917, -1059555, -41022, 0, 0, 6584, 124159, 0, 0, 0, 0, 0, 0, 2750, 0, 2750, 0, 5500, -2750], [7371, 0, 0, 0, 0, -93810, 0, 0, -20250, -1863, -11860, 96, 25295, 0, 0, 1863, 0, -7371, 0, 0], [22546, 0, 0, 0, 0, 116741, 0, 0, -70220, 2582, 24342, -13570, -10556, 0, 0, -2582, 0, -22546, 0, 0], [0, -334344, 382552, -40255, 0, 0, 27864, -37810, 0, 0, 0, 0, 0, 0, -4370, 0, -4370, 0, -8740, 4370], [15204, 0, 0, 0, 0, 148062, 0, 0, -32957, -12655, 1725, -2021, 15268, 0, 0, 12655, 0, -15204, 0, 0], [-17223899, 0, 0, 0, 0, 0, 0, 0, -30498, 195, -5388, -23993, -5388, -4284, 0, 195, 0, 8933, 0, 0], [-10381, 0, 0, 0, 0, 50467, 0, 0, 23182, 7961, -30636, 12201, 16708, 0, 0, -7961, 0, 10381, 0, 0], [0, 194917, -850388, 17407, 0, 0, -2663, 91568, 0, 0, 0, 0, 0, 0, -803, 0, -803, 0, -1606, 803]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_384_f_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_384_6_f_e();".
// 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_384_6_f_e(:prec:=20)
    chi := MakeCharacter_384_f();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 6));
    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_384_6_f_e();".
// 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_384_6_f_e( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_384_f();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<5,R![-2553423501099008, 0, 145811351932928, 0, -256371264512, 0, 117835648, 0, -19432, 0, 1]>,<23,R![26581880445239296, 65002850471936, 8844092416, -15431552, -1528, 1]>],Snew);
    return Vf;
end function;