
// Make newform 279.2.y.b in Magma, downloaded from the LMFDB on 12 March 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_279_y();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_279_y_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_279_2_y_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
// To make the Hecke irreducible modular symbols subspace (type ModSym)
// containing the newform, type "MakeNewformModSym_279_2_y_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function ConvertToHeckeField(input: pass_field := false, Kf := [])
    if not pass_field then
        poly := [1, 7, 24, 36, 17, -18, -52, -59, 51, 59, -52, 18, 17, -36, 24, -7, 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], [47017, 307958, 362544, -28300, -51726, -784648, -465255, 1191042, -264044, -326810, 578461, -454832, 124275, 27208, -19456, 4069], [3961979, 8912725, 4491964, 6109937, -14970635, -7837073, 10887326, -19638555, 23412501, 2877363, -21642040, 25208438, -18950566, 8820835, -2206991, 281230], [-6297446, -22331534, -17005345, 7833461, 12340018, 78462050, -37133302, -95934551, 96710145, -19539541, -50479493, 75994945, -52884723, 20135556, -4245520, 414244], [-4047292, -14085389, -4453091, 9065548, 8541943, 50502757, -45515796, -56655261, 81629991, -30176573, -24842953, 51732233, -41291889, 17503636, -4006616, 438059], [7548029, 39166106, 57539168, 49764230, -55636157, -89714156, -55725120, -3174056, 155734132, -56698200, -51982673, 111579296, -113668840, 61500181, -16532307, 2218133], [3523920, 1799020, -20106841, -14113278, -13352090, 8589932, 84169151, -39308870, -55583769, 58661873, -29039545, -7519577, 25334664, -16700930, 4783229, -658973], [-63757429, -196972311, -177826048, -105488095, 122779017, 558562391, 73448475, -512842889, 66524423, 105995940, -172288862, 115751194, 21687685, -55347436, 20695527, -3520873], [-6770211, 52930931, 108471483, 49261625, 94151293, -184426786, -366012435, 249203994, 236868692, -243732570, 104005952, 64974376, -150119825, 97933481, -28151292, 3931773], [479843, 66636487, 141852056, 53248340, 60397086, -191813277, -391700950, 289941738, 247373144, -285586830, 154639054, 26286982, -133880845, 94918812, -28055144, 4000716], [12436352, 79411998, 11449504, -138927955, -2900706, -234972418, 241691605, 445193227, -654926779, 201579995, 247774291, -452258687, 365941565, -162462327, 38673179, -4505391], [-14630136, -59872574, -122003347, -70062165, 46946728, 100421674, 287883970, -76699176, -363959278, 233794995, -4319583, -170010259, 214743570, -122783349, 33615153, -4542542], [-1270948, 67129198, 252882469, 174605030, -38734756, -60359023, -730766540, 36758727, 932353256, -598716440, 26430816, 402855243, -492497640, 272694298, -73319806, 9695294], [-7504933, -41451442, -79773457, -42050693, 12543479, 108625514, 172038376, -129838008, -143396118, 142644548, -64765484, -26659784, 78373624, -53764792, 15774893, -2250154], [-22728483, -184556292, -434162911, -265109355, 88067599, 433697737, 994313830, -480370433, -979910514, 779473470, -201542389, -337413692, 554715415, -340634242, 95918539, -13223986], [10474376, 57735178, 114761311, 69138311, -19289126, -143103317, -260489582, 161307717, 241293519, -215886021, 80298206, 61829267, -131493548, 85480923, -24597524, 3452553]];
    Rf_basisdens := [1, 42775, 2917255, 2917255, 2917255, 14586275, 2917255, 14586275, 14586275, 14586275, 14586275, 14586275, 14586275, 2917255, 14586275, 2917255];
    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_279_y();"
function MakeCharacter_279_y()
    N := 279;
    order := 15;
    char_gens := [218, 127];
    v := [15, 7];
    // 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_279_y_Hecke();"
