
// Make newform 950.2.j.i in Magma, downloaded from the LMFDB on 19 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_950_j();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_950_j_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_950_2_j_i();".
// 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_950_2_j_i();".
// 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 := [16, 80, 200, 1176, 2920, -1292, 258, -166, -495, 182, -24, 34, 67, -36, 8, -4, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-5000793621270704, 23338264882344, 65125552505168, 341175880277816, 948140298810660, 150963883461760, -20272123106222, -158301324166899, -150224876901330, 30961320250634, 2405387591342, 28177085791575, -10769326233704, 2149480076638, -1253191152168, 279227424185], [10377464251808, 45304332735480, -23978017695078704, 756816090478912, 1621043757545628, -923077071265360, 3776590780457084, 132028748158047, -276472542171762, 35829458499862, -569910800650412, 61311937532721, 35039031777188, 5455089919862, 4335535617510, -2554774305209], [-4027830549856, -17391304628760, 9097892662933528, -291791019656384, -616309906049196, 386794141646720, -1500225464318788, -53029560960579, 106263434009934, -13731014168234, 226486239183484, -25635498319497, -13267293959116, -2330828468434, -1649145399090, 997381935613], [-90197230528, 75791010936, 196338149584, -7162603244888, 2900116876956, -590795011120, -89988470689, 1180002213903, -399864503514, 66320346205, -8962973576, -169989772743, 81839364227, -20042279554, 9113657058, -2070672794], [1092234854864, 5934294177576, 16138554024592, 86716448660344, -36790030621500, 6891426699680, -1895749127518, -14492719927011, 5115617357070, -678874701974, 550070722558, 2024996088615, -1033250237896, 240112435262, -114495167832, 27445864585], [-450005598920032, 346449370868280, 14601702815636752, -35699844475117376, 13311842117065020, -2426868339941968, -2700285992025508, 5753269990031463, -1805036844483906, 314330560086838, 288288968521732, -872518973835831, 381862990208372, -101803992713434, 42313430612454, -8686137725825], [22444040275424, -17667737170920, -568865130413072, 1780650592054816, -678946120862436, 122851299785840, 108414463327772, -286864003800549, 92416778982534, -15217534809074, -10504651056956, 43227903066213, -19397985604396, 5058579031646, -2148242385810, 453854154643], [4675736035664, -67912631446744, -184670937394608, -992392514808776, 411296583843940, -77274021793920, 21635639719922, 165785687172509, -57640587207250, 7728403255866, -6290866981922, -23099923074905, 11768193355464, -2734307093218, 1305052923848, -312593461575], [1644107573550128, 2355200038235992, 6405462596584784, 34415942530333288, -14724969351287620, 2767834595485840, -751081282393786, -5735126785204397, 2065965717654250, -276657009730258, 218299036166986, 802746853240385, -410270868691352, 95432288434874, -45452419955144, 10900402862375], [538715661376464, -4722839369813144, -12845479319063408, -69013732889708616, 28946443100502980, -5604878957320480, 1509729505360722, 11536992356516389, -4052777591009810, 542276882972026, -437705517794562, -1617789871722865, 824801347929704, -191728937133858, 91435548636808, -21911472450815], [-1287332125546976, 1202570377070280, -49960138575606352, -102377588671650784, 45765148270171764, -10641557396482160, 7157630081850772, 17401151964390801, -6430588780352766, 1024417527408026, -1425992145674356, -2325280412563137, 1267628390050204, -278222669153654, 142013953594170, -35876471476807], [-1813136794190928, -3273138752262952, -8900724034061104, -47829584824712088, 20425874452495180, -3743774633723120, 1049824853870886, 8011689454391267, -2858442575885950, 367883152197278, -303771743125326, -1116036517703975, 570659988276592, -132518533985934, 63147564290984, -15156149970385], [3592742641175456, -3273329814085320, 97671412723360912, 285608850184508224, -124748926095394884, 28064740508800880, -13285502578596532, -48341286400946361, 17440498236979086, -2891302559786186, 2954873449622116, 6601197866959737, -3469684848879484, 786381536962454, -388596494728170, 95383263803887], [-4281518066231648, 3771826243988760, -63372547476611056, -340225833225284992, 143934587182818252, -31409862725090000, 7172073154641196, 56979822291703443, -20015911543649178, 3332661249014798, -2241465050143708, -7942224171410931, 4026927893654452, -941949725565842, 449995772335710, -107197556804581], [-1161652513451264, -2912122790817576, -7919054149479832, -42554153768011024, 18028410763163820, -3335896743811940, 930691079013928, 7111279378882731, -2532281570625150, 332679951349574, -270048956304808, -991211770226175, 506429630647996, -117674794077602, 56083850298582, -13452207709045]];
    Rf_basisdens := [1, 1648849543827840, 1648849543827840, 206106192978480, 104622432984, 1275212330880, 329769908765568, 13973301218880, 9315534145920, 274808257304640, 549616514609280, 824424771913920, 274808257304640, 1648849543827840, 1648849543827840, 206106192978480];
    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_950_j();"
