
// Make newform 1512.2.bl.c in Magma, downloaded from the LMFDB on 02 September 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_1512_bl();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_1512_bl_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_1512_2_bl_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_1512_2_bl_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 := [2401, 0, 8869, 0, 25166, 0, 25507, 0, 19270, 0, 3668, 0, 521, 0, 26, 0, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [38249694, 0, -156406333, 0, -85588525, 0, -47329087, 0, -8691844, 0, -1176032, 0, -58305, 0, -2197, 0], [1796382242508, 0, 3038824300851, 0, 3623475800186, 0, 803436721966, 0, 125259292438, 0, 8364940166, 0, 362504276, 0, 6144876, 0], [23431731008, 0, 112489854721, 0, 70553696851, 0, 73882357935, 0, 14250430915, 0, 2131367942, 0, 106894951, 0, 4203583, 0], [1081065930882, 0, 1332712040315, 0, 320447932002, 0, -574142369638, 0, -124414527447, 0, -20932312379, 0, -1066460314, 0, -43522950, 0], [-431561039301, 0, -1224797116684, 0, -1043499973032, 0, -939961098768, 0, -180548210584, 0, -26432319672, 0, -1323221352, 0, -51566747, 0], [-1051396903438, 0, -4243465314320, 0, -4448361941232, 0, -2704425151742, 0, -504521261566, 0, -68559853505, 0, -3402651537, 0, -128347598, 0], [0, -14587104931, 0, -23838568321, 0, -22230042505, 0, -15468177976, 0, -2920888376, 0, -409552671, 0, -20403409, 0, -780606], [-1585943609439, 0, -6555544073882, 0, -8598685434592, 0, -6515246704709, 0, -1246366440256, 0, -176098877812, 0, -8787513877, 0, -336900052, 0], [0, 11558515964198, 0, 4964526317330, 0, 10606254266245, 0, -2725996376088, 0, -656994285451, 0, -146732505370, 0, -7620847484, 0, -337932687], [0, 431561039301, 0, 1224797116684, 0, 1043499973032, 0, 939961098768, 0, 180548210584, 0, 26432319672, 0, 1323221352, 0, 51566747], [0, 3790865842176, 0, 16849197827960, 0, 16291000696564, 0, 13884073510677, 0, 2663143672770, 0, 386018390670, 0, 19307170748, 0, 749068874], [0, 1287535535678, 0, 3451724618187, 0, 3300636915059, 0, 1856787063328, 0, 343061930274, 0, 45843545374, 0, 2269933360, 0, 84985522], [0, 260624410234, 0, -50981282709, 0, -144201250611, 0, -523988464271, 0, -106235785869, 0, -17001282474, 0, -860031409, 0, -34629015], [0, -20703691749286, 0, -58732963478099, 0, -71220302525889, 0, -44842965299593, 0, -8435796443354, 0, -1149960600162, 0, -57130072067, 0, -2155970587]];
    Rf_basisdens := [1, 1, 134136849, 325818406221, 46545486603, 325818406221, 325818406221, 325818406221, 6572705601, 325818406221, 2280728843547, 325818406221, 2280728843547, 207338985777, 46545486603, 2280728843547];
    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_1512_bl();"
function MakeCharacter_1512_bl()
    N := 1512;
    order := 6;
    char_gens := [1135, 757, 785, 1081];
    v := [6, 6, 3, 5];
    // 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_1512_bl_Hecke();"