function MakeCharacter_279_y_Hecke(Kf)
    N := 279;
    order := 15;
    char_gens := [218, 127];
    char_values := [[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, 1, 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]];
    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, 1, 0, 0, 0, 0, -1, -1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, -1, 0, 0, -1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1], [-1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1], [-1, 0, 0, 1, 0, -1, 0, -1, -1, 1, 1, 1, 1, 1, 0, 1], [0, 0, 2, 1, 0, 1, 0, 2, -2, 2, 0, 0, -3, -1, -1, 1], [0, -2, -3, 1, -2, -2, 2, -1, 2, -1, 2, -2, 0, 2, 0, 0], [-3, 0, 3, -2, 1, 2, 0, 2, -2, 3, -2, 2, -1, -4, -2, 0], [-2, 0, 0, -1, 3, 1, 3, 1, 1, 1, -2, 3, -5, 0, -2, 3], [-6, -1, 3, 0, 5, 1, -1, 1, 0, 1, -1, 2, -2, -1, -1, 0], [-2, -1, -2, -2, 3, -2, 2, -1, 5, -1, 0, -2, -2, 0, -3, -1], [-4, -2, 8, 3, 0, 3, -3, 1, -2, 3, 2, -1, -5, -1, -4, 4], [1, -2, 4, 3, -1, 3, 0, 3, -6, 5, -1, 3, -1, -1, -2, 0], [-1, 1, -5, 1, 0, 0, 4, -2, 1, 0, -1, 2, -1, 3, 3, -1], [-3, -5, 6, -2, 3, 4, -4, -1, 0, -2, -1, 1, -1, -2, -4, -2], [3, 2, -6, 2, -6, 0, -2, -2, -2, 3, 2, 0, 4, 4, 1, 0], [2, -3, -1, 3, -6, 4, 0, 2, -5, 9, -2, 5, 1, 4, 0, -2], [5, 0, -10, 2, -5, -3, 4, -4, -1, -3, 2, 2, 6, 6, 2, 1], [-4, -5, -4, 4, -5, 1, 3, 3, -2, 4, -2, 4, -2, 5, -2, 3], [-1, 2, 2, 2, -4, 6, 1, 2, -4, 5, -4, 3, -1, 0, -2, 1], [8, 1, -8, -5, 0, -3, -2, -2, -3, 0, -3, 2, 5, 3, 2, -3], [-1, 2, 0, 3, 2, -1, 1, 2, 1, -5, 1, -1, 3, -6, 4, 0], [-6, -1, 8, -1, 7, 0, -1, -1, 2, -1, 1, -2, -6, -10, -2, 1], [0, -5, -2, 1, 1, -5, 0, -4, 4, 0, 4, -4, 5, 2, 4, 0], [0, 4, -3, -2, 6, 3, 2, 3, -1, 6, -3, 4, -4, 0, 5, -1], [-2, 3, 6, 2, -4, 2, 1, 3, -3, 1, 1, 1, 1, 0, 0, 2], [-2, 3, -6, 0, -5, -1, 1, 0, 0, -3, 4, 1, 1, -1, 7, 3], [1, -1, -2, -3, -2, 0, 0, -3, 9, -10, 0, -5, -2, -7, -2, -9], [2, 1, 0, 0, -4, 6, -6, -1, 0, -2, -1, -1, 2, 0, 2, -2], [1, 4, -2, -1, 3, -3, -2, 1, -3, -4, 1, -1, 2, 0, 9, 1], [-5, -6, 13, 1, -7, 3, -1, 0, -2, 5, 1, 1, -3, 2, -9, 0], [3, 3, -2, -2, -3, -2, -1, 4, 1, -1, 2, 2, 3, 1, 2, 2], [-9, -4, -1, -2, 1, 1, 3, 2, 0, 9, -3, 2, -5, 1, 1, 1], [-8, 4, 4, -3, 9, 5, -2, -2, -3, -2, -5, 4, 4, -12, 4, -4], [-3, -5, 5, 3, -5, -2, -1, 0, 0, 5, 6, -3, -2, -2, -3, 1], [0, 4, -7, -2, -2, -3, 7, 2, 5, -1, -2, 3, -4, -1, 4, -1], [7, 2, 0, -2, -2, -5, -3, 1, 1, -2, 4, -2, 4, 0, 3, -1], [0, 3, 2, -7, 9, -1, 2, 2, 4, -2, -3, 2, -6, -7, -4, 5], [-2, 3, 0, 2, 4, 0, 6, 2, 2, 2, -1, 3, -5, 1, 0, 4], [5, 1, 5, 0, 2, 0, -5, 0, -2, -3, 0, -2, 1, -4, -2, 0], [-1, -3, 3, -7, 11, -7, 1, 0, 7, -8, -1, 1, -7, -4, 1, 1], [5, -3, -11, 0, -8, 0, -7, -2, 1, -2, 1, -2, 11, 1, 2, -7], [-3, 0, -7, 11, -5, 1, 4, 1, -1, 5, -1, 2, 5, 5, 8, 4], [6, 5, -7, -1, -8, -1, -4, -1, 1, -5, 4, -5, 13, 0, 5, -5], [17, 11, -17, 3, -5, -6, 1, 2, -6, -10, 2, -2, 13, 0, 14, 2], [12, 4, 8, 3, -5, 0, -8, 0, -6, -6, 3, -6, 2, -5, 2, 0], [4, 4, -9, 2, 1, 1, 6, 3, -6, -1, -8, 4, -1, -2, 4, -3], [-3, -9, 2, 0, -1, -7, -7, -9, 5, -1, 10, -5, 7, 4, -3, -2], [1, -4, 1, -3, 0, -3, 0, -3, 6, -10, 6, -3, 8, 4, -5, -1], [-5, -4, 8, 4, 1, -5, 0, 3, 4, 1, 4, -5, -4, 0, -11, 7], [-7, 3, 10, -3, 11, 6, -5, -3, -1, 0, -4, 1, 3, -10, 0, -6], [1, 10, -11, -1, 5, -2, 2, -2, 0, 3, -1, -1, 0, -2, 3, -2], [-3, 6, -1, 1, 0, 1, 7, -3, -1, -7, -7, 4, 4, 6, 0, 4], [-2, -3, 6, -1, -8, 8, 1, 0, 2, -1, -1, -1, 1, 5, -8, 0], [27, 8, -22, -3, -21, 0, -1, -2, -2, 0, 1, 0, 14, 9, 15, -5], [-6, -6, -6, 3, -8, -1, 3, 4, -2, -6, 2, 3, -2, -4, 4, 8], [11, 0, -3, 6, -13, 8, -2, 6, -12, 11, -4, 4, 6, 19, 0, 3], [-7, -12, 14, 4, -2, 0, -12, -7, 3, -1, 12, -12, 3, 7, -4, -4], [-4, 4, 8, 6, -2, 7, 4, 6, -3, 3, -4, 3, -6, -3, 0, 3], [14, 8, -8, -12, -1, 0, 4, -2, 6, -9, -6, -4, 1, -6, 1, -6], [0, 17, 5, -3, 9, 6, 4, 7, -3, 7, -7, 3, -17, -5, 4, 4], [8, -5, 8, 4, -8, -2, 2, 2, -9, 4, 2, -6, -6, 4, -11, 11], [-5, -8, -4, 13, -9, 11, -2, -4, -11, 9, 6, 9, 3, 9, 3, 4], [1, 4, -8, 2, 0, 8, 1, -1, -4, -8, 2, 2, 5, -14, 8, -7], [5, -2, 7, -10, 7, 0, -3, 5, 2, 5, -2, -5, -3, -4, -1, -5], [-12, -12, 21, 13, -6, 13, -12, 2, -6, 19, 5, -3, -4, 1, -13, -3], [2, -1, 10, 2, -5, 3, -1, 2, -4, 5, 2, 1, -1, 13, -9, 11], [0, -1, -14, 2, 2, -9, 0, -7, 7, 2, 7, -3, 1, 10, 9, -4], [-3, -7, 9, 11, -11, -9, -8, -6, 0, 3, 22, -11, 7, 5, -3, 2], [-2, 1, 17, 1, -2, 3, -1, 10, -8, 7, 4, -1, -8, -12, -3, 5], [2, -4, 6, 2, 2, -8, -10, -5, 2, -1, 7, -13, -1, 7, 2, -3], [0, 5, -8, -13, 21, 0, 8, 0, 8, -8, -13, 8, -2, -8, -8, 0], [7, 0, -2, -12, 4, 2, -15, -2, 0, -1, 0, 0, 10, -7, 1, -15], [-8, 7, -17, -4, 4, -3, 7, -7, 10, -16, -4, -4, 9, -4, 4, -8], [6, 9, -6, -1, -2, -1, 5, 2, 2, 2, -6, 8, -2, 13, -4, 8], [16, 11, -17, -9, 2, 0, 0, 2, 0, -12, -9, -2, 7, -4, 12, -9], [8, 11, 7, 3, 7, -2, 2, 1, -9, -1, 2, 5, 9, 0, 5, 11], [7, -7, -13, 0, -6, -7, 2, -4, 1, -2, 2, -1, 11, 5, 7, -6], [-12, -13, 11, -6, 8, 4, -2, -4, 3, 9, -7, 6, -4, 3, -10, -3], [13, 3, -14, 7, -18, 2, 6, 9, -6, 4, 2, -1, 0, 7, 13, 3], [-11, -7, 0, 3, 1, -12, 13, 5, -1, 6, 4, 3, -9, -2, -8, 10], [-13, -19, 2, 3, -2, -1, -4, -2, -3, 16, 4, -5, -2, -1, -1, -1], [-8, -22, 11, -5, 7, -4, 0, 1, 4, 17, -1, -4, -7, 15, -4, -1], [4, -2, 2, -2, 12, -3, 1, -1, 12, -4, -2, -2, -4, -5, -3, 0], [-2, -4, 9, -1, -3, 4, -11, -6, 1, -4, 1, -2, 1, -7, -6, -11], [-2, 6, 8, -2, 4, 6, -4, 10, 4, 12, 1, 3, -11, -6, -1, 5], [10, -1, -19, -3, -9, -1, -1, -2, 2, -15, 0, -1, 8, 2, 12, -4], [-8, 4, 7, 0, 6, -3, -3, -14, 11, -5, 0, -3, 2, -6, -16, -6], [0, 11, 15, -2, 12, 2, 9, 9, 0, 5, -9, 5, -11, -20, 5, 4], [-19, -17, 15, 14, 0, 0, -8, -3, -7, 13, 7, 8, -1, 11, -5, 7], [14, 17, -26, 4, -7, -3, 2, -2, -2, -10, 5, -5, 12, 3, 11, 2], [-11, -5, -11, 0, -4, 0, 0, 0, -4, 14, 0, 10, -4, 14, 6, 4], [22, 25, -12, -5, -9, 18, 0, 11, -7, 1, -9, 9, -4, -7, 15, -3], [-19, -21, 2, 11, -6, 5, 2, -1, -2, 11, -2, 4, -8, 16, -13, 2], [-3, -6, 13, 9, -10, 13, 0, -2, -7, 15, 2, 7, -5, 1, -8, 2], [14, 19, -17, 5, -18, 5, 9, 1, -8, -17, -6, 7, 11, -2, 21, 7], [2, 15, -8, -10, 9, -3, 2, -6, 5, -7, -7, -1, 2, 9, 1, -3], [-15, -16, 5, -7, 14, -12, -7, -15, 11, -3, 8, -4, -2, -8, -15, -8], [0, -4, 4, 6, 0, -3, -2, 1, -3, -1, -1, -1, 4, 0, -4, 2], [2, 4, 6, -8, 9, 6, -6, -2, -7, 13, -6, 1, 3, 9, -4, 1], [-11, -2, -2, -8, 6, 1, 5, 4, 1, 0, -13, -4, -17, -14, 0, -13], [-8, -11, 11, 8, -7, 17, -4, 4, -10, 16, 8, 8, 3, -7, -13, -5], [10, 7, 2, -6, 14, 0, -7, -2, 1, 9, 1, -2, 3, 7, -1, -7], [-4, -17, -12, -3, -7, 12, 4, -13, 12, 3, -7, 13, -1, 23, -8, -7], [-14, 4, 18, 4, 2, 6, -6, 12, -4, 18, -2, 8, -6, 10, -6, 6], [-11, -11, 4, 3, 0, 7, -8, -11, 3, 4, 7, 3, 5, 2, -1, -8], [-13, -20, 8, 16, -11, 4, -4, 4, -8, 23, 4, 8, -5, 11, -8, 8], [0, -1, -1, 0, 9, -7, -6, -13, 7, -1, 13, -13, 1, 7, 6, 0], [2, 3, -4, 3, 1, 7, -4, 3, -6, 2, -9, -1, 3, -4, 9, -5], [26, 20, -10, -12, 0, 17, 2, 11, -12, -7, -13, 18, 7, -11, -2, -1], [-3, 2, -10, 0, 5, -4, 2, -8, 9, -6, 4, 1, 12, 13, -5, -4], [-21, -12, 11, -2, 20, -2, 9, 3, -1, 1, -6, 9, -18, -13, 1, 9], [-21, -4, 25, 7, 8, 15, 0, 2, -9, 13, -2, 9, -21, -17, -4, -2], [13, -1, -3, 4, -10, 6, 0, 0, -14, 8, 4, 4, 4, 1, 2, -2], [16, 7, -6, 11, -12, -5, 4, -2, -5, 6, 7, 2, 17, 14, 3, 7], [5, 4, -27, -8, -7, -10, 2, -8, 16, -33, 6, -6, 30, 6, 12, -12], [8, 7, -29, -14, 5, -8, 4, -3, 9, -18, -12, 4, 21, -2, 23, -2], [0, -4, -5, 3, -31, -3, 0, 0, 0, -2, 0, -3, 4, 8, -2, 3], [-19, 10, 12, 0, 16, 16, 2, 4, 0, -2, -16, 14, -12, -9, -3, 0], [25, 19, -12, -8, -2, -6, -2, 6, -4, -6, -4, -2, 14, 2, 5, -4], [1, -1, 23, 2, -3, 9, -7, 2, -4, 1, 1, -5, 2, -5, -15, -5], [-21, -16, 10, 21, -3, -4, -2, -13, -9, 18, 4, -2, 4, 14, -12, 10], [-2, -12, 4, -15, 11, -3, -5, 1, 1, 4, 1, -2, -8, 8, -16, -5], [4, 4, 2, 4, -2, 3, -5, 5, -9, -7, 4, 4, 13, -9, -2, 6], [-6, -9, -1, -13, -1, -16, -3, 5, 21, -6, 11, -8, 2, 2, -13, 0], [-25, -3, 27, -5, 12, 13, 2, 13, -5, 21, -6, 14, -24, -10, -8, 8], [0, 23, 5, -5, 16, 15, 17, 27, -10, 19, -27, 20, -23, -15, 9, 7], [12, 21, -21, -3, -5, -7, 8, -1, 1, -5, -4, 2, 13, 4, 12, -9], [15, 0, 20, 11, -11, -3, 3, 8, -2, 3, 3, -17, -8, -2, -12, 5], [-15, -12, 17, 18, -11, 2, 7, 3, 2, 12, 11, -3, -11, 13, -2, 11], [0, 5, -24, 14, -9, -10, 24, 8, 1, -2, 1, -2, 6, 9, 20, 24], [3, 7, 14, -1, -2, -2, -10, 10, -4, -8, -1, -1, 8, -2, -6, 11], [-24, -12, 13, 6, 11, 6, 15, 15, -16, 33, -5, 20, -25, 1, -13, 20], [10, 13, 6, -10, 11, 3, 0, 6, 3, -13, -13, 9, 8, -13, -1, 3], [4, 25, 1, -5, 13, 1, -1, -4, 10, -34, -1, -2, 12, -31, 20, -11], [-14, -19, 20, 1, -11, 2, -1, 4, 2, 22, 6, -3, -17, -13, -14, 5], [20, -7, -9, -10, -10, -12, 1, 0, 5, -2, 7, -13, 3, -2, 0, -5], [15, 21, -23, -1, 4, -3, 22, 5, -1, -5, -12, 8, 0, 0, 12, 4], [-35, -21, 52, 11, 19, 8, 1, 12, 4, 20, -5, 4, -27, -8, -20, 19], [-1, 17, 5, -4, 9, 0, 4, 4, 4, -9, -8, 0, -9, -22, 0, -4], [-36, -20, 25, 1, 13, -5, 7, 5, 0, -2, 0, 0, -16, -16, 5, 7], [-18, -8, 2, -2, -2, -12, 9, 6, 3, 16, 9, 5, -15, -3, -18, 12], [-3, 10, 5, -6, 23, 7, -7, 1, -7, -2, -7, 4, 16, -10, 6, 0], [-4, 4, -9, -5, 10, -8, 3, -5, 10, -12, -5, -2, 3, -5, 5, -2], [24, 9, -7, 2, -13, 2, -3, 11, -11, 0, 5, -3, 11, 9, 8, 2], [28, 26, -3, -4, -10, -4, 0, 2, 2, -15, 2, -4, 13, -3, 14, -2], [-4, -3, -2, -13, 8, 8, 0, 1, -8, 2, -7, 22, -3, -1, -4, 2], [-39, -31, 19, 6, 2, 2, -2, -3, 2, 10, 8, 3, -28, 4, -11, 8], [6, 10, -13, 0, -4, 8, 1, -5, -13, -9, -5, 4, 7, -2, 4, -9], [0, -5, -10, -1, 8, -7, -2, 3, 2, 8, 2, -4, 9, 8, 9, -2], [-23, -16, 17, 2, 20, -14, -10, -3, 11, -8, 17, -7, -8, -2, -12, 6], [0, 13, 2, -9, 13, 6, 10, 12, 1, -1, -15, 13, -19, -8, -4, 6], [-4, -7, 25, -23, 23, -2, -18, -6, 20, 13, 14, -3, -7, 3, -26, -12], [-5, -8, 25, -1, 6, 4, -18, 2, -1, 6, 8, -5, 5, -13, 4, 1], [-10, -5, 32, 10, -11, 1, -15, -3, -6, 5, 16, -15, 5, -9, -9, -8], [11, 10, 3, -3, 12, -12, -6, -2, -3, 2, 0, -15, 17, -17, -1, -5], [-20, -19, 1, 5, -1, 8, -2, 1, 8, -14, 7, -1, -17, -7, -3, 7], [2, -10, 21, -1, 3, -4, -5, 5, 11, 11, -1, -1, -11, 12, -16, 8], [22, 0, 1, -5, -1, -5, -3, 6, 2, 4, 6, 0, -16, 4, -4, 0], [-13, -5, 24, 3, 8, -8, -11, 11, -8, -1, 14, -11, -13, -31, -14, 14], [-11, -10, -14, 11, -14, -7, 7, 4, -5, 15, 7, 9, -7, 18, 8, 12], [16, 6, -44, 1, -13, 5, 14, 1, 3, -15, -9, 14, 23, 18, 27, 9], [7, -8, -28, -7, 5, -5, 9, 0, 3, -8, -8, 4, -5, -2, 7, -9], [2, -3, 3, 9, -4, 15, -6, 9, -18, 7, -4, 3, 4, 6, 10, 11], [11, -12, -3, -19, 4, -3, -22, -13, 25, -19, 12, -19, 10, 1, -6, -26], [12, 6, -18, -14, -6, -6, 12, 1, 7, -12, -9, -3, 9, -1, 2, -10], [21, 13, 16, -13, 13, -6, -8, 8, 9, -9, -13, -13, -3, -7, -5, 1], [7, 12, -15, 10, -21, 6, 6, 6, -6, -4, -6, 12, 8, -9, 13, 6]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_279_y_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_279_2_y_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose lines below.
// The precision argument determines an initial guess on how many Fourier coefficients to use.
// This guess is increased enough to uniquely determine the newform.
function MakeNewformModFrm_279_2_y_b(:prec:=16)
    chi := MakeCharacter_279_y();
    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_279_2_y_b();".
// This may take a long time!  To see verbose output, uncomment the SetVerbose line below.
// The default sign is -1.  You can change this with the optional parameter "sign".
function MakeNewformModSym_279_2_y_b( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_279_y();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![1, 10, 46, 85, 497, 640, 1018, 620, 400, 210, 157, 0, 22, 10, 4, 0, 1]>],Snew);
    return Vf;
end function;