function MakeCharacter_950_j()
    N := 950;
    order := 6;
    char_gens := [77, 401];
    v := [3, 4];
    // 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_950_j_Hecke();"
function MakeCharacter_950_j_Hecke(Kf)
    N := 950;
    order := 6;
    char_gens := [77, 401];
    char_values := [[-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, -1, 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 := 2;
    raw_aps := [[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, 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, -1, 2, 0, 1, -1, 0, 0, 0, 0, 0, -1, -1, 0], [2, 0, 0, 0, 0, -1, 0, 0, 1, -1, -1, 0, -1, 0, 0, 0], [0, 0, 3, 0, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, -1, 0, 1, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -2], [0, 0, 1, 0, 1, 0, 1, 2, 0, 0, 0, 2, 0, 1, 0, 0], [-5, 0, 0, 0, 0, -4, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0], [3, -2, 0, 0, 0, 1, 0, 0, -1, -1, -1, 0, 1, 0, 0, 0], [0, 0, 0, -3, -1, 0, 0, 0, 0, 0, 0, -1, 0, -1, -3, 0], [0, -1, 0, 0, 0, -3, 0, 0, 0, -2, 0, 0, -2, 0, 0, 1], [0, 0, 4, 0, 4, 0, 2, 1, 0, 0, 0, 1, 0, -1, -1, 0], [0, 0, -3, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0], [0, 0, -3, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0], [0, 1, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 1, 0, 0, -1], [-2, 0, 0, 0, 0, -2, 0, 0, 0, -1, 1, 0, 1, 0, 0, 1], [0, 0, -2, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0], [0, 2, 0, 0, 0, -3, 0, 0, -1, 1, -1, 0, 0, 0, 0, -2], [0, 0, 4, 0, 4, 0, 2, 0, 0, 0, 0, 2, 0, -2, -3, 0], [0, -2, 0, 0, 0, -2, 0, 0, -1, 2, -1, 0, 1, 0, 0, 2], [0, 0, -1, -1, 5, 0, -1, 1, 0, 0, 0, -1, 0, 0, -1, 0], [-5, 0, 0, 0, 0, -3, 0, 0, -2, 2, 0, 0, -2, 0, 0, 0], [0, 0, -5, 0, -5, 0, 0, 1, 0, 0, 0, -1, 0, 1, 3, 0], [-5, 0, 0, 0, 0, -8, 0, 0, 3, -2, -1, 0, 2, 0, 0, -3], [0, 0, 2, -4, -2, 0, 2, -2, 0, 0, 0, 2, 0, 0, -4, 0], [0, 0, -2, 4, -6, 0, -2, 2, 0, 0, 0, -1, 0, 1, 4, 0], [0, 2, 0, 0, 0, -7, 0, 0, 1, -3, 1, 0, -2, 0, 0, -2], [0, 0, -3, 5, -9, 0, -3, 3, 0, 0, 0, 1, 0, 4, 5, 0], [0, 0, -3, -2, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0], [0, 2, 0, 0, 0, 1, 0, 0, 3, 0, 3, 0, 3, 0, 0, -2], [0, 0, -3, 8, 1, 0, 1, 2, 0, 0, 0, 2, 0, 1, 0, 0], [0, 0, 0, 0, 0, -1, 0, 0, 1, 0, -1, 0, 0, 0, 0, 2], [0, -3, 0, 0, 0, -1, 0, 0, 2, 1, 2, 0, 3, 0, 0, 3], [-4, 2, 0, 0, 0, 1, 0, 0, -1, 4, 4, 0, 1, 0, 0, 0], [0, 0, -2, 0, -2, 0, -2, 0, 0, 0, 0, -2, 0, 2, 1, 0], [0, 0, 0, -3, -2, 0, 0, 0, 0, 0, 0, 1, 0, 1, -3, 0], [0, 0, -8, 3, 2, 0, 2, 2, 0, 0, 0, 2, 0, 2, 0, 0], [0, 0, 6, 0, 6, 0, -2, -1, 0, 0, 0, -1, 0, 1, 4, 0], [8, -2, 0, 0, 0, 0, 0, 0, 0, -4, -4, 0, 0, 0, 0, 0], [5, 0, 0, 0, 0, 8, 0, 0, -3, 4, -1, 0, -4, 0, 0, 6], [5, 0, 0, 0, 0, -1, 0, 0, 1, -1, -1, 0, -1, 0, 0, 0], [0, 0, -3, 0, -3, 0, 0, 3, 0, 0, 0, -3, 0, 3, 4, 0], [0, 0, -3, -1, -5, 0, -3, 3, 0, 0, 0, -3, 0, 0, -1, 0], [7, 0, 0, 0, 0, 6, 0, 0, 1, -2, 1, 0, 2, 0, 0, -7], [0, 0, 0, 0, 0, 3, 0, 0, -3, 2, -3, 0, -1, 0, 0, 0], [0, 0, -6, 0, -6, 0, 3, 1, 0, 0, 0, 2, 0, -2, 0, 0], [0, 0, 0, -5, 6, 0, 0, 0, 0, 0, 0, -1, 0, -1, -5, 0], [-6, -4, 0, 0, 0, -1, 0, 0, 1, -2, -2, 0, -1, 0, 0, 0], [0, 0, -9, 0, -9, 0, -4, -3, 0, 0, 0, -1, 0, 1, 6, 0], [-3, 5, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0], [-11, 0, 0, 0, 0, -13, 0, 0, 2, 1, -3, 0, -1, 0, 0, 7], [-18, 0, 0, 0, 0, -17, 0, 0, -1, 3, -2, 0, -3, 0, 0, 2], [0, 0, 10, 3, -1, 0, -1, -4, 0, 0, 0, -4, 0, -1, 0, 0], [0, 0, -4, 0, -4, 0, 0, -1, 0, 0, 0, 1, 0, -1, 2, 0], [0, 0, 0, 0, 0, -7, 0, 0, 2, -5, 2, 0, -3, 0, 0, 0], [0, 4, 0, 0, 0, 1, 0, 0, 2, -3, 2, 0, -1, 0, 0, -4], [0, 0, 2, 1, 17, 0, 2, -2, 0, 0, 0, 1, 0, -1, 1, 0], [11, 0, 0, 0, 0, 9, 0, 0, 2, -2, 0, 0, 2, 0, 0, 0], [0, 0, 3, 0, 3, 0, -5, 0, 0, 0, 0, -5, 0, 5, 4, 0], [0, 0, 3, -1, -7, 0, 3, -3, 0, 0, 0, -1, 0, -4, -1, 0], [0, 0, 12, 0, 12, 0, 4, 1, 0, 0, 0, 3, 0, -3, -8, 0], [-1, 3, 0, 0, 0, -2, 0, 0, 2, 3, 3, 0, -2, 0, 0, 0], [0, 0, -7, 6, -2, 0, -2, 0, 0, 0, 0, 0, 0, -2, 0, 0], [0, 0, 20, -3, 3, 0, 3, 1, 0, 0, 0, 1, 0, 3, 0, 0], [8, 2, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0, 2, 0, 0, 0], [0, 0, 7, 0, 7, 0, -2, 4, 0, 0, 0, -6, 0, 6, 6, 0], [0, 0, -3, 0, -3, 0, -3, 0, 0, 0, 0, -3, 0, 3, 0, 0], [-6, -2, 0, 0, 0, -1, 0, 0, 1, -6, -6, 0, -1, 0, 0, 0], [0, 0, 2, -2, 7, 0, 2, -2, 0, 0, 0, -2, 0, -4, -2, 0], [0, -1, 0, 0, 0, -5, 0, 0, -1, 3, -1, 0, 2, 0, 0, 1], [0, 0, 10, -1, -4, 0, -4, -4, 0, 0, 0, -4, 0, -4, 0, 0], [0, 0, -3, -1, 5, 0, -3, 3, 0, 0, 0, 1, 0, 4, -1, 0], [2, -1, 0, 0, 0, -2, 0, 0, 2, -3, -3, 0, -2, 0, 0, 0], [0, 0, -4, 0, -4, 0, 0, -1, 0, 0, 0, 1, 0, -1, 2, 0], [-5, 0, 0, 0, 0, -6, 0, 0, 1, 1, -2, 0, -1, 0, 0, -8], [0, 0, -2, 0, -2, 0, 5, 2, 0, 0, 0, 3, 0, -3, -1, 0], [0, 2, 0, 0, 0, 8, 0, 0, 5, -1, 5, 0, 4, 0, 0, -2], [13, 0, 0, 0, 0, 13, 0, 0, 0, 5, -5, 0, -5, 0, 0, 6], [-4, 1, 0, 0, 0, 6, 0, 0, -6, 5, 5, 0, 6, 0, 0, 0], [0, -8, 0, 0, 0, 8, 0, 0, -6, 2, -6, 0, -4, 0, 0, 8], [-7, 0, 0, 0, 0, -6, 0, 0, -1, 1, 0, 0, -1, 0, 0, -6], [0, 0, -1, 6, -2, 0, -2, 0, 0, 0, 0, 0, 0, -2, 0, 0], [0, 10, 0, 0, 0, 1, 0, 0, 3, -1, 3, 0, 2, 0, 0, -10], [0, 0, 8, 1, -2, 0, -2, -1, 0, 0, 0, -1, 0, -2, 0, 0], [2, -6, 0, 0, 0, 3, 0, 0, -3, 4, 4, 0, 3, 0, 0, 0], [0, 0, 0, -6, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, 0], [0, -2, 0, 0, 0, 27, 0, 0, 2, -1, 2, 0, 1, 0, 0, 2], [0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 0, -6, 0, -6, 1, 0], [0, 0, -5, 1, -5, 0, -5, 5, 0, 0, 0, -2, 0, 3, 1, 0], [7, 0, 0, 0, 0, 4, 0, 0, 3, 1, -4, 0, -1, 0, 0, 3], [0, 0, -1, 5, 20, 0, -1, 1, 0, 0, 0, 0, 0, 1, 5, 0], [0, 8, 0, 0, 0, -3, 0, 0, 7, -5, 7, 0, 2, 0, 0, -8], [0, -3, 0, 0, 0, 10, 0, 0, 0, 3, 0, 0, 3, 0, 0, 3], [0, 0, -7, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0], [13, 0, 0, 0, 0, 12, 0, 0, 1, 6, -7, 0, -6, 0, 0, 5], [-3, -2, 0, 0, 0, -1, 0, 0, 1, 2, 2, 0, -1, 0, 0, 0], [0, 0, 9, -3, -1, 0, -1, -7, 0, 0, 0, -7, 0, -1, 0, 0], [25, 0, 0, 0, 0, 24, 0, 0, 1, -4, 3, 0, 4, 0, 0, 2], [0, 0, 8, 1, -4, 0, -4, -9, 0, 0, 0, -9, 0, -4, 0, 0], [0, 0, -6, -1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0], [0, 0, -1, 2, 1, 0, -1, 1, 0, 0, 0, 0, 0, 1, 2, 0], [3, 2, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0], [-8, 1, 0, 0, 0, -2, 0, 0, 2, -5, -5, 0, -2, 0, 0, 0], [0, 0, 1, -6, 6, 0, 1, -1, 0, 0, 0, 1, 0, 0, -6, 0], [0, 0, 13, 0, 13, 0, -3, -4, 0, 0, 0, 1, 0, -1, -3, 0], [0, 0, 9, -10, 2, 0, 2, 2, 0, 0, 0, 2, 0, 2, 0, 0], [-1, 0, 0, 0, 0, 4, 0, 0, -5, 2, 3, 0, -2, 0, 0, 4], [10, 12, 0, 0, 0, 4, 0, 0, -4, 6, 6, 0, 4, 0, 0, 0], [0, 0, -7, 10, -20, 0, -7, 7, 0, 0, 0, 2, 0, 9, 10, 0], [0, 0, -20, 0, -20, 0, -3, 0, 0, 0, 0, -3, 0, 3, 9, 0], [0, 0, 1, -4, -2, 0, -2, -8, 0, 0, 0, -8, 0, -2, 0, 0], [-10, -3, 0, 0, 0, -2, 0, 0, 2, -2, -2, 0, -2, 0, 0, 0], [6, 0, 0, 0, 0, 2, 0, 0, 4, 1, -5, 0, -1, 0, 0, -1], [0, -11, 0, 0, 0, -1, 0, 0, -2, 0, -2, 0, -2, 0, 0, 11], [0, 0, -17, 0, -17, 0, -7, -2, 0, 0, 0, -5, 0, 5, 5, 0], [0, 0, 2, -10, -9, 0, 2, -2, 0, 0, 0, -5, 0, -7, -10, 0], [0, 0, -3, 5, 28, 0, -3, 3, 0, 0, 0, 0, 0, 3, 5, 0], [-2, 0, 0, 0, 0, -3, 0, 0, 1, -2, 1, 0, 2, 0, 0, -5], [11, 0, 0, 0, 0, 6, 0, 0, 5, 1, -6, 0, -1, 0, 0, -4], [0, 0, 4, 3, -4, 0, 4, -4, 0, 0, 0, 6, 0, 2, 3, 0], [0, 0, 9, -5, 6, 0, 9, -9, 0, 0, 0, -4, 0, -13, -5, 0], [0, 0, 0, 3, -10, 0, 0, 0, 0, 0, 0, 1, 0, 1, 3, 0], [18, -2, 0, 0, 0, 1, 0, 0, -1, -7, -7, 0, 1, 0, 0, 0], [0, 16, 0, 0, 0, -4, 0, 0, 7, 0, 7, 0, 7, 0, 0, -16], [8, 0, 0, 0, 0, 12, 0, 0, -4, 2, 2, 0, -2, 0, 0, -6], [0, -17, 0, 0, 0, 2, 0, 0, -5, 0, -5, 0, -5, 0, 0, 17], [0, 0, -6, 0, -6, 0, 6, 5, 0, 0, 0, 1, 0, -1, 6, 0], [0, 0, 0, -2, -4, 0, 0, 0, 0, 0, 0, -4, 0, -4, -2, 0], [0, -7, 0, 0, 0, 14, 0, 0, -2, 3, -2, 0, 1, 0, 0, 7], [0, 0, -8, 0, -8, 0, 0, 1, 0, 0, 0, -1, 0, 1, -2, 0], [-12, 0, 0, 0, 0, -12, 0, 0, 0, 4, -4, 0, -4, 0, 0, 10], [0, 0, -20, 0, -20, 0, -6, -3, 0, 0, 0, -3, 0, 3, -2, 0], [3, -10, 0, 0, 0, 1, 0, 0, -1, -2, -2, 0, 1, 0, 0, 0], [-1, 0, 0, 0, 0, 5, 0, 0, -6, 7, -1, 0, -7, 0, 0, 8], [0, 0, -3, -7, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0], [0, 0, -2, 7, 4, 0, -2, 2, 0, 0, 0, 5, 0, 7, 7, 0], [0, 0, -1, 5, 29, 0, -1, 1, 0, 0, 0, -1, 0, 0, 5, 0], [-5, -11, 0, 0, 0, 6, 0, 0, -6, 0, 0, 0, 6, 0, 0, 0], [-26, 0, 0, 0, 0, -28, 0, 0, 2, 0, -2, 0, 0, 0, 0, -1], [-14, 0, 0, 0, 0, -6, 0, 0, -8, 8, 0, 0, -8, 0, 0, 0], [0, 0, -26, 7, -1, 0, -1, 5, 0, 0, 0, 5, 0, -1, 0, 0], [0, 0, -5, -11, -5, 0, -5, -3, 0, 0, 0, -3, 0, -5, 0, 0], [4, -15, 0, 0, 0, -2, 0, 0, 2, -10, -10, 0, -2, 0, 0, 0], [0, -1, 0, 0, 0, 12, 0, 0, 2, 4, 2, 0, 6, 0, 0, 1], [0, 0, -8, 0, -8, 0, -4, 3, 0, 0, 0, -7, 0, 7, 9, 0], [0, 0, -21, 0, -21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [26, 0, 0, 0, 0, 26, 0, 0, 0, 4, -4, 0, -4, 0, 0, -1], [0, 0, 2, 11, 9, 0, 2, -2, 0, 0, 0, 7, 0, 5, 11, 0], [0, 0, 18, 0, 18, 0, -3, -8, 0, 0, 0, 5, 0, -5, 1, 0], [27, 1, 0, 0, 0, 3, 0, 0, -3, -2, -2, 0, 3, 0, 0, 0], [0, 0, -4, -8, 6, 0, 6, -2, 0, 0, 0, -2, 0, 6, 0, 0], [0, 0, -1, 13, 1, 0, 1, 8, 0, 0, 0, 8, 0, 1, 0, 0], [0, 0, 21, 0, 21, 0, -1, -6, 0, 0, 0, 5, 0, -5, 2, 0], [-16, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [22, -7, 0, 0, 0, -2, 0, 0, 2, -8, -8, 0, -2, 0, 0, 0], [0, -7, 0, 0, 0, -4, 0, 0, 5, -7, 5, 0, -2, 0, 0, 7], [0, 0, -17, -1, 5, 0, 5, 8, 0, 0, 0, 8, 0, 5, 0, 0], [5, 0, 0, 0, 0, 0, 0, 0, 5, -3, -2, 0, 3, 0, 0, -5], [0, 0, -18, 0, -18, 0, 2, -1, 0, 0, 0, 3, 0, -3, -8, 0], [0, 0, -17, 0, -17, 0, -6, -4, 0, 0, 0, -2, 0, 2, -9, 0], [0, 0, 4, 0, 4, 0, 5, -9, 0, 0, 0, 14, 0, -14, -11, 0], [0, -4, 0, 0, 0, 9, 0, 0, -1, 7, -1, 0, 6, 0, 0, 4], [0, 0, -5, 3, 2, 0, -5, 5, 0, 0, 0, 7, 0, 12, 3, 0], [0, 0, 6, 0, 6, 0, -10, -4, 0, 0, 0, -6, 0, 6, 4, 0], [0, -1, 0, 0, 0, -5, 0, 0, 3, -7, 3, 0, -4, 0, 0, 1], [0, 0, 19, 12, 3, 0, 3, 6, 0, 0, 0, 6, 0, 3, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_950_j_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_950_2_j_i();".
// 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_950_2_j_i(:prec:=16)
    chi := MakeCharacter_950_j();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 2));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(997) - 1;
    while true do
        trunc_vec := Vector(Kf, [0] cat [f_vec[i]: i in [1..prec]]);
        B := Basis(S, prec + 1);
        S_basismat := Matrix([AbsEltseq(g): g in B]);
        if Rank(S_basismat) eq Min(NumberOfRows(S_basismat), NumberOfColumns(S_basismat)) then
            S_basismat := ChangeRing(S_basismat,Kf);
            f_lincom := Solution(S_basismat,trunc_vec);
            f := &+[f_lincom[i]*Basis(S)[i] : i in [1..#Basis(S)]];
            return f;
        end if;
        error if prec eq maxprec, "Unable to distinguish newform within newspace";
        prec := Min(Ceiling(1.25 * prec), maxprec);
    end while;
end function;


// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_950_2_j_i();".
// 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_950_2_j_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_950_j();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![4096, 0, -20480, 0, 92096, 0, -48576, 0, 18497, 0, -3063, 0, 368, 0, -23, 0, 1]>,<7,R![11236, 0, 5240, 0, 821, 0, 50, 0, 1]>,<11,R![-117, 123, -20, -5, 1]>],Snew);
    return Vf;
end function;