function MakeCharacter_1512_bl_Hecke( : Kf := false)
    N := 1512;
    order := 6;
    char_gens := [1135, 757, 785, 1081];
    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], [0, 0, 0, 0, 0, 0, -1, 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 := 2;
    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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 1, -1, 0, -1, 0, 1, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, -2, 0, 1, 1, -2, 0, -1, 0], [1, 0, 0, 0, -2, 0, 2, 0, 0, -1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, -1], [-2, 0, 0, 0, 1, -1, -1, -2, 0, 1, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, -1, 0, 2, 1, 0, 2, -1, 1], [1, 0, -2, 1, -2, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, -1, 1, -2, 0, -2, 0, 0, -1, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, -2, 0, 2, 2], [-4, 0, 3, -1, 3, -3, 0, -3, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 6, 0, -2, -1, 3, -1, 2, -1], [0, -1, 0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 2, 0, -3, -2], [0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 3, 2, 0, 0, 0], [0, 0, -1, -2, 1, -1, 0, -2, 0, -1, 0, 0, 0, 0, 0, 0], [-1, 0, 1, -2, 1, 0, -1, -2, 0, -2, 0, 0, 0, 0, 0, 0], [0, -2, 0, 0, 0, 0, 0, 0, -1, 0, -5, -2, 0, -5, 2, -2], [-1, 0, -1, 3, 1, -4, 1, -2, 0, 2, 0, 0, 0, 0, 0, 0], [0, 0, -2, 2, -3, -1, -4, 0, 0, -1, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, -1, 3, 3], [0, 2, 0, 0, 0, 0, 0, 0, -4, 0, -2, -1, -2, -1, 1, -1], [2, 0, 2, -2, 0, 2, 4, -2, 0, 2, 0, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0, 0, 0, 4, 0, 2, 0, -4, 4, -2, -3], [0, 0, 1, 4, 1, -1, 0, -2, 0, 5, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 2, -4, 2, 0], [-4, 0, 2, 0, 0, 0, -4, -2, 0, 2, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 4, 0, 3, -1, 0, 3, 0, 0], [-6, 0, -6, 0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 2, -1, 2], [0, -2, 0, 0, 0, 0, 0, 0, -2, 0, 2, 2, -2, 0, 2, 2], [1, 0, 2, -2, 2, 2, 2, -2, 0, -3, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -12, 0, 0, 0], [2, 0, -1, 1, -3, 0, 2, 4, 0, -2, 0, 0, 0, 0, 0, 0], [1, 0, 2, -4, 3, -2, -1, -1, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 2, 2, 5, -1, -5, 0, 0, -1, 0, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0, 0, 0, -3, 0, 0, -2, -6, 0, -1, -1], [0, -3, 0, 0, 0, 0, 0, 0, -10, 0, 8, 4, -5, 4, -1, 4], [0, 2, 0, 0, 0, 0, 0, 0, 2, 0, -2, -2, 2, 0, 0, -1], [5, 0, -2, 2, 6, -2, 10, 2, 0, 5, 0, 0, 0, 0, 0, 0], [0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, -3, 0, -3], [-5, 0, -1, -2, -3, 0, -5, 4, 0, -8, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0, -4, 3, -3], [3, 0, 4, 0, 2, 4, -3, 2, 0, -2, 0, 0, 0, 0, 0, 0], [-18, 0, 0, -4, -1, 2, 0, 2, 0, -3, 0, 0, 0, 0, 0, 0], [6, 0, -3, 3, 0, -3, 12, 3, 0, 1, 0, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0, 0, 0, 4, 0, 2, 1, -4, 4, -2, 6], [-6, 0, 0, 2, -1, 1, -3, 2, 0, 1, 0, 0, 0, 0, 0, 0], [0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -10, -3, -1, -5], [0, -1, 0, 0, 0, 0, 0, 0, -3, 0, -2, -1, 0, -2, 2, -2], [5, 0, 0, 0, -4, 8, -5, 4, 0, -4, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -5, 0, 3, 0, -10, -3, -1, -1], [0, 0, 0, 0, 0, 0, 0, 0, -12, 0, 2, 1, -6, 1, -1, 1], [0, -1, 0, 0, 0, 0, 0, 0, -15, 0, -3, -1, -15, 0, 1, -1], [0, -2, 0, 0, 0, 0, 0, 0, -1, 0, -2, -1, 1, -4, 2, 5], [-12, 0, 0, 2, -1, 1, -6, 2, 0, 1, 0, 0, 0, 0, 0, 0], [-4, 0, -3, 4, 2, 0, -4, 1, 0, 7, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 19, 0, -1, 0, 0, -1, 0, 0], [2, 0, 5, -3, 3, 4, -2, 2, 0, -2, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 2, 0, -2, -1, 4, 2, 0, 0], [12, 0, -1, 1, -3, -1, 24, 1, 0, 1, 0, 0, 0, 0, 0, 0], [0, -2, 0, 0, 0, 0, 0, 0, -2, 0, -2, -2, 2, -4, 2, 2], [2, 0, -6, 4, -4, 4, 1, 8, 0, 0, 0, 0, 0, 0, 0, 0], [0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, -9, 2, -1, 0], [0, 0, -1, 3, 5, -7, -3, 0, 0, 4, 0, 0, 0, 0, 0, 0], [-5, 0, 5, -3, 1, 3, 0, 3, 0, -3, 0, 0, 0, 0, 0, 0], [0, -7, 0, 0, 0, 0, 0, 0, -1, 0, 5, 6, -1, 0, 9, 7], [7, 0, 3, -3, -2, 3, 14, -3, 0, -3, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 9, 0, -1, 6, -9, -2, 1, 2], [0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, 14, 1, -2, -3], [-3, 0, 6, -3, 9, -6, 3, -3, 0, 3, 0, 0, 0, 0, 0, 0], [0, 0, -4, 2, 0, -8, -4, 0, 0, 6, 0, 0, 0, 0, 0, 0], [-5, 0, 1, 3, -2, 5, 0, 5, 0, -1, 0, 0, 0, 0, 0, 0], [0, -3, 0, 0, 0, 0, 0, 0, 6, 0, -6, -3, 3, -3, 5, -3], [0, -2, 0, 0, 0, 0, 0, 0, -12, 0, 0, 1, -12, 0, 8, 4], [6, 0, -5, -3, -5, 5, 3, 10, 0, -8, 0, 0, 0, 0, 0, 0], [0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, -3, 4, -4, -4], [2, 0, -1, 3, -2, 2, -2, 1, 0, -1, 0, 0, 0, 0, 0, 0], [0, -7, 0, 0, 0, 0, 0, 0, -10, 0, 3, 7, -20, -3, 2, 2], [-19, 0, -2, 4, -1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0], [0, 6, 0, 0, 0, 0, 0, 0, -12, 0, 0, -3, -12, 0, 6, 3], [0, 0, 0, 0, -7, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0], [-20, 0, 3, -2, 3, -3, -10, -6, 0, 1, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 15, 2, -1, 0], [0, -6, 0, 0, 0, 0, 0, 0, 6, 0, 1, -6, 0, 1, 3, -3], [0, 0, 6, -4, 7, 5, -8, 0, 0, -1, 0, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0, 0, 0, 8, 0, 5, -2, 16, -5, -6, -6], [-13, 0, 5, -7, 0, 5, 0, 5, 0, -6, 0, 0, 0, 0, 0, 0], [0, 3, 0, 0, 0, 0, 0, 0, 10, 0, 8, 4, 5, 4, -1, 4], [0, 2, 0, 0, 0, 0, 0, 0, 7, 0, 2, -4, -7, 4, -2, 5], [-5, 0, -1, 0, -2, 0, -5, 3, 0, -3, 0, 0, 0, 0, 0, 0], [0, 5, 0, 0, 0, 0, 0, 0, -5, 0, 8, 5, 0, 8, -3, 3], [0, 0, -1, 1, -6, 4, -8, 0, 0, -5, 0, 0, 0, 0, 0, 0], [0, 8, 0, 0, 0, 0, 0, 0, -6, 0, -5, -8, -12, 5, -5, -5], [0, 5, 0, 0, 0, 0, 0, 0, -12, 0, -6, -3, -6, -3, 0, -3], [0, -3, 0, 0, 0, 0, 0, 0, -6, 0, -3, 1, 6, -6, 3, 10], [2, 0, -5, -6, -2, 2, 1, 4, 0, -8, 0, 0, 0, 0, 0, 0], [0, 0, 1, 3, 4, -2, -6, 0, 0, -1, 0, 0, 0, 0, 0, 0], [-1, 0, 1, -1, 1, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 7, 0, 5, 3, 7, 0, -3, 1], [0, 4, 0, 0, 0, 0, 0, 0, -6, 0, 4, -6, 6, 8, -4, 3], [0, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, -9, 7, 5], [10, 0, 7, -3, -7, 0, 10, 0, 0, -6, 0, 0, 0, 0, 0, 0], [6, 0, 0, 7, 4, -8, -6, -4, 0, 4, 0, 0, 0, 0, 0, 0], [0, -7, 0, 0, 0, 0, 0, 0, 7, 0, -3, 7, 14, 3, 2, 2], [0, 8, 0, 0, 0, 0, 0, 0, -14, 0, 0, 0, -7, 0, 1, 0], [0, -9, 0, 0, 0, 0, 0, 0, 14, 0, -9, 0, 14, 0, -1, -5], [8, 0, -1, 1, 8, -1, 16, 1, 0, 3, 0, 0, 0, 0, 0, 0], [6, 0, 10, -1, 3, -3, 3, -6, 0, 2, 0, 0, 0, 0, 0, 0], [-1, 0, -5, 9, -2, 0, -1, 7, 0, 11, 0, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0, 0, 0, 14, 0, -6, 2, 0, -6, 0, 0], [5, 0, -2, 6, -1, -2, -5, -1, 0, 1, 0, 0, 0, 0, 0, 0], [-13, 0, 1, 7, 4, -7, 0, -7, 0, 7, 0, 0, 0, 0, 0, 0], [0, 4, 0, 0, 0, 0, 0, 0, -5, 0, -8, -6, -5, 0, 2, -3], [-3, 0, 0, 0, -2, 0, -6, 0, 0, 3, 0, 0, 0, 0, 0, 0], [0, 3, 0, 0, 0, 0, 0, 0, -7, 0, 3, 8, 7, 6, -3, 0], [0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, -23, -6, 5, 4], [0, 3, 0, 0, 0, 0, 0, 0, 4, 0, 4, 3, 0, 4, -2, 2], [-3, 0, -4, -4, 1, -10, 3, -5, 0, 5, 0, 0, 0, 0, 0, 0], [-3, 0, -7, -7, -6, 5, 0, 5, 0, -6, 0, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0, 0, 0, 6, 0, -16, -8, 3, -8, 2, -8], [0, -12, 0, 0, 0, 0, 0, 0, -7, 0, 6, 9, -7, 0, 12, 9], [2, 0, 0, -3, 0, 0, 1, 0, 0, -3, 0, 0, 0, 0, 0, 0], [0, 3, 0, 0, 0, 0, 0, 0, 8, 0, -5, 3, 0, -5, 5, -5], [0, 0, -4, 3, -13, 5, -10, 0, 0, -8, 0, 0, 0, 0, 0, 0], [0, -10, 0, 0, 0, 0, 0, 0, 16, 0, 4, 2, 8, 2, 4, 2], [6, 0, -2, 2, -4, -2, 12, 2, 0, -1, 0, 0, 0, 0, 0, 0], [-6, 0, 7, -10, 2, -2, -3, -4, 0, -8, 0, 0, 0, 0, 0, 0], [-5, 0, 3, -7, 8, 0, -5, -11, 0, -3, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, -21, 0, -6, -1, 0, -6, 0, 0], [0, 0, 5, 2, 13, -3, -5, 0, 0, 1, 0, 0, 0, 0, 0, 0], [-28, 0, -5, 3, -2, -1, 0, -1, 0, 2, 0, 0, 0, 0, 0, 0], [0, -3, 0, 0, 0, 0, 0, 0, -38, 0, 2, 1, -19, 1, -3, 1], [9, 0, 3, -3, 1, 3, 18, -3, 0, -2, 0, 0, 0, 0, 0, 0], [0, 8, 0, 0, 0, 0, 0, 0, -3, 0, 8, 3, 3, 16, -8, 6], [8, 0, 10, -5, 11, -2, -8, -1, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 8, 0, -4, -8, 2, 2], [0, 5, 0, 0, 0, 0, 0, 0, 25, 0, 5, 0, 25, 0, -5, 0], [1, 0, 0, 0, 6, 0, 2, 0, 0, 7, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -13, -2, -3, -8], [-14, 0, -4, -3, 8, 0, -14, -4, 0, -2, 0, 0, 0, 0, 0, 0], [0, 4, 0, 0, 0, 0, 0, 0, -4, 0, 14, 4, 0, 14, -5, 5], [7, 0, 6, -2, 1, 10, -7, 5, 0, -5, 0, 0, 0, 0, 0, 0], [0, 3, 0, 0, 0, 0, 0, 0, -3, 0, 7, -3, -6, -7, -1, -1], [1, 0, -2, 2, 3, -2, 2, 2, 0, -14, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 10, 0, 1, -9, -10, 2, -1, -6], [-2, 0, 5, -10, 8, -8, -1, -16, 0, -2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, -9, -4, -3, -10], [0, 0, -2, 10, 2, -6, 4, 0, 0, -4, 0, 0, 0, 0, 0, 0], [0, -2, 0, 0, 0, 0, 0, 0, -23, 0, -2, 2, -46, 2, 1, 1], [15, 0, 10, -4, 7, -4, 0, -4, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0], [-8, 0, -6, -2, 2, 0, -8, 4, 0, -8, 0, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0, 0, 0, -3, 0, -3, 2, 0, -3, 6, -6], [0, 0, -2, 2, 0, -4, 19, 0, 0, 2, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, -16, 0, 0, 0, -8, 0, -1, 0], [4, 0, -4, 4, -10, -4, 8, 4, 0, -7, 0, 0, 0, 0, 0, 0], [0, -3, 0, 0, 0, 0, 0, 0, -2, 0, -3, 5, 2, -6, 3, -8], [0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 26, -5, 3, 1], [0, 9, 0, 0, 0, 0, 0, 0, 7, 0, 15, 9, 0, 15, -13, 13], [-22, 0, 4, 6, 4, -4, 0, -4, 0, 5, 0, 0, 0, 0, 0, 0], [0, -5, 0, 0, 0, 0, 0, 0, 8, 0, 12, 6, 4, 6, 8, 6], [0, 2, 0, 0, 0, 0, 0, 0, 36, 0, -8, -5, 36, 0, 2, -3], [0, -7, 0, 0, 0, 0, 0, 0, 18, 0, -7, 5, -18, -14, 7, -8], [4, 0, 6, -3, -4, 0, 4, -2, 0, -4, 0, 0, 0, 0, 0, 0], [8, 0, -9, 7, -5, -8, -8, -4, 0, 4, 0, 0, 0, 0, 0, 0], [-8, 0, -15, -1, -5, -5, 0, -5, 0, 2, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, -28, 0, 0, 0, -14, 0, 2, 0], [0, -4, 0, 0, 0, 0, 0, 0, -38, 0, 0, 2, -38, 0, -8, -4], [2, 0, 2, -2, -1, 2, 4, -2, 0, -3, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, 3, -4, 1, -2], [-14, 0, -2, 3, -6, 0, -14, 8, 0, -2, 0, 0, 0, 0, 0, 0], [11, 0, -9, -7, -13, 8, -11, 4, 0, -4, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, -9, 0, -4, -1, -18, 4, 10, 10], [1, 0, 3, -3, 1, 1, 0, 1, 0, -2, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 21, 0, -5, -2, 21, 0, -7, -6], [9, 0, -7, 7, -5, -7, 18, 7, 0, 3, 0, 0, 0, 0, 0, 0], [12, 0, -4, 0, 4, -4, 6, -8, 0, 4, 0, 0, 0, 0, 0, 0], [0, 0, 4, -2, 1, 7, 3, 0, 0, -5, 0, 0, 0, 0, 0, 0], [0, -3, 0, 0, 0, 0, 0, 0, 17, 0, 2, 3, 34, -2, 1, 1], [31, 0, 12, -2, 6, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0], [0, -3, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 6, 0, 13, 0], [0, 13, 0, 0, 0, 0, 0, 0, -9, 0, -5, -9, -9, 0, -17, -11], [0, -1, 0, 0, 0, 0, 0, 0, 17, 0, -1, 2, -17, -2, 1, 0], [0, 0, -13, 11, 7, 0, 0, 6, 0, 16, 0, 0, 0, 0, 0, 0], [-4, 0, 4, -14, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 2, -1, -5, 9, 18, 0, 0, -8, 0, 0, 0, 0, 0, 0], [0, 9, 0, 0, 0, 0, 0, 0, -11, 0, 9, -7, 11, 18, -9, 1], [2, 0, 0, 4, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, -2, 0, -9, -1, 0, -9, -4, 4], [0, 0, 4, -5, 6, 2, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0], [0, 12, 0, 0, 0, 0, 0, 0, 14, 0, -8, -4, 7, -4, 8, -4], [0, 5, 0, 0, 0, 0, 0, 0, 1, 0, 9, 2, 1, 0, -15, -3], [0, 0, 0, 0, 0, 0, 0, 0, -14, 0, 0, 11, 14, 0, 0, 3], [23, 0, -11, 8, -8, 0, 23, 19, 0, -3, 0, 0, 0, 0, 0, 0], [0, 0, 1, 3, 18, -16, 12, 0, 0, 13, 0, 0, 0, 0, 0, 0], [0, 21, 0, 0, 0, 0, 0, 0, 5, 0, -7, -21, 10, 7, -5, -5], [0, 12, 0, 0, 0, 0, 0, 0, 10, 0, -6, -3, 5, -3, -6, -3], [0, 11, 0, 0, 0, 0, 0, 0, 7, 0, 9, -1, 7, 0, -13, -2], [-3, 0, -1, 1, -3, -1, -6, 1, 0, 5, 0, 0, 0, 0, 0, 0], [-16, 0, -5, -7, -2, 2, -8, 4, 0, -9, 0, 0, 0, 0, 0, 0], [-8, 0, 7, -4, 5, 4, 8, 2, 0, -2, 0, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0, 0, 0, -23, 0, -1, -2, -46, 1, -5, -5], [0, -1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, -1, -2, 1, 3], [-4, 0, -10, 17, -1, 1, -2, 2, 0, 16, 0, 0, 0, 0, 0, 0], [0, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 9, -11, -4, -19], [0, 7, 0, 0, 0, 0, 0, 0, 16, 0, 4, 7, 0, 4, -1, 1], [8, 0, 5, 2, 4, 2, -8, 1, 0, -1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 7, 8, -8, 14, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, -4, 0, 0, 0, 0, 0, 0, 0, 0, -3, 4, 0, 3, -10, -10], [15, 0, -1, 7, -2, 3, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0], [0, 14, 0, 0, 0, 0, 0, 0, 8, 0, -4, -2, 4, -2, -2, -2], [0, 5, 0, 0, 0, 0, 0, 0, -21, 0, 5, -3, 21, 10, -5, 7], [-24, 0, -10, 11, -2, 2, -12, 4, 0, 9, 0, 0, 0, 0, 0, 0], [0, 0, -12, 14, -3, 0, 0, 15, 0, 13, 0, 0, 0, 0, 0, 0], [0, 7, 0, 0, 0, 0, 0, 0, -1, 0, 7, -16, 1, 14, -7, -2], [0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 22, 9, -6, -3], [0, 2, 0, 0, 0, 0, 0, 0, -23, 0, 14, 2, 0, 14, -9, 9], [0, 0, 0, -5, -12, 12, -3, 0, 0, -7, 0, 0, 0, 0, 0, 0], [-18, 0, 4, -4, -3, 4, -36, -4, 0, -5, 0, 0, 0, 0, 0, 0], [0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7, 15, 25, -12, 1], [0, 0, -11, 8, -12, -10, 24, 0, 0, 2, 0, 0, 0, 0, 0, 0], [0, -16, 0, 0, 0, 0, 0, 0, -18, 0, 6, 16, -36, -6, 1, 1], [-7, 0, 10, -4, 13, -16, 0, -16, 0, 6, 0, 0, 0, 0, 0, 0], [0, -2, 0, 0, 0, 0, 0, 0, 18, 0, 16, 8, 9, 8, 1, 8], [0, 5, 0, 0, 0, 0, 0, 0, -11, 0, 7, 1, -11, 0, -1, 3], [-2, 0, -12, 2, -10, 10, -1, 20, 0, -8, 0, 0, 0, 0, 0, 0], [0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, -13, 15, 7, 0, 7], [-10, 0, -2, 8, -6, 0, -10, 8, 0, 8, 0, 0, 0, 0, 0, 0], [-3, 0, -4, -12, -9, 10, 3, 5, 0, -5, 0, 0, 0, 0, 0, 0], [-16, 0, 10, 4, 4, 2, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0, 0, 0, 25, 0, 2, 0, 25, 0, -12, -5], [9, 0, -5, 5, 8, -5, 18, 5, 0, 9, 0, 0, 0, 0, 0, 0], [0, -5, 0, 0, 0, 0, 0, 0, 11, 0, -5, -10, -11, -10, 5, -4], [0, 0, -16, -2, -3, 3, 0, 6, 0, -5, 0, 0, 0, 0, 0, 0], [0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, -37, 2, 0, 2], [0, -4, 0, 0, 0, 0, 0, 0, -11, 0, -13, -4, 0, -13, 7, -7], [0, 4, 0, 0, 0, 0, 0, 0, 6, 0, 4, -4, 12, -4, 4, 4], [0, 3, 0, 0, 0, 0, 0, 0, -35, 0, -3, -3, -35, 0, -7, -5], [-12, 0, 13, -5, -2, 2, -6, 4, 0, -7, 0, 0, 0, 0, 0, 0], [-12, 0, 8, 11, 15, -14, 12, -7, 0, 7, 0, 0, 0, 0, 0, 0], [0, 0, 7, -8, 2, 12, 33, 0, 0, -4, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -26, 0, 1, 0, -52, -1, -3, -3], [0, 9, 0, 0, 0, 0, 0, 0, 6, 0, 14, 7, 3, 7, -7, 7], [4, 0, -3, 3, 9, -3, 8, 3, 0, 7, 0, 0, 0, 0, 0, 0], [0, -2, 0, 0, 0, 0, 0, 0, -3, 0, -2, -5, 3, -4, 2, -3], [16, 0, 10, -12, 10, 0, 16, -20, 0, -4, 0, 0, 0, 0, 0, 0], [0, -10, 0, 0, 0, 0, 0, 0, -16, 0, -1, -10, 0, -1, 9, -9], [12, 0, -11, 17, 1, -13, 0, -13, 0, 15, 0, 0, 0, 0, 0, 0], [0, -16, 0, 0, 0, 0, 0, 0, 18, 0, -18, -9, 9, -9, 12, -9], [0, 7, 0, 0, 0, 0, 0, 0, 24, 0, 15, 4, 24, 0, -5, 5], [-20, 0, 2, -2, -2, 2, -40, -2, 0, -3, 0, 0, 0, 0, 0, 0], [0, 8, 0, 0, 0, 0, 0, 0, 17, 0, 8, 13, -17, 16, -8, 24], [0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, 22, -5, -5, -15], [25, 0, -4, 0, 1, 0, 25, 3, 0, -3, 0, 0, 0, 0, 0, 0], [13, 0, -1, 4, -7, 12, -13, 6, 0, -6, 0, 0, 0, 0, 0, 0], [0, 14, 0, 0, 0, 0, 0, 0, 11, 0, -14, -14, 22, 14, -3, -3], [30, 0, 15, -8, 3, -3, 15, -6, 0, -5, 0, 0, 0, 0, 0, 0], [4, 0, 9, -2, -7, 0, 4, -2, 0, -2, 0, 0, 0, 0, 0, 0], [0, -3, 0, 0, 0, 0, 0, 0, 0, 0, -4, -3, 0, -4, 4, -4], [15, 0, -1, -9, -16, 30, -15, 15, 0, -15, 0, 0, 0, 0, 0, 0], [-26, 0, -5, 5, 4, -5, -52, 5, 0, 14, 0, 0, 0, 0, 0, 0], [0, 8, 0, 0, 0, 0, 0, 0, -12, 0, 8, -2, 12, 16, -8, 8], [16, 0, 1, 20, 3, -3, 8, -6, 0, 23, 0, 0, 0, 0, 0, 0], [0, -5, 0, 0, 0, 0, 0, 0, -2, 0, -12, -5, 0, -12, 2, -2], [0, -10, 0, 0, 0, 0, 0, 0, -14, 0, 1, 10, -28, -1, -5, -5], [10, 0, -1, -13, -2, 3, 0, 3, 0, -8, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 6, 0, -4, -2, 6, 0, 18, 7], [-34, 0, 6, -5, 2, -2, -17, -4, 0, -3, 0, 0, 0, 0, 0, 0], [20, 0, -3, 3, 3, 0, 20, 0, 0, 6, 0, 0, 0, 0, 0, 0], [5, 0, 6, -11, 3, 6, -5, 3, 0, -3, 0, 0, 0, 0, 0, 0], [0, 0, 4, 4, 17, -9, 17, 0, 0, 5, 0, 0, 0, 0, 0, 0], [-4, 0, 8, -8, 0, 8, -8, -8, 0, 4, 0, 0, 0, 0, 0, 0], [-20, 0, 8, -3, -2, 2, -10, 4, 0, -5, 0, 0, 0, 0, 0, 0], [0, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 1, -2, -3], [24, 0, -5, -5, 1, 0, 24, 4, 0, -14, 0, 0, 0, 0, 0, 0], [0, 0, -4, -2, -7, -1, -2, 0, 0, 3, 0, 0, 0, 0, 0, 0], [0, 6, 0, 0, 0, 0, 0, 0, -2, 0, 14, 7, -1, 7, -12, 7], [0, -10, 0, 0, 0, 0, 0, 0, 5, 0, -10, 2, -5, -20, 10, 1], [-2, 0, 15, -3, -3, 0, -2, -12, 0, 6, 0, 0, 0, 0, 0, 0], [0, -6, 0, 0, 0, 0, 0, 0, 18, 0, -6, 6, 36, 6, -4, -4], [-14, 0, -7, 7, -13, -7, -28, 7, 0, -7, 0, 0, 0, 0, 0, 0], [0, 0, 7, -6, 3, -3, 0, -6, 0, -3, 0, 0, 0, 0, 0, 0], [0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, -5, -13, 0, -13], [2, 0, 1, -4, -3, 0, 2, 2, 0, -10, 0, 0, 0, 0, 0, 0], [0, 8, 0, 0, 0, 0, 0, 0, -50, 0, 3, 8, 0, 3, 0, 0], [-19, 0, 3, 15, 1, 4, 19, 2, 0, -2, 0, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, -9, 0, -5, 1, -18, 5, -17, -17], [0, -3, 0, 0, 0, 0, 0, 0, -13, 0, -5, -1, -13, 0, 11, 3], [0, -4, 0, 0, 0, 0, 0, 0, 2, 0, -4, -3, -2, -8, 4, 12], [0, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 13, 4, -7, -10], [0, 0, 0, 0, 0, 0, 0, 0, -6, 0, 3, 0, -12, -3, 6, 6], [33, 0, -11, 15, -2, -7, 0, -7, 0, 11, 0, 0, 0, 0, 0, 0], [0, 6, 0, 0, 0, 0, 0, 0, -16, 0, 6, -1, 16, 12, -6, 16], [-2, 0, -18, 11, 3, -3, -1, -6, 0, 14, 0, 0, 0, 0, 0, 0], [0, -2, 0, 0, 0, 0, 0, 0, 23, 0, 2, 2, 46, -2, 6, 6], [0, -1, 0, 0, 0, 0, 0, 0, -14, 0, -18, -9, -7, -9, 8, -9], [6, 0, 1, -1, -1, 1, 12, -1, 0, -13, 0, 0, 0, 0, 0, 0], [-22, 0, 20, -14, 1, -1, -11, -2, 0, -13, 0, 0, 0, 0, 0, 0], [0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, -30, -17, 10, 3], [-12, 0, 1, -5, 5, 0, -12, -6, 0, -4, 0, 0, 0, 0, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1512_bl_Hecke( : Kf := Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1512_2_bl_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_1512_2_bl_c(:prec:=16)
    chi := MakeCharacter_1512_bl();
    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_1512_2_bl_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_1512_2_bl_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1512_bl();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<5,R![279841, 0, 317929, 0, 247466, 0, 101707, 0, 30070, 0, 4388, 0, 461, 0, 26, 0, 1]>],Snew);
    return Vf;
end function;