
// Make newform 864.5.e.g in Magma, downloaded from the LMFDB on 20 October 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_864_e();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_864_e_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_864_5_e_g();".
// 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_864_5_e_g();".
// 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 := [16848900, 14664480, 10353832, 5337264, 2503364, 466392, 8308, -45888, -11779, -4788, 1844, 1368, 313, -60, -22, 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], [2738802035386874843360704093980, 9541598272215748808230194171468, 3513074118455370639543838881030, -1394687218518949372064473203344, -484391067286060849909818095108, 121932621970777000346494883890, -54699056846948812081977012867, 519371228840239239961289840, 10660555011707057720673121152, 2949157737188596724887990914, -1525951775317730211089117451, -258333296959872459636209524, 65684129288428406342989130, 18946230576732294410029022, -4315913415083500352592369, 111522559817722535215732], [-263600037766133572284, -245090803985273136480, -87989137522461008842, -43668679219320791500, -8056659116793954432, 1450745629542873084, 1465941818649363365, 208824546817392344, -51240193265425260, -50930714416589796, -19140473068430483, -930018750815360, 1285218085145598, 172482854620380, -44464970174057, -5413982430824], [4809616526152678389560, 478413040484659780008, 1212892004675672616312, -393298071168127025416, -86990831155837951460, -150314682462701271396, 12793481404923401944, -8896063307973079680, 5470492149830624540, 1102654697240756828, 219550494582558896, -328245407977914936, -27668302669083660, 11296251788438292, 3919894341492544, -844355027236632], [-1048798983072236366331795338697420, -535397768111124778210667922081248, -496609051901199582515194676230024, -243308992469640159972434836325286, -49297410921698273268983964149896, -9432482193226836902767665918, 3067026382227089061683561242952, 1067043792802454397721173463139, 606132900180070575208757216964, -104445250279223003459782863622, -138332242504867697769560161556, -36062055365960258202886587945, 5512766405678651558809924360, 2416366755712204790662829928, 12422852746643004826459948, -102515527670386626540391475], [-41965681841285957817402708843938670, 81458740481616883514929356064832906, -485658114400391572842178322082496, 30772185066461904916067122614542358, 6953951619091174646165923300628415, 4017060767069922386770350871476743, -1089272499882173797568907360487267, 176199773909532507208696867951530, -136754843893061489880559553830605, -14966644557707000420269354821449, 997577769813217166729264891107, 10714670235432133102939184667468, 384750838411016726575438886895, -436371440823695291227955455991, -106639831492579111737165508907, 29267197250706926792214726576], [-2551550120779740097889268042634298340, -1405448417381735371047668789764742336, -730163691129250220771158343236035734, -90111104461689595342795842496671348, 8349615632647886804419681253741040, 36567681619838083149205052479917172, -4511868886816981649496998307160133, 3125385824650049797862803814183640, -583991589902826974652651137587620, -414808838978604646692299257899436, -192343655455596900868015309890157, 58656366458549352357953110895952, 12840385719728325126248503131090, -1066073600604604446039239654764, -1056695051626143162039069999703, 141183491501670937190832908184], [4646281227008898519543537834246540, 1272743131561565012059660104093384, -1540448922300784553509818012504304, -561383108288480051523851834823382, 227038962793800449043534601126392, -25809867950608479638760453493818, -5735831550622706996667872717536, 21947271560206696126866772514399, 3031126860072998072050262616732, -3665117038950535152441095141826, -783937853471025227532773737340, 352491550786828221444810808219, 67971215404816123393395314280, -16288411356462913510792610244, -3231411366127131638667029948, 668400584860366196186105833], [694860022302170183799686907540, 234065314809140422614262915892, 163939932200442803104795729720, 85539389718245955901466616932, 24124208657152035583515661854, -388753941667796762153280370, -1328774602259662644289228262, -137541498554824701055151548, -244811744753854101228504306, -4642072548557842158580154, 46376475411173699359552382, 17890123066554177070741720, -1488244579137453834522810, -1062027475410195517447502, -48890608368776656972846, 46757396200977896755600], [73726207924246826170786020, -13118709959919934126266105964, -1635501545426454931927093282, -2811849769475015333974067120, -453874129467326533772928080, -362422910916036570271112730, 131370823221220095297249869, -13765527021045651139741276, 10545074275983255512111940, -247929993137621470999898, -5908188304861730257331, -930814735138596560589832, -28266772858662736398010, 37150317810672534889458, 10090534615383335327143, -2752958958829954421816], [-172144872003083573356193671104, -159921531020284288468787595976, -111598657175067858500825219428, -58091459934209793348838789914, -19468475267785572287952397044, -1621334142356686451568598006, 988562085710111576312522300, 433990639073010262810539885, 183712186565124718085896332, -15388491221759737816388198, -37821282831188403968215808, -11996777709685312393800615, 1219003563436373702309796, 799394369886464011201372, 16480681290784764337384, -32305463880318812384469], [59127469970488366478653965172140, 475037572515151944760974601780668, 94246459924806919950930883927402, 56961608711337806261262232307056, 4485413916520429393697090733504, 7494341578123202424899200790994, -6384425856436523116754272546577, 126482174590766068927001165308, 286608742589243588270923643484, 164437828984542588114034459218, -58675737679946781238606350385, 5978602161565719339408314168, 2983291674536099607302989650, 22579949599128886576986582, -352136776033227418849852051, 57545821461761961907865096], [4015632530007249727615076776378800, 1728460232870770254170008905513552, 707238283001826779259340971802712, 415199269128762597488852010136344, 210639365224563100020763915415440, -1520333036247461888238485395136, -9456567048550854562036217929108, 2380341783026579912928860081908, -860856001308317020929906025920, -709950473625437825383503287520, 169317426375632434256608162492, 181835761380713800716276723636, 3684050830831220356937005400, -10626307238035759614018244072, -801334752511630046835341708, 427014188154142810214889212], [16309395998238969820931459213910, -51073065034304789412376029555658, 17919592597625656436453312807218, -62425530250833896159181419022416, -15512685007920636242059778983609, -3374993135818162257141997301489, 816639839804588436830915439772, -137322539163929274398580902253, 330203306886099544186750615731, 52605376339906674654567712387, -28617215126491819816402147150, -18489701618273093439828322963, 628313718752653757700163645, 918391482965260572117248303, 79745429639124884261672066, -40814663248638283604250381], [24734800203671117109735988072499220, 11633344211010713336014301488291672, 6836003788636906469125523206956768, 3707179644737815414667644964281014, 1380409549975437334216732676880976, 44576044004219159560829157482186, -66856362951967650781476239722248, -10058364788571882653409341305343, -10933431808603718565392656306884, -777409019204977828798401848878, 2224701341179765278153433554180, 963051924301301845595022974277, -56952948313322744784115719040, -59607459298848635329658642252, -2641094674618160154230673324, 2485828842396286996439659319], [2585614451270301989734687920, 1673290216023956563390733136, 1174105909356859702592316920, 609743853978587066871307016, 186759317280953931637805232, 5385841466299526807767200, -9774926173154566167370516, -2648885196821490536455444, -1804813326226719043092768, 48247155335203291772448, 367139972598644581095196, 125085930196466074267180, -11615820317139817722600, -8044660676045675131896, -216124730016060590348, 329968828607321065540]];
    Rf_basisdens := [1, 1180311925805950464388342782120, 7005013283546157144, 145909040228022525985, 14535033285007714493576976181140, 1097395013018082444265061701676070, 4389580052072329777060246806704280, 14535033285007714493576976181140, 977079408779760318202270515, 38129928147502841685942264, 390831763511904127280908206, 590155962902975232194171391060, 3633758321251928623394244045285, 295077981451487616097085695530, 14535033285007714493576976181140, 1401835593658192709041995];
    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_864_e();"
function MakeCharacter_864_e()
    N := 864;
    order := 2;
    char_gens := [703, 325, 353];
    v := [2, 2, 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_864_e_Hecke();"
function MakeCharacter_864_e_Hecke( : Kf := false)
    N := 864;
    order := 2;
    char_gens := [703, 325, 353];
    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], [-1, 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 := 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 := 5;
    raw_aps := [[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, 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, 0, -1, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0], [0, 0, -1, -1, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -6, 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, 1, 0, -2, 0], [-164, 0, 0, 0, 0, 0, 0, 0, -4, 0, -3, 0, 0, 0, 0, -1], [0, -1, 0, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, -12, 0, 0, -2, 0, 0, 0, 0, -1, 0, 0, 0], [0, 0, 16, 15, 0, -10, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 23, 0, 0, 0, 0, 0, 0, 0, 8, 0, -3, 0, -1, 0, 0], [0, 0, -6, 3, 0, -10, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0], [204, 0, 0, 0, 0, 0, 0, 0, 6, 0, 8, 0, 0, 0, 0, -2], [0, 0, 0, 0, 22, 0, 0, -4, 0, 0, 0, 0, 7, 0, 8, 0], [0, 0, 13, -24, 0, 15, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-339, 0, 0, 0, 0, 0, 0, 0, -9, 0, 23, 0, 0, 0, 0, -6], [0, 0, 0, 0, 85, 0, 0, 7, 0, 0, 0, 0, -4, 0, 4, 0], [0, 0, -85, 4, 0, 41, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -140, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7, 0, 2, 0, 0], [-5, 0, 0, 0, 0, 0, 0, 0, -4, 0, -24, 0, 0, 0, 0, -13], [0, -117, 0, 0, 0, 0, 0, 0, 0, -14, 0, 6, 0, 7, 0, 0], [0, 0, 0, 0, -121, 0, 0, 3, 0, 0, 0, 0, 21, 0, 2, 0], [0, 0, -95, -6, 0, -32, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0], [644, 0, 0, 0, 0, 0, 0, 0, 22, 0, -57, 0, 0, 0, 0, -15], [0, 109, 0, 0, 0, 0, 0, 0, 0, -17, 0, 1, 0, 4, 0, 0], [0, 0, 0, 0, -115, 0, 0, 8, 0, 0, 0, 0, -15, 0, -20, 0], [0, 0, -135, -101, 0, -66, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 316, 0, 0, 0, 0, 0, 0, 0, -36, 0, -9, 0, -14, 0, 0], [0, 0, 0, 0, 230, 0, 0, 2, 0, 0, 0, 0, 32, 0, -40, 0], [0, -321, 0, 0, 0, 0, 0, 0, 0, 76, 0, 11, 0, 13, 0, 0], [0, 0, 0, 0, 322, 0, 0, -21, 0, 0, 0, 0, -11, 0, -24, 0], [2060, 0, 0, 0, 0, 0, 0, 0, -8, 0, 30, 0, 0, 0, 0, -42], [0, 0, 0, 0, 65, 0, 0, 34, 0, 0, 0, 0, -5, 0, 11, 0], [0, 0, 518, -369, 0, 10, -28, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -777, 0, 0, 0, 0, 0, 0, 0, 48, 0, -10, 0, -18, 0, 0], [0, 0, -661, -354, 0, 96, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-4168, 0, 0, 0, 0, 0, 0, 0, -26, 0, 158, 0, 0, 0, 0, -54], [0, 0, 591, 770, 0, 111, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-3285, 0, 0, 0, 0, 0, 0, 0, 35, 0, -75, 0, 0, 0, 0, -54], [0, 1387, 0, 0, 0, 0, 0, 0, 0, -26, 0, 40, 0, -2, 0, 0], [0, 0, 0, 0, 27, 0, 0, -60, 0, 0, 0, 0, -11, 0, 28, 0], [0, 0, 0, 0, 393, 0, 0, 46, 0, 0, 0, 0, -36, 0, 49, 0], [0, 0, 0, 0, 563, 0, 0, 9, 0, 0, 0, 0, 25, 0, 56, 0], [0, 0, -828, 1884, 0, -282, -30, 0, 0, 0, 0, 0, 0, 0, 0, 0], [9062, 0, 0, 0, 0, 0, 0, 0, -14, 0, -184, 0, 0, 0, 0, -65], [0, -1842, 0, 0, 0, 0, 0, 0, 0, -42, 0, 27, 0, 0, 0, 0], [0, 0, 1399, -1077, 0, -161, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2542, 0, 0, 0, 0, 0, 0, 0, -8, 0, 218, 0, 0, 0, 0, -58], [0, 0, -1498, -488, 0, -256, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 43, 0, 0, 0, 0, 0, 0, 0, 17, 0, 28, 0, 44, 0, 0], [0, 0, 1869, 2353, 0, 167, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1438, 0, 0, 0, 0, 0, 0, 0, -190, 0, -27, 0, -27, 0, 0], [0, 0, 0, 0, -610, 0, 0, 69, 0, 0, 0, 0, 106, 0, -8, 0], [1948, 0, 0, 0, 0, 0, 0, 0, 176, 0, -106, 0, 0, 0, 0, -20], [0, 885, 0, 0, 0, 0, 0, 0, 0, -241, 0, 0, 0, -10, 0, 0], [0, 0, 0, 0, -591, 0, 0, -80, 0, 0, 0, 0, -110, 0, 7, 0], [0, -1528, 0, 0, 0, 0, 0, 0, 0, -138, 0, 2, 0, 5, 0, 0], [0, 0, 0, 0, -1185, 0, 0, -8, 0, 0, 0, 0, 47, 0, -17, 0], [0, 0, 3325, -2419, 0, -279, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0], [14365, 0, 0, 0, 0, 0, 0, 0, 53, 0, -221, 0, 0, 0, 0, -1], [0, -1511, 0, 0, 0, 0, 0, 0, 0, 18, 0, -28, 0, 1, 0, 0], [0, 0, 0, 0, -82, 0, 0, -150, 0, 0, 0, 0, 77, 0, 50, 0], [-43738, 0, 0, 0, 0, 0, 0, 0, -212, 0, -534, 0, 0, 0, 0, 2], [0, 0, -3995, -4170, 0, 357, 290, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-34280, 0, 0, 0, 0, 0, 0, 0, -392, 0, 153, 0, 0, 0, 0, 7], [0, 327, 0, 0, 0, 0, 0, 0, 0, -107, 0, 31, 0, -64, 0, 0], [0, 0, 3426, -2631, 0, 606, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1060, 0, 0, 131, 0, 0, 0, 0, -2, 0, 196, 0], [52058, 0, 0, 0, 0, 0, 0, 0, -2, 0, -559, 0, 0, 0, 0, 84], [0, 0, 0, 0, 1544, 0, 0, -98, 0, 0, 0, 0, 122, 0, -122, 0], [0, 0, 2481, -4922, 0, 353, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 689, 0, 0, 0, 0, 0, 0, 0, -128, 0, 138, 0, -39, 0, 0], [-38102, 0, 0, 0, 0, 0, 0, 0, 78, 0, -405, 0, 0, 0, 0, 150], [0, -2990, 0, 0, 0, 0, 0, 0, 0, -58, 0, 10, 0, -146, 0, 0], [-66491, 0, 0, 0, 0, 0, 0, 0, 200, 0, 80, 0, 0, 0, 0, 186], [0, 0, -2012, -4921, 0, -800, -246, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-26404, 0, 0, 0, 0, 0, 0, 0, -102, 0, 734, 0, 0, 0, 0, 182], [0, 0, 3768, -2251, 0, -1166, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0], [55795, 0, 0, 0, 0, 0, 0, 0, -26, 0, 954, 0, 0, 0, 0, 199], [0, 0, 0, 0, -3219, 0, 0, -2, 0, 0, 0, 0, 106, 0, -72, 0], [0, 0, -6948, 8709, 0, 1492, -90, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 5955, 0, 0, 0, 0, 0, 0, 0, 77, 0, -163, 0, -102, 0, 0], [32381, 0, 0, 0, 0, 0, 0, 0, -322, 0, -592, 0, 0, 0, 0, 200], [0, 1755, 0, 0, 0, 0, 0, 0, 0, 348, 0, 104, 0, 87, 0, 0], [0, 0, 0, 0, 1788, 0, 0, 33, 0, 0, 0, 0, 267, 0, 218, 0], [0, 0, -1929, -3611, 0, -23, 422, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 2162, 11837, 0, 104, 272, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2855, 0, 0, -21, 0, 0, 0, 0, 55, 0, -202, 0], [0, 0, -5705, -7237, 0, -362, -372, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1280, 0, 0, 30, 0, 0, 0, 0, 395, 0, -556, 0], [0, 0, 3861, -6737, 0, 2013, -395, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 6045, 0, 0, 0, 0, 0, 0, 0, 116, 0, 41, 0, 92, 0, 0], [0, 865, 0, 0, 0, 0, 0, 0, 0, -77, 0, 318, 0, 140, 0, 0], [0, 0, 0, 0, 723, 0, 0, 12, 0, 0, 0, 0, -415, 0, 139, 0], [-136460, 0, 0, 0, 0, 0, 0, 0, -704, 0, -240, 0, 0, 0, 0, 214], [0, 0, 0, 0, 2409, 0, 0, 346, 0, 0, 0, 0, 211, 0, -97, 0], [0, -13219, 0, 0, 0, 0, 0, 0, 0, -380, 0, 85, 0, 35, 0, 0], [0, 0, 721, -11113, 0, 353, 272, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -10936, 0, 0, 0, 0, 0, 0, 0, 16, 0, -32, 0, -10, 0, 0], [0, 0, 0, 0, -2537, 0, 0, 308, 0, 0, 0, 0, 555, 0, 359, 0], [139950, 0, 0, 0, 0, 0, 0, 0, -52, 0, 122, 0, 0, 0, 0, 248], [0, 0, -5035, 16814, 0, -282, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 11802, 0, 0, 0, 0, 0, 0, 0, 386, 0, 135, 0, 188, 0, 0], [0, 0, 6602, -8601, 0, -1094, 356, 0, 0, 0, 0, 0, 0, 0, 0, 0], [134065, 0, 0, 0, 0, 0, 0, 0, 731, 0, 1891, 0, 0, 0, 0, 346], [0, 0, 0, 0, 2605, 0, 0, -263, 0, 0, 0, 0, 387, 0, 234, 0], [-211158, 0, 0, 0, 0, 0, 0, 0, -764, 0, 1856, 0, 0, 0, 0, 51], [0, 7273, 0, 0, 0, 0, 0, 0, 0, 619, 0, 269, 0, 374, 0, 0], [0, 0, 0, 0, -6519, 0, 0, 40, 0, 0, 0, 0, -421, 0, 97, 0], [0, 0, 0, 0, 6475, 0, 0, 8, 0, 0, 0, 0, -496, 0, 412, 0], [0, -375, 0, 0, 0, 0, 0, 0, 0, 435, 0, -413, 0, -146, 0, 0], [0, 0, 0, 0, 6362, 0, 0, 68, 0, 0, 0, 0, -374, 0, 658, 0], [0, 0, 5880, -4060, 0, -2112, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 10621, 0, 0, 0, 0, 0, 0, 0, 1364, 0, -299, 0, -44, 0, 0], [0, 0, 6671, 17657, 0, 32, -202, 0, 0, 0, 0, 0, 0, 0, 0, 0], [261824, 0, 0, 0, 0, 0, 0, 0, -746, 0, 1391, 0, 0, 0, 0, -7], [92063, 0, 0, 0, 0, 0, 0, 0, 170, 0, -1300, 0, 0, 0, 0, -83], [0, 11842, 0, 0, 0, 0, 0, 0, 0, 1376, 0, -178, 0, -47, 0, 0], [0, 0, -2818, -3212, 0, -944, -764, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1978, 0, 0, -804, 0, 0, 0, 0, -368, 0, 550, 0], [0, -12311, 0, 0, 0, 0, 0, 0, 0, 1680, 0, 87, 0, 190, 0, 0], [-131720, 0, 0, 0, 0, 0, 0, 0, -946, 0, -1496, 0, 0, 0, 0, -262], [0, 0, -13298, -7842, 0, 504, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 4339, 0, 0, 508, 0, 0, 0, 0, -291, 0, -68, 0], [411728, 0, 0, 0, 0, 0, 0, 0, -524, 0, -755, 0, 0, 0, 0, -389], [0, 0, 0, 0, -7303, 0, 0, -54, 0, 0, 0, 0, -175, 0, -665, 0], [0, 0, -663, -13038, 0, 2141, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -6384, 0, 0, -283, 0, 0, 0, 0, -1206, 0, 506, 0], [-279606, 0, 0, 0, 0, 0, 0, 0, 754, 0, -1366, 0, 0, 0, 0, -261], [0, 15124, 0, 0, 0, 0, 0, 0, 0, -316, 0, -604, 0, -684, 0, 0], [-441761, 0, 0, 0, 0, 0, 0, 0, -113, 0, 1711, 0, 0, 0, 0, -371], [0, -1752, 0, 0, 0, 0, 0, 0, 0, 2186, 0, -242, 0, -187, 0, 0], [0, 0, 0, 0, 3454, 0, 0, -1300, 0, 0, 0, 0, -288, 0, -182, 0], [0, 21595, 0, 0, 0, 0, 0, 0, 0, -782, 0, 541, 0, 50, 0, 0], [0, -13980, 0, 0, 0, 0, 0, 0, 0, 1920, 0, -391, 0, 178, 0, 0], [0, 0, 0, 0, 6999, 0, 0, -328, 0, 0, 0, 0, 1190, 0, 65, 0], [0, 3284, 0, 0, 0, 0, 0, 0, 0, 786, 0, 720, 0, 253, 0, 0], [0, 0, 0, 0, -1686, 0, 0, 845, 0, 0, 0, 0, -321, 0, 250, 0], [0, 0, -248, -7921, 0, 1332, 1266, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-302974, 0, 0, 0, 0, 0, 0, 0, 1044, 0, 1804, 0, 0, 0, 0, -479], [0, 0, -2085, 6406, 0, 819, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-51426, 0, 0, 0, 0, 0, 0, 0, 1340, 0, 960, 0, 0, 0, 0, -643], [0, -3881, 0, 0, 0, 0, 0, 0, 0, 201, 0, -752, 0, -730, 0, 0], [0, 0, 0, 0, 626, 0, 0, 208, 0, 0, 0, 0, -1552, 0, -694, 0], [0, 0, -21598, -2238, 0, -1304, -802, 0, 0, 0, 0, 0, 0, 0, 0, 0], [744754, 0, 0, 0, 0, 0, 0, 0, 862, 0, -998, 0, 0, 0, 0, -571], [0, 14361, 0, 0, 0, 0, 0, 0, 0, 731, 0, -474, 0, 314, 0, 0], [0, 0, 0, 0, -1553, 0, 0, -1492, 0, 0, 0, 0, 306, 0, 1053, 0], [0, 0, 3935, -2100, 0, -5269, -1191, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -1327, 0, 0, -474, 0, 0, 0, 0, -302, 0, 377, 0], [0, 0, -33664, 4737, 0, 2324, -822, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -5188, 0, 0, 359, 0, 0, 0, 0, 1392, 0, 734, 0], [0, 9406, 0, 0, 0, 0, 0, 0, 0, -2414, 0, 692, 0, -214, 0, 0], [432437, 0, 0, 0, 0, 0, 0, 0, -380, 0, 2632, 0, 0, 0, 0, -709], [0, 2723, 0, 0, 0, 0, 0, 0, 0, 330, 0, 111, 0, -279, 0, 0], [0, 0, 27197, -10496, 0, 5202, -1196, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -30746, 0, 0, 0, 0, 0, 0, 0, -1006, 0, -194, 0, -84, 0, 0], [0, 0, 0, 0, -10386, 0, 0, -131, 0, 0, 0, 0, -1799, 0, 1886, 0], [0, 0, -5799, -6378, 0, 5869, 1030, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -10234, 0, 0, 0, 0, 0, 0, 0, -462, 0, 333, 0, 478, 0, 0], [0, 0, 2464, -2079, 0, -810, 2022, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -4555, 0, 0, -358, 0, 0, 0, 0, 135, 0, 1510, 0], [-65790, 0, 0, 0, 0, 0, 0, 0, 2066, 0, 1441, 0, 0, 0, 0, -354]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_864_e_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_864_5_e_g();".
// 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_864_5_e_g(:prec:=16)
    chi := MakeCharacter_864_e();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 5));
    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_864_5_e_g();".
// 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_864_5_e_g( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_864_e();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,5,sign)));
    Vf := Kernel([<5,R![28027891777, 0, 461728148, 0, 1736358, 0, 2324, 0, 1]>,<7,R![6943209056737, 0, -39170019316, 0, 33494406, 0, -10036, 0, 1]>],Snew);
    return Vf;
end function;