
// Make newform 1148.2.n.c in Magma, downloaded from the LMFDB on 16 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1148_n();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1148_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_1148_2_n_c();".
// 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_1148_2_n_c();".
// 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 := [1, 76, 2189, -2186, 4032, -2800, 2755, -1675, 1058, -367, 269, -91, 49, -19, 12, -3, 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], [-37604091962631649632244, -1122536262414136465777839, -770685121920395044641092, -52818197762278676124986, -769812163220469704027673, 315107768605336503658471, -382744590680244763843441, 32152675260990418049368, -104087965543022390202133, 17762544006117153746885, -16673753187579169611905, 3121464387555847093535, -5057398534594904646535, 765214320927420205186, -477186355399061442124, -48178164327148691955], [3311830514591337987223063, 13236645784802464419326, 405412769530229125089080, 752956752555178705056390, -574205169774850952128706, 1401576743317291664686349, -620856404530228358037790, 457238656508711204264194, -160883655146463447542560, 123977762482704451640412, -35372137859957990765351, 22543724273443078345130, -9077548044609052323300, 5989726839536483627452, -1512541918523234823556, 448273133278566247238], [-2543394590033437790203327, -1984477621821553369727, -85147439206521854413139, -1254345565286042317243552, 1512433091691958880061932, -2436903629033132203150689, 1303478668639530034900799, -812586653437493849092845, 360824293776248463431482, -216182194518223629105857, 66396395971994103695427, -39637639408281057071680, 19482741001314285643405, -10777299818076872659333, 2922835546494050406323, -691677515754976523241], [21571003979255052244985, 1663380747799736472784740, -3167035634109794878534042, 4073557016193011560685656, -3639515347237117350511823, 3256626744011737401759081, -2091764410921831565098331, 1018113992051629604716702, -499814358394475775588689, 272679070929387063463333, -105940512854774931832572, 50090496469881220529233, -25433869386472644534793, 11985047556174877420365, -3427439564944663107690, 770766983612407585392], [36412528111611310310792, 1710250874261042241737390, -1784689021017620979893686, 4249421050539653617008974, -2436934175046581544193018, 2444653255425595274915934, -1536002027037989593211596, 992165676210146805271206, -317967910824103671981754, 252708116291651418225654, -84617092017357923338096, 45483273950231995670378, -16781117246854820564288, 11202890052521703381407, -2781063583875571350656, 992392863041497548098], [-23984445376352502165880, 50385963344699104242806207, -51227771714844555768222866, 90613803391593488002291343, -63655437885925883687717081, 61519880373769500500032006, -37149545657303842115066577, 23321936568446321050782819, -8189237531315991237372828, 5908540583274383985733537, -2013051858582090974822868, 1082413064369970204539058, -421834123162020870075080, 262279487316005290047510, -65483778921377564320347, 21571003979255052244985], [1750661060789895643673550, 50438922471644610992929857, -49635927440397642584032950, 92211442500640444898165116, -64232055644751902009208276, 62883892165612300973577229, -38121096756291773255178103, 24160555246458713990695148, -8356070804342687196373173, 6127780413993918170254124, -2072879430687154010311087, 1118961177288517106079383, -432505731957958193596075, 273320003588974729112154, -68114255775724233428560, 22762567830275391566437], [1057101262221417341882802, 81491713057334779250217374, -83847207502521977956400286, 149252247521063384717306362, -104399731967937264145133534, 101852516974527149499443556, -61983150263159091575847806, 38842422652908869980799690, -13616105933253002302286318, 9879587154040800396941144, -3359023332106861233952450, 1800994994715809025793096, -703040924173136599286455, 439731400923211295080160, -110229977197875428480474, 36412528111611310310792], [-54957208433357394522853, 116937654016600649442467379, -117355378752221590593001179, 208400026900270914288618007, -146057070409967860156519639, 141961402155353446997491127, -86202331996552868233088880, 54029466815154570194034355, -18976883480570911518375660, 13732496957722901213192919, -4670880045790741210065862, 2503939676188689684200631, -978187190001872863268032, 610650172361290276693352, -153022373941326399471359, 50464608876899524776768], [-5250990789506645433472552, -151277758085454290475444915, 149369879424129723643147982, -277019009279512427354743890, 192448073907499370524546990, -188993442338306514511213069, 114652679351129050235628365, -72607921757932660771937998, 25125998385915819189735997, -18429581511893880438932584, 6232883855927973453145969, -3362574190384969671776971, 1300661172212675964974649, -822034357917857820186036, 205048591631148967481449, -68483818496075095992949], [-2451708634506897180581808, -189002707049178903129762867, 195721044453551078896236510, -348329692280883837766444321, 245242997522638395843821700, -238729466691906098870027347, 145452711717574087206756763, -90718548900363214519146938, 32036182819591818833878905, -23074579980017432740505183, 7867996816633917651798412, -4210030391385674740778786, 1654095951480456458094796, -1027296735343530437657844, 258147185960475164397760, -84624843314501624262178], [4025578405843773216120461, 189155600328018408873803149, -191191559623801835806192103, 349845626359338300061464862, -242752693710312824692138237, 237858036170203319774612132, -144820353571319950293037047, 91220562904582059902781766, -31693714408485555403947779, 23189923761796556345751458, -7863011305649698757644382, 4225793708040688514193771, -1639972138892209578246211, 1033006095887048661027371, -258393934287281765223435, 86026924992664105959758], [3156462262531895767582599, 243331897003901235400249945, -251827597079016311186391687, 447580878528843512095595768, -314401777076002328241719407, 306369524412167590625173815, -186505213173361116699430153, 116553216274568092741844566, -41030164247329379010465889, 29658732416760136836061111, -10098393417158000710351826, 5407592206667076302238143, -2117775524659027621829870, 1319976360273287059279438, -331336307574695377198456, 109015958455404840969670], [-5205353413253994311232723, -244597009266065570076778265, 246789917863553018048269458, -451067520882397952942673275, 313963224642022063223489075, -308168218505987473807552114, 187730940382281513643873875, -118242394279392739902569326, 41146175095449392404488023, -30079538078872281552635368, 10191209960298123385329122, -5476828605557021940438363, 2128814684634348519577325, -1341526454890705302022067, 335845518403840306370400, -111697137273787508545218]];
    Rf_basisdens := [1, 1, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527, 1096372041641796581449527];
    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_1148_n();"
function MakeCharacter_1148_n()
    N := 1148;
    order := 5;
    char_gens := [575, 493, 785];
    v := [5, 5, 3];
    // 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_1148_n_Hecke();"
function MakeCharacter_1148_n_Hecke(Kf)
    N := 1148;
    order := 5;
    char_gens := [575, 493, 785];
    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 := 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, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -1, -1, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, -2, -1, -1, 0, -1, 0, 0, 0, 0, 0, 0, 1, 0, 1], [-2, -1, 0, 0, 0, 1, 0, -2, 2, 2, 0, 1, 0, 0, -1, -1], [0, 0, 0, 0, -2, 0, 0, 0, -1, 0, 1, -1, 1, 2, 0, 0], [2, 1, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, 2, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, -1], [-1, 0, 1, 2, 1, 0, -1, -3, 0, 1, -1, 1, -1, 0, -2, -1], [0, 1, 0, 0, 1, -1, 0, 3, 1, -3, -1, -2, -1, -1, 0, 0], [-1, -1, 6, 3, 1, 0, 3, 2, 0, 1, 0, 3, -1, 0, -3, -3], [2, -1, -2, -1, -1, 0, 0, -1, 0, 0, 1, -2, 3, 0, 2, 0], [1, 1, -4, 0, 0, 3, -1, 1, 1, 1, 0, -1, 0, 2, 1, 2], [-4, 2, -1, 0, 2, -1, 1, -4, 5, 5, -2, -2, 0, -3, 2, 1], [-3, -1, 2, 2, 2, 0, 0, -4, 0, 3, 3, 2, -2, 0, -2, -2], [3, 0, 2, 0, 1, -2, -1, 3, -3, -3, -1, 0, 0, 0, 0, 3], [-3, 1, 2, 2, 0, 1, 1, 0, 3, 1, 4, 2, 1, 4, -2, 0], [-3, 3, 4, 3, 3, 0, 1, -1, 0, 3, -2, 0, -3, 0, -3, 0], [0, -1, -2, 1, 1, 1, 1, -1, -1, 1, -1, 3, -1, -1, 0, -1], [6, -2, 0, 1, 1, 1, -1, 1, -1, 0, 0, 0, 2, 2, -2, -2], [4, -4, -3, 0, 1, 1, -1, 1, -1, 0, 0, 0, 1, 1, -1, -1], [-3, 0, -2, 0, -1, -1, 1, 1, -1, 0, 0, 0, 1, 1, 2, 2], [4, 2, 0, 0, 0, 0, 2, 0, -4, -1, 3, 0, 3, 3, 4, 0], [-3, -4, 5, 4, 1, 0, 1, -5, 0, 3, 4, 4, -1, 0, -4, -4], [0, -1, 1, 1, 0, -2, -1, 0, 0, -4, -2, 1, -2, -2, 0, 0], [4, 3, -2, -2, 0, -4, 3, 0, -4, -1, 1, -2, 3, 1, 6, 0], [2, 1, -1, -1, 0, 0, 1, 0, -2, -6, 1, -1, -4, 1, 1, 0], [-3, 4, 5, 3, 0, -3, 3, -5, 5, 0, 0, 0, -3, -3, -1, -1], [0, -3, -3, 1, -2, 3, 1, 0, 6, 0, 0, 4, 0, 2, 0, -1], [1, -5, 2, 3, -1, 0, -1, 0, 0, -1, 0, 4, 1, 0, -3, -4], [0, 3, -1, 1, 6, -3, 1, -4, -4, 4, -2, 1, -2, -6, 0, -1], [5, -2, -3, -4, -5, 3, -3, 1, -1, 0, 0, 0, -1, -1, 1, 1], [-6, 1, -2, -2, 0, -3, 1, 0, 6, 2, -2, -2, -2, -2, 2, 0], [-5, -1, 7, 4, -3, 0, 3, -6, 0, 5, 2, 3, 3, 0, -4, -3], [-7, -1, 0, 0, 2, 1, -1, -7, 2, 2, -2, 1, 0, -2, -1, -1], [-3, -1, 2, 2, 0, 2, -1, 0, 3, 8, 3, 2, -4, 3, -5, 0], [-5, 0, 1, -4, 1, 3, -3, 2, -2, 0, 0, 0, 1, 1, -1, -1], [5, 6, 4, -2, 2, -3, 3, 6, -6, 0, 0, 0, 1, 1, 2, 2], [-5, -4, -3, 0, -2, 1, -1, -4, 4, 0, 0, 0, -3, -3, -1, -1], [3, -7, 0, -1, -3, 0, 1, 5, 0, -3, -2, 2, 3, 0, 1, -2], [0, -1, -1, 3, -1, 1, 3, 3, 2, -3, 2, 2, 2, 1, 0, -3], [-1, -1, -3, -3, 2, 3, -3, -1, 1, 0, 0, 0, 0, 0, 2, 2], [1, 5, 4, 3, 3, 0, 1, 5, 0, -1, 0, -1, -3, 0, -3, 1], [0, -4, -11, -6, -5, 4, -6, -1, 5, 1, -1, 0, -1, 5, 0, 6], [3, 2, -1, 0, -3, -1, -5, 3, -4, -4, 3, -2, 0, 1, 2, 1], [5, 0, 6, 0, 2, -6, 2, 5, 1, 1, -2, 0, 0, -2, 0, -2], [0, 3, -2, 0, 4, -1, -1, 0, 0, 0, -4, -3, 0, -4, 3, 2], [1, -5, 5, 5, 0, 4, -5, 0, -1, -6, -1, 5, -6, -1, -7, 0], [0, -2, -6, -1, 7, 2, -1, -5, 5, 5, 1, -4, 1, -7, 0, 1], [1, 0, 2, 0, 4, -2, 2, 1, -1, -1, -4, 0, 0, -6, 0, -1], [5, 3, 5, 5, 0, 0, 3, 0, -5, -13, -1, 5, -6, -1, -1, 0], [-2, -2, 10, 4, 3, 0, 6, -1, 0, 2, 1, 4, -3, 0, -4, -4], [0, -1, -8, -8, -7, 0, 0, 3, 0, 0, 3, -4, 7, 0, 8, 4], [0, -3, 0, -3, -5, 3, -3, 5, -1, -5, 3, 0, 3, 5, 0, 3], [0, 0, -7, -4, -3, 0, -4, -6, 11, 6, 3, -4, 3, 3, 0, 4], [-12, -1, -8, 0, -4, 9, -3, -12, 3, 3, 4, 1, 0, 1, -1, 8], [11, 1, -3, -3, 0, -5, 1, 0, -11, -8, -1, -3, 2, -1, 2, 0], [0, -5, -9, -2, 5, 5, -2, -2, 2, 2, -6, -6, -6, -5, 0, 2], [1, 2, -2, 0, -2, 0, -3, 1, -1, -1, 2, -2, 0, 3, 2, 8], [-7, 1, 7, 3, 7, 0, 4, -3, 0, 7, -2, 2, -7, 0, -3, -2], [0, 1, 2, 0, 4, -3, 4, 0, -1, -1, -4, -1, 0, -5, 1, -4], [7, -4, 0, 0, 0, -5, -4, 0, -7, -1, 0, 0, 1, 0, -4, 0], [0, 8, -1, 1, -2, -8, 1, 0, -6, 0, 2, -2, 2, 2, 0, -1], [-6, 4, -6, -5, 3, 0, -1, -5, 0, 6, -1, -5, -3, 0, 5, 5], [0, 0, 3, -2, -7, 0, -2, -1, -4, 1, 1, 3, 1, 7, 0, 2], [16, -4, -7, -5, 4, 5, -5, 6, -6, 0, 0, 0, 1, 1, 3, 3], [-5, -2, 1, 3, -8, -4, 4, 2, -2, 0, 0, 0, 0, 0, -3, -3], [-6, 0, 1, 1, 0, -5, 0, 0, 6, -8, 5, 1, -8, 5, -4, 0], [-3, 1, 5, 5, 0, 3, 1, 0, 3, 2, -1, 5, -4, -1, -5, 0], [12, -2, 4, 4, 0, 3, -2, 0, -12, -9, 1, 4, 1, 1, -2, 0], [0, 2, 2, 4, 6, -2, 4, -4, -2, 4, -2, 0, -2, -6, 0, -4], [-15, -6, -4, 0, -3, 10, -4, -15, 6, 6, 3, 6, 0, 7, -6, 3], [-8, -1, 4, 5, -3, 0, -1, -6, 0, 8, 0, 4, 3, 0, -5, -4], [0, -5, 2, 2, -4, 5, 2, -12, 12, 12, 1, 4, 1, 4, 0, -2], [8, 0, 2, 0, 4, 2, -2, 4, -4, 0, 0, 0, -2, -2, -2, -2], [-5, 2, -2, -2, 0, -8, 2, 0, 5, -9, -10, -2, -2, -10, 2, 0], [-2, 2, -5, 0, -6, 3, -6, -2, 1, 1, 6, -2, 0, 13, 2, 5], [-12, -5, -4, -3, 11, 4, -4, -12, 12, 0, 0, 0, -7, -7, -1, -1], [1, -1, 2, 7, 5, 5, -5, 3, -3, 0, 0, 0, -1, -1, -3, -3], [8, 7, 3, 4, 3, 3, -3, 19, -19, 0, 0, 0, 4, 4, 4, 4], [0, -7, -1, -2, -7, 7, -2, -11, 6, 11, 6, 4, 6, 7, 0, 2], [-14, 1, 3, 3, 0, 1, 1, 0, 14, 4, 0, 3, -2, 0, -4, 0], [-7, -3, -7, 0, 5, 10, -4, -7, 0, 0, -5, 3, 0, -1, -3, -6], [-8, -9, -5, 0, 3, 0, -5, -3, 0, 8, -1, 2, -3, 0, 0, -2], [0, 4, 14, 5, 9, -4, 5, -5, -7, 5, 2, 5, 2, -9, 0, -5], [-9, 2, -5, 0, 3, 3, 1, -9, 12, 12, -3, -2, 0, 6, 2, -1], [-14, 1, -1, 0, -3, 0, -4, -14, 17, 17, 3, -1, 0, 4, 1, 5], [0, 5, 3, -5, 8, -5, -5, 6, 2, -6, -8, -9, -8, -8, 0, 5], [10, 4, 4, 7, 1, 0, -3, 15, 0, -10, -3, 0, -1, 0, -7, 0], [5, -5, -2, -2, 0, -2, -5, 0, -5, -6, 5, -2, -6, 5, -7, 0], [4, 0, 2, 0, -4, -2, 10, 4, 0, 0, 4, 0, 0, 6, 0, -1], [14, 2, 3, 6, 3, 0, -3, 12, 0, -14, -7, 1, -3, 0, -6, -1], [-19, 4, 8, 1, 3, 2, -2, -7, 7, 0, 0, 0, -4, -4, -4, -4], [-3, 3, 5, 5, 0, -4, 3, 0, 3, -6, -1, 5, 0, -1, -9, 0], [0, 9, 10, 4, 8, -9, 4, 4, -2, -4, -2, -10, -2, -8, 0, -4], [0, 3, -3, -6, -5, -3, -6, -5, 7, 5, 3, -4, 3, 5, 0, 6], [-15, -6, 3, 2, 3, 0, 1, 5, 0, 15, -6, 2, -3, 0, -2, -2], [0, -8, -2, 0, -3, 8, 0, 7, 1, -7, 1, 0, 1, 3, 0, 0], [0, -2, 4, 0, -10, 2, 0, 0, -2, 0, 4, -4, 4, 10, 0, 0], [-2, -4, 2, 4, 4, 1, -1, -6, 6, 0, 0, 0, -7, -7, -6, -6], [0, 3, -4, 2, 16, -3, 2, -7, 4, 7, -5, -3, -5, -16, 0, -2], [0, 4, 3, -1, 1, -4, -1, -5, 2, 5, -6, -7, -6, -1, 0, 1], [7, 5, -11, -6, 9, 0, -5, 4, 0, -7, -6, -7, -9, 0, 6, 7], [11, -1, 0, -1, 5, 4, -4, 1, -1, 0, 0, 0, 5, 5, -1, -1], [3, -5, -1, -6, 8, 3, -3, 2, -2, 0, 0, 0, -5, -5, -4, -4], [11, 2, -8, 0, 1, 6, 2, 11, -8, -8, -1, -2, 0, 1, 2, 6], [-3, -1, -5, -5, 0, 8, -1, 0, 3, 1, 2, -5, -1, 2, 0, 0], [19, 3, 6, 6, 0, 7, 3, 0, -19, -3, 0, 6, 4, 0, -1, 0], [14, 6, 12, 2, 4, -8, 8, 2, -2, 0, 0, 0, 4, 4, -6, -6], [0, -5, 3, 0, -10, 5, 0, -2, -7, 2, 7, 1, 7, 10, 0, 0], [-6, -1, -1, 0, 1, 2, 10, -6, 11, 11, -1, 1, 0, -10, -1, -11], [-5, -8, 10, 0, -8, -2, 4, -5, 4, 4, 8, 8, 0, 10, -8, -1], [-11, 8, -3, -4, -2, 0, 1, -6, 0, 11, 5, 1, 2, 0, 4, -1], [-4, 4, 2, 2, 0, -3, 4, 0, 4, 17, -1, 2, 0, -1, -1, 0], [-4, 2, 0, -7, -5, 0, 7, -9, 0, 4, 1, 2, 5, 0, 7, -2], [17, 3, -13, 0, 1, 10, -8, 17, -7, -7, -1, -3, 0, 6, 3, 10], [7, -1, 6, 1, -4, 2, -2, -4, 4, 0, 0, 0, -5, -5, -7, -7], [-8, -6, -11, -8, 1, 4, -4, -4, 4, 0, 0, 0, -2, -2, 5, 5], [0, 0, -1, 2, -9, -5, 5, -11, 11, 0, 0, 0, 5, 5, 1, 1], [2, 4, -1, 1, -2, 0, -2, 0, 0, -2, -4, -2, 2, 0, -1, 2], [0, 2, -8, -2, -6, -2, -2, -2, -11, 2, 4, 5, 4, 6, 0, 2], [-7, -2, 9, 9, 0, 4, -2, 0, 7, 0, 1, 9, -8, 1, -6, 0], [1, 1, -2, 0, -8, 1, -1, -16, 16, 0, 0, 0, 0, 0, 3, 3], [0, 4, 0, 0, 8, -4, -3, 0, 6, 6, -8, -4, 0, -6, 4, -6], [-11, 7, 17, 14, 1, 0, 3, -18, 0, 11, 0, 10, -1, 0, -14, -10], [13, -8, -12, 2, 0, 0, -14, 7, 0, -13, 2, -1, 0, 0, -2, 1], [-2, -7, -2, -2, 0, 2, -7, 0, 2, -7, -3, -2, -1, -3, -10, 0], [0, 13, 20, 9, 4, -13, 9, 6, -12, -6, -4, 4, -4, -4, 0, -9], [-1, -6, 8, 0, -8, 0, 8, 14, 0, 1, -7, -2, 8, 0, 0, 2], [22, -5, -12, -6, 4, 5, -5, 2, -2, 0, 0, 0, 4, 4, 7, 7], [-3, 11, -4, -1, -1, 0, -3, -1, 0, 3, 4, -7, 1, 0, 1, 7], [0, 0, 2, 0, 4, -2, 11, 0, 0, 0, -4, 0, 0, -3, 0, -7], [1, -7, 5, 5, 0, 9, -7, 0, -1, 0, 3, 5, -5, 3, -9, 0], [8, -2, 2, 0, 2, 0, 4, 8, -12, -12, -2, 2, 0, 6, -2, -2], [0, -5, 4, 0, 1, 5, 0, -9, 16, 9, 4, 13, 4, -1, 0, 0], [10, -6, 7, 0, -8, -1, 0, 10, -2, -2, 8, 6, 0, 12, -6, -11], [0, -12, -14, -5, -2, 12, -5, 8, -1, -8, 5, -7, 5, 2, 0, 5], [20, -2, 2, 0, -2, 0, -4, 20, -27, -27, 2, 2, 0, 13, -2, 1], [0, 13, 20, 5, 3, -13, 5, 11, -11, -11, 5, 6, 5, -3, 0, -5], [-8, -5, -5, -1, 10, -2, 2, -12, 12, 0, 0, 0, -4, -4, 0, 0], [9, 17, 11, -2, 1, -2, 2, 10, -10, 0, 0, 0, 1, 1, 6, 6], [6, -9, -3, -2, 3, 6, -6, -6, 6, 0, 0, 0, -3, -3, -6, -6], [-6, 8, 2, 2, 0, 4, 8, 0, 6, -4, 0, 2, -8, 0, -8, 0], [3, 11, 8, -7, 0, -10, 10, 10, -10, 0, 0, 0, 5, 5, 3, 3], [-5, 3, -2, -2, 0, -17, 3, 0, 5, -7, -12, -2, -5, -12, 0, 0], [0, -3, -17, -4, 3, 3, -4, -1, 18, 1, -8, -1, -8, -3, 0, 4], [12, -6, -17, -6, -4, 0, -11, 22, 0, -12, -4, -6, 4, 0, 6, 6], [-6, -1, 4, 0, 4, -3, 3, -6, -3, -3, -4, 1, 0, -7, -1, -5], [21, -7, 12, 0, -4, -5, 3, 21, -14, -14, 4, 7, 0, 12, -7, -6], [-4, -6, 8, 8, 0, 5, -6, 0, 4, 0, 2, 8, -9, 2, -12, 0], [6, -6, -8, -8, 0, -4, -6, 0, -6, 1, -5, -8, 1, -5, 9, 0], [1, 3, -2, -2, 0, 0, 3, 0, -1, -15, -2, -2, -7, -2, 15, 0], [8, 7, -3, -3, -4, 0, 0, -6, 0, -8, -4, 0, 4, 0, 3, 0], [-12, -6, 5, 11, 0, 0, -6, -2, 0, 12, -8, 9, 0, 0, -11, -9], [8, -14, -9, 0, 7, 10, -10, 3, -3, 0, 0, 0, -4, -4, -5, -5], [0, -5, -3, -9, 0, 5, -9, -4, 19, 4, 0, -10, 0, 0, 0, 9], [-12, 4, 4, 1, -12, -9, 9, -8, 8, 0, 0, 0, -4, -4, 0, 0], [2, -2, -2, 0, -4, 4, 3, 2, 2, 2, 4, 2, 0, 6, -2, 11], [5, -7, -3, 0, 1, 10, -8, 5, 0, 0, -1, 7, 0, 5, -7, 3], [12, -9, -15, -12, -7, 0, -3, -14, 0, -12, -10, -8, 7, 0, 12, 8], [0, 4, 18, 4, 10, -4, 4, -4, -6, 4, 0, 10, 0, -10, 0, -4], [0, 1, -8, -8, -6, -1, -8, 5, -7, -5, 3, -11, 3, 6, 0, 8], [-8, 3, -9, 0, 4, 6, -8, -8, 24, 24, -4, -3, 0, -6, 3, 2], [-8, 3, -4, -4, 0, -3, 3, 0, 8, 9, -18, -4, -6, -18, 7, 0], [-22, 6, 0, -14, -9, -7, 7, -1, 1, 0, 0, 0, -6, -6, 6, 6], [4, -4, -5, -5, 0, -3, -4, 0, -4, -9, -6, -5, 5, -6, -1, 0], [6, 1, 9, 0, 4, -10, 9, 6, -14, -14, -4, -1, 0, -2, 1, -2], [-3, -3, -9, -9, 0, 3, -3, 0, 3, 2, -5, -9, -5, -5, 7, 0], [-1, -2, -21, -14, 0, 0, -7, -6, 0, 1, -1, -8, 0, 0, 14, 8], [6, 3, 4, 0, 8, -7, -3, 6, -9, -9, -8, -3, 0, -8, 3, 8], [-4, -4, -24, -7, -2, 0, -17, 10, 0, 4, -4, -6, 2, 0, 7, 6], [-12, -1, 12, 0, -8, -11, -6, -12, 6, 6, 8, 1, 0, -3, -1, -7], [0, -11, -4, -4, -2, 11, -4, 8, -24, -8, 3, 4, 3, 2, 0, 4], [-4, 1, 10, 2, -6, 4, -4, 4, -4, 0, 0, 0, 10, 10, -9, -9], [0, -2, 7, 6, -12, 2, 6, -6, 7, 6, 3, 12, 3, 12, 0, -6], [2, 12, -17, -15, -4, 0, -2, 19, 0, -2, -8, -8, 4, 0, 15, 8], [20, 6, -5, -2, 11, 0, -3, 10, 0, -20, -9, -8, -11, 0, 2, 8], [-1, 10, 8, 7, 6, -14, 14, 12, -12, 0, 0, 0, -11, -11, 2, 2], [20, 2, -3, -1, -14, -2, 2, 2, -2, 0, 0, 0, 4, 4, 5, 5], [3, 0, 1, 1, 0, 1, 0, 0, -3, 8, -2, 1, -15, -2, -1, 0], [27, -1, -2, -2, 0, 6, -1, 0, -27, -24, 5, -2, 8, 5, 2, 0], [11, 4, 1, 1, 4, -8, 8, -24, 24, 0, 0, 0, -6, -6, 3, 3], [0, -5, -9, 1, 5, 5, 1, 9, -14, -9, -8, 2, -8, -5, 0, -1], [-3, -1, -6, -4, 4, 0, -2, -12, 0, 3, -11, -6, -4, 0, 4, 6], [-5, -10, -6, 0, -1, 16, -1, -5, 14, 14, 1, 10, 0, 5, -10, -8], [0, 5, 7, -5, -2, -5, -5, 22, 9, -22, -2, 3, -2, 2, 0, 5], [-7, 2, 1, 1, 0, -6, 2, 0, 7, 12, -9, 1, -4, -9, 10, 0], [0, -21, 0, 0, 0, 7, -21, 0, 0, -14, -1, 0, -13, -1, -10, 0], [3, -5, -4, 0, -7, 2, -2, 23, -23, 0, 0, 0, 5, 5, -1, -1], [11, -2, 2, 1, -8, 0, 1, -18, 0, -11, 1, 10, 8, 0, -1, -10], [-11, 9, 1, -4, -13, 0, 5, 13, 0, 11, 14, 1, 13, 0, 4, -1], [-18, -3, -1, 0, -9, 4, -13, -18, -1, -1, 9, 3, 0, 11, -3, 11], [0, 8, -8, -1, -12, -8, -1, 8, -20, -8, 6, -7, 6, 12, 0, 1], [-12, 0, -6, 0, -10, 6, -5, -12, 13, 13, 10, 0, 0, 9, 0, 4], [5, -6, -17, -6, 3, 0, -11, -19, 0, -5, -6, 3, -3, 0, 6, -3], [-11, 4, 5, -9, -6, 0, 14, -12, 0, 11, 16, 2, 6, 0, 9, -2], [0, -12, -10, -3, -19, 12, -3, 4, 23, -4, 0, 13, 0, 19, 0, 3], [32, 6, 2, 0, 10, -8, 8, 32, -15, -15, -10, -6, 0, -17, 6, 4], [3, -3, 19, 19, 0, 19, -3, 0, -3, 3, 10, 19, -1, 10, -15, 0], [-28, -1, 6, 3, 1, -1, 1, 0, 0, 0, 0, 0, 2, 2, -7, -7], [3, 1, 7, 5, -6, 3, -3, 0, 0, 0, 0, 0, -3, -3, -6, -6], [-14, 11, 1, 1, 0, -3, 11, 0, 14, -1, -13, 1, -1, -13, 4, 0], [-5, -2, -8, -8, 0, 14, -2, 0, 5, -4, -5, -8, 0, -5, 1, 0], [-1, 5, 1, 3, 0, 0, -2, 22, 0, 1, 3, 3, 0, 0, -3, -3], [-17, -16, 2, 0, -3, 14, -9, -17, 11, 11, 3, 16, 0, 6, -16, 0], [0, -9, -26, -9, 2, 9, -9, 4, -19, -4, -1, -6, -1, -2, 0, 9], [-18, -3, -7, 2, -9, 0, -9, 8, 0, 18, 6, 5, 9, 0, -2, -5], [26, 16, -6, 0, 10, -10, 3, 26, -34, -34, -10, -16, 0, -11, 16, 14], [9, 10, -5, -5, 0, -6, 10, 0, -9, -17, 4, -5, -5, 4, 9, 0], [22, -4, 4, 6, 14, 0, -2, 12, 0, -22, 0, -1, -14, 0, -6, 1], [0, 1, 3, -4, 13, -1, -4, -11, -4, 11, -10, -4, -10, -13, 0, 4], [-16, 12, 13, 13, -6, -12, 12, 8, -8, 0, 0, 0, 10, 10, -1, -1], [18, -8, 8, 0, 14, 0, 8, 2, 0, -18, 2, 5, -14, 0, 0, -5], [-6, -21, 10, 10, 0, 27, -21, 0, 6, -9, 13, 10, -9, 13, -19, 0], [3, 20, 11, 0, 6, -12, 12, 12, -12, 0, 0, 0, -3, -3, 9, 9], [5, 5, 16, 8, 12, 0, 8, 27, 0, -5, 7, 9, -12, 0, -8, -9], [0, -1, -8, -7, 11, 1, -7, 3, -15, -3, -1, -16, -1, -11, 0, 7], [18, 13, 17, 16, 19, -6, 6, 15, -15, 0, 0, 0, -7, -7, -4, -4], [25, 1, 3, 3, 0, 7, 1, 0, -25, 9, 1, 3, 9, 1, -7, 0], [-8, -11, 3, 0, -13, 8, 6, -8, 4, 4, 13, 11, 0, 10, -11, -3], [2, -8, 0, 0, 8, 0, 0, 10, 0, -2, -14, 6, -8, 0, 0, -6], [-5, 0, 5, 6, 19, 0, -1, 0, 0, 5, 3, -5, -19, 0, -6, 5], [2, 14, 14, 15, 3, 0, -1, 21, 0, -2, 1, 4, -3, 0, -15, -4], [0, -11, -16, -2, 10, 11, -2, -10, 14, 10, -12, -2, -12, -10, 0, 2], [13, 10, -2, 0, -6, -8, 11, 13, -15, -15, 6, -10, 0, -1, 10, 4], [-14, 4, -6, 0, 6, 2, -4, -14, 24, 24, -6, -4, 0, -16, 4, 14], [5, -7, -4, 6, 8, 0, -10, -27, 0, -5, -5, 0, -8, 0, -6, 0], [30, -5, -5, -5, -1, 0, 0, 27, 0, -30, 1, -3, 1, 0, 5, 3], [-3, 4, -1, -1, 0, -13, 4, 0, 3, -11, 7, -1, 14, 7, 8, 0], [-17, 14, -3, 0, -1, -11, 1, -17, 3, 3, 1, -14, 0, 0, 14, 1], [0, 17, 21, 10, 3, -17, 10, 3, -20, -3, -4, 0, -4, -3, 0, -10], [8, -3, -1, -7, -4, 0, 6, 18, 0, -8, 5, 1, 4, 0, 7, -1], [-3, 0, -6, 4, -2, 0, -10, 24, 0, 3, 4, -6, 2, 0, -4, 6], [11, -1, 0, 0, 0, -10, -1, 0, -11, -28, -7, 0, -14, -7, 4, 0], [0, 20, 20, 3, 3, -20, 3, -17, 2, 17, -4, 5, -4, -3, 0, -3], [8, 7, 13, 0, 6, -20, 13, 8, -3, -3, -6, -7, 0, -9, 7, -1], [0, -2, 13, 12, 11, 2, 12, -13, 17, 13, -5, 2, -5, -11, 0, -12], [-18, 5, 0, 0, 12, -5, -8, -18, -7, -7, -12, -5, 0, -13, 5, -6], [6, 7, -16, 0, 0, 9, -11, 6, 5, 5, 0, -7, 0, 3, 7, 6], [4, -8, 2, 0, -6, 6, -8, 4, -2, -2, 6, 8, 0, 20, -8, 1], [-9, 14, 17, 20, 1, -6, 6, 11, -11, 0, 0, 0, -1, -1, -3, -3], [-17, -2, 13, -2, -1, 0, 15, -27, 0, 17, 18, 5, 1, 0, 2, -5], [3, -18, -20, -4, -4, 1, -1, 2, -2, 0, 0, 0, 1, 1, 2, 2], [33, -2, 11, 15, 8, 0, -4, 20, 0, -33, 5, 5, -8, 0, -15, -5], [-11, -11, -6, 4, -6, -1, 1, -26, 26, 0, 0, 0, -7, -7, -5, -5], [-11, -13, -13, -2, -5, 2, -2, -25, 25, 0, 0, 0, 1, 1, 0, 0], [-19, -3, 10, 0, -3, -7, 15, -19, 16, 16, 3, 3, 0, -3, -3, -13], [19, 0, 3, 3, 0, 3, 0, 0, -19, -28, 10, 3, 1, 10, 1, 0], [6, -1, 0, 0, 0, 6, -1, 0, -6, -5, 13, 0, 16, 13, -2, 0], [-38, 7, -6, 0, 2, -1, 4, -38, 26, 26, -2, -7, 0, -7, 7, 2], [14, -4, -6, 0, -2, 10, 5, 14, 6, 6, 2, 4, 0, 2, -4, -3], [0, 4, 3, 5, -6, -4, 5, 22, -28, -22, -5, 7, -5, 6, 0, -5], [0, 6, 19, 6, -26, -6, 6, 8, -16, -8, 18, 19, 18, 26, 0, -6], [23, 7, 7, 2, -7, 0, 0, 17, -17, 0, 0, 0, 5, 5, 0, 0], [21, -18, 5, 5, 0, 15, -18, 0, -21, -17, 8, 5, 7, 8, -15, 0], [4, -19, -3, -3, 0, 2, -19, 0, -4, -4, 8, -3, 21, 8, 0, 0], [5, 16, -17, 0, -1, 1, 2, 5, -5, -5, 1, -16, 0, 2, 16, 0], [28, -16, -18, 5, 9, 9, -9, 5, -5, 0, 0, 0, 4, 4, 2, 2], [0, -6, -22, -5, -8, 6, -5, -10, 21, 10, 3, 7, 3, 8, 0, 5], [-2, -7, 13, 0, 7, -6, -2, -2, -19, -19, -7, 7, 0, 2, -7, -2], [-19, -14, -15, -4, 9, 7, -7, -8, 8, 0, 0, 0, 1, 1, 1, 1], [-27, 1, 12, 10, 4, 0, 2, -4, 0, 27, 11, 12, -4, 0, -10, -12], [18, -1, -8, 2, 14, 0, -10, 6, 0, -18, -2, -13, -14, 0, -2, 13], [-23, -12, 7, 7, 0, 22, -12, 0, 23, -2, 15, 7, 2, 15, -19, 0], [14, -12, 10, 0, -4, 2, -6, 14, -23, -23, 4, 12, 0, 13, -12, -5], [8, 2, -3, 0, 3, 1, -9, 8, -2, -2, -3, -2, 0, 10, 2, 0], [-23, -3, -2, -10, 6, 0, 0, -22, 22, 0, 0, 0, -3, -3, -1, -1], [-6, 8, -2, -6, -18, -7, 7, 17, -17, 0, 0, 0, 9, 9, 10, 10], [0, 12, 2, -1, 21, -12, -1, -3, 3, 3, -16, -16, -16, -21, 0, 1], [5, -7, -14, -14, 0, 3, -7, 0, -5, -18, -3, -14, -8, -3, 11, 0], [16, 1, -10, -10, 0, -5, 1, 0, -16, -19, -19, -10, -11, -19, 14, 0], [0, -8, -10, -3, 21, 8, -3, -21, 15, 21, -5, -4, -5, -21, 0, 3], [4, -1, -10, -5, -3, 0, -5, 9, 0, -4, -24, -8, 3, 0, 5, 8], [8, -8, -10, -6, -13, -4, 4, -11, 11, 0, 0, 0, 10, 10, 2, 2], [17, 10, 4, 4, 0, -7, 10, 0, -17, -7, 6, 4, 9, 6, -4, 0], [0, 9, 35, 19, 10, -9, 19, -6, -9, 6, -4, 1, -4, -10, 0, -19], [6, -4, 31, 18, -1, 0, 13, -3, 0, -6, 9, 6, 1, 0, -18, -6], [-1, -11, -12, -2, -4, -8, 8, 2, -2, 0, 0, 0, 3, 3, 1, 1], [1, -10, 0, 0, 0, 22, -10, 0, -1, -20, 1, 0, -2, 1, 4, 0], [-2, 3, -6, -6, 0, -14, 3, 0, 2, -2, 4, -6, 14, 4, 5, 0], [18, -5, -4, -15, -5, 5, -5, 9, -9, 0, 0, 0, 4, 4, -1, -1], [-40, 5, -8, 0, -12, 3, -10, -40, 27, 27, 12, -5, 0, 11, 5, 4], [-12, -10, 9, 9, 0, 9, -10, 0, 12, -1, -3, 9, -15, -3, -31, 0], [-16, 10, -5, -5, 0, 7, 10, 0, 16, 4, -8, -5, 8, -8, 11, 0], [-9, -3, 14, 10, 4, 0, 4, 10, 0, 9, 1, 7, -4, 0, -10, -7], [15, -3, 11, 0, 5, -8, -1, 15, -8, -8, -5, 3, 0, -21, -3, 0], [17, -2, 2, 0, 14, -4, 4, 14, -14, 0, 0, 0, -8, -8, -4, -4], [5, -14, -11, -11, 0, 4, -14, 0, -5, -27, -8, -11, 13, -8, 10, 0], [21, 13, 13, 9, -14, -5, 5, 30, -30, 0, 0, 0, 7, 7, 0, 0], [-4, 5, 5, 5, 4, 0, 0, -22, 0, 4, 13, 7, -4, 0, -5, -7], [-15, -3, -1, -1, 0, 18, -3, 0, 15, 24, 5, -1, 10, 5, 1, 0], [24, -13, -5, 6, -7, 8, -8, 19, -19, 0, 0, 0, 11, 11, -8, -8], [12, -8, 15, 3, -6, 0, 12, -12, 0, -12, 4, 3, 6, 0, -3, -3], [-1, -2, 7, 0, 1, -5, 2, -1, -1, -1, -1, 2, 0, -1, -2, -10], [-3, 12, 21, 21, 0, 5, 12, 0, 3, 7, 6, 21, -11, 6, -16, 0], [0, -12, -7, -13, -10, 12, -13, 24, 5, -24, -1, 8, -1, 10, 0, 13], [-11, -12, -9, 2, 14, 0, -11, -18, 0, 11, 3, 2, -14, 0, -2, -2], [0, -18, -25, -11, -9, 18, -11, -17, 24, 17, -14, -9, -14, 9, 0, 11], [-4, 6, -5, -5, 0, -20, 6, 0, 4, -24, -6, -5, -10, -6, 10, 0], [8, -12, -4, -4, 0, -7, -12, 0, -8, 3, 1, -4, -1, 1, -7, 0], [-25, 25, 2, -4, 8, 0, 6, -29, 0, 25, 3, -9, -8, 0, 4, 9], [0, -2, 22, 4, -14, 2, 4, 7, 2, -7, 0, 15, 0, 14, 0, -4]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1148_n_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1148_2_n_c();".
// 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_1148_2_n_c(:prec:=16)
    chi := MakeCharacter_1148_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(1999) - 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_1148_2_n_c();".
// 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_1148_2_n_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1148_n();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![1, -47, -30, 57, 40, -15, -12, 1, 1]>],Snew);
    return Vf;
end function;