
// Make newform 260.2.bk.c in Magma, downloaded from the LMFDB on 16 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_260_bk();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_260_bk_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_260_2_bk_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_260_2_bk_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 := [9, 0, 666, 0, 6399, 0, 20400, 0, 29001, 0, 21870, 0, 9517, 0, 2460, 0, 371, 0, 30, 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, 0, 0, 0], [-30772215, 28886031, 177442551, 188401923, 1208743398, 208369644, 2018251380, 182934918, 1533635325, 198036087, 626423073, 134877863, 145983780, 48734964, 19386102, 9328060, 1362663, 894975, 39285, 33785], [30772215, 28886031, -177442551, 188401923, -1208743398, 208369644, -2018251380, 182934918, -1533635325, 198036087, -626423073, 134877863, -145983780, 48734964, -19386102, 9328060, -1362663, 894975, -39285, 33785], [1823586, 0, 1226733, 0, -87983292, 0, -215234229, 0, -206050063, 0, -102464589, 0, -28817129, 0, -4601880, 0, -387493, 0, -13302, 0], [14385840, -39273189, 284298396, -168422421, 1045511364, -124849086, 1534019320, 95995754, 1166030400, 162711893, 509453696, 84958189, 132212424, 22344730, 20020756, 3193514, 1624980, 236351, 54336, 7095], [-661521, -7543635, -29953629, -88480923, -83549682, -223758558, -135753310, -180768738, -124660699, -29388941, -62402747, 30393363, -17453738, 17694998, -2731870, 3930438, -223669, 402397, -7449, 15705], [-15821217, 61004484, -265442769, 453293982, -671275674, 1407545070, -542306214, 2016646506, -88166823, 1522503288, 91180089, 658485308, 53084994, 168552744, 11791314, 25148026, 1207191, 2012742, 47115, 66482], [15821217, 61004484, 265442769, 453293982, 671275674, 1407545070, 542306214, 2016646506, 88166823, 1522503288, -91180089, 658485308, -53084994, 168552744, -11791314, 25148026, -1207191, 2012742, -47115, 66482], [-715755, 97808331, 27500163, 627292227, 259516266, 1541686044, 566221768, 1937754842, 536760825, 1389325403, 267331925, 596374435, 75087996, 154800052, 11935630, 23623520, 998655, 1937459, 34053, 65481], [-9990927, 13019238, -56405943, -441638496, -194897718, -2012262126, -304635390, -3461988690, -196778049, -3024609738, -50124345, -1478898686, -808986, -418783860, 1818438, -67780378, 295401, -5787312, 14217, -201140], [715755, 97808331, -27500163, 627292227, -259516266, 1541686044, -566221768, 1937754842, -536760825, 1389325403, -267331925, 596374435, -75087996, 154800052, -11935630, 23623520, -998655, 1937459, -34053, 65481], [8463585, -89801031, -142755915, -402330987, -917472954, -275073702, -1568501810, 431490234, -1259019585, 727014287, -560140009, 439508991, -145835154, 137072830, -22025558, 23339538, -1779699, 2051657, -59235, 72585], [13670085, -58535142, 311798559, -458869806, 1305027630, -1416836958, 2100241088, -2033750596, 1702791225, -1552037296, 776785621, -681332624, 207300420, -177144782, 31956386, -26817034, 2623635, -2173810, 88389, -72576], [-12592020, 5778177, -200689998, 308049909, -530952876, 1305112428, -638267970, 2102441266, -418222590, 1704094497, -158121378, 777713569, -35038530, 207951588, -4457232, 32159852, -299502, 2650665, -8196, 89663], [-8376, -145143, 0, -1984833, 0, -6763380, 0, -9886332, 0, -7574149, 0, -3326801, 0, -864458, 0, -130732, 0, -10585, 0, -353], [22008474, 54298512, 298541511, 1133458272, 1060506387, 4213523391, 1606404909, 6231655746, 1247438982, 4730874033, 545967756, 2050478141, 139985934, 526330083, 20796687, 78814861, 1652277, 6333330, 54111, 210017], [-21883005, 248327631, 193619313, 3001048929, 1764518814, 9505239378, 3360969024, 13180347216, 2858537727, 9732909123, 1309752555, 4173932447, 344662668, 1068925596, 52004406, 160317994, 4170825, 12923433, 137379, 430079], [3647172, 60131655, 2453466, 739856205, -175966584, 2901105294, -430468458, 4628173584, -412100126, 3737954627, -204929178, 1698247247, -57634258, 451452628, -9203760, 69369358, -774986, 5681093, -26604, 191039], [28943604, -28794195, 582362226, -2066308425, 3176812278, -9351293946, 5795620566, -15017124132, 4967478720, -12002118807, 2321510580, -5401279331, 625777416, -1427059092, 96815934, -218545294, 7954470, -17871213, 267846, -600719], [10941489, 306713628, -200979711, 4314029580, -1236619062, 15393465120, -2069563650, 23031574956, -1622237349, 17901766428, -694965021, 7951703572, -171759894, 2086177992, -24393126, 318130016, -1845867, 25941228, -57567, 870232]];
    Rf_basisdens := [1, 13619376, 13619376, 1134948, 4539792, 4539792, 13619376, 13619376, 4539792, 13619376, 4539792, 4539792, 4539792, 4539792, 16752, 6809688, 13619376, 4539792, 13619376, 13619376];
    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_260_bk();"
function MakeCharacter_260_bk()
    N := 260;
    order := 12;
    char_gens := [131, 157, 41];
    v := [12, 9, 11];
    // 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_260_bk_Hecke();"
function MakeCharacter_260_bk_Hecke(Kf)
    N := 260;
    order := 12;
    char_gens := [131, 157, 41];
    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, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
    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, 0, 0, 0], [0, 0, 1, -1, 1, -1, 1, 2, -1, -1, 1, 1, -1, 0, 0, -1, 1, -1, 0, -1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1], [0, -1, -1, 1, -1, 2, -2, -1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 0, 0], [-1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0], [-1, 0, 0, 0, -1, 1, 0, -1, 1, 1, 0, 0, 1, -1, -1, 0, -1, 0, 0, 1], [1, 0, 0, -1, 0, 1, -1, -1, 0, 0, 1, 0, 2, 1, 1, 0, 0, 2, -1, 0], [0, 0, -2, 3, -1, 2, -1, -1, 0, 1, -1, 0, 2, 2, 1, 0, -1, 0, 2, 1], [-1, 0, 0, 1, -1, 0, -2, -2, -1, 0, 0, 0, 0, 0, -2, 0, 1, 0, 1, 0], [1, 1, 2, -5, 2, -3, 3, 4, -1, -1, 2, 2, -3, -2, -2, 0, 0, -3, -2, -1], [-1, 2, 0, 0, 1, 0, 2, 0, 2, 1, 0, 2, 1, 0, -2, 0, -2, -1, 0, 0], [1, 0, 0, -3, 1, -2, 1, 4, 0, -2, 2, 0, 0, -1, 0, 1, 0, -1, 0, -1], [-1, 2, 0, 2, 0, -2, 4, 3, 0, 1, 0, 0, 0, 0, -3, 0, -2, -2, 0, 2], [3, 0, 3, -3, 0, -3, 0, -1, -2, 0, 0, 0, -2, -1, 0, 0, 0, 0, -1, -1], [1, -1, 0, 1, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 2, 0, 1, -1, 0, 1], [3, -1, -2, 3, -2, 2, -6, 0, 0, 2, -2, -1, 2, 1, 6, 0, -1, 1, 2, 2], [-2, -1, 0, 1, 0, 0, -1, -2, 0, 1, -1, 0, 2, -1, -1, 1, 1, 0, 1, 3], [2, 1, 0, -4, 2, -4, 2, 1, -2, -2, 2, 0, -3, -1, 4, 1, -2, -1, -1, -2], [1, 0, 3, -1, 1, -2, -2, 1, -1, -1, 1, 1, -2, -1, 1, -2, 0, -2, 1, -2], [2, 3, -1, 1, 2, 2, 1, -1, 3, 3, -2, 0, 1, 3, 0, 1, -2, -1, -3, 1], [-4, -1, -4, 5, -2, 5, -1, -7, 4, 4, -2, -1, 7, 1, -1, 2, -3, 2, 2, 3], [-2, 0, -1, -1, 1, 0, -2, -2, 3, 0, 3, 1, 0, 1, -4, 0, 0, 2, 0, 0], [-2, 1, 3, 0, -2, 1, 1, 1, -1, 0, -2, -2, 0, -2, -3, 0, -1, 0, 0, -1], [-5, 0, -6, 8, -4, 7, -3, -4, 4, 4, -3, -1, 6, 2, 0, 1, -4, -1, 1, 5], [0, -1, -1, -1, -1, 0, -2, -3, 1, 0, 1, -1, 1, -1, -5, 1, -1, 3, 0, 0], [0, 3, -1, 4, -1, 3, -2, -3, 0, 2, -2, -1, 1, 2, 0, -1, 0, 1, 1, -2], [3, -3, 1, -3, -1, 1, 0, -2, 0, 0, -2, 0, -3, -2, 3, 0, 2, 3, 0, -4], [-2, -1, -1, 3, -2, 0, 3, 2, -3, -3, 0, -1, -1, 0, 4, -1, 3, 1, 2, 0], [3, 2, 3, -3, 3, -8, 7, 7, -5, -5, 4, 1, -4, -1, 2, -2, 1, -4, 0, -1], [3, 0, 2, 3, 4, -1, 3, 3, 2, 2, -1, 0, -1, 0, 0, -3, 1, -3, 0, 1], [5, -2, -5, 3, -3, 6, -1, -9, 5, 3, -3, -3, 5, 0, 1, 3, -1, 5, 0, 3], [7, 2, 11, -14, 10, -14, 7, 17, -10, -10, 11, 5, -13, -5, 0, -4, 7, -7, -4, -7], [3, -3, 6, -6, 1, -4, -5, 3, -4, -3, 4, 1, -4, -2, 1, -2, 3, 0, -1, -5], [-6, -2, -4, 2, -4, 8, -1, -6, 7, 4, -7, -4, 5, 4, -1, 4, -6, 5, 0, 2], [-2, -2, 4, -3, 2, -1, 4, 7, -3, -4, 1, 2, -5, -1, -1, -1, 3, -3, -1, -3], [2, -6, 1, -10, -3, -1, -2, 0, -4, -3, 2, 1, -2, -5, 3, -2, 4, 4, 0, -4], [1, 1, -1, 5, 4, 1, 1, 1, 4, 1, -1, 0, 1, 4, -1, 0, 0, 0, 0, 1], [3, 0, 5, -6, 3, -6, -1, 1, -2, -3, 4, -1, -4, -2, 5, 2, 3, 0, -1, -2], [2, 5, 5, -3, 10, -6, 8, 8, -1, -3, 6, 3, -4, 1, 2, -4, 2, -6, -3, -3], [-3, 0, -8, 9, -5, 6, -2, -9, 7, 5, -3, -2, 9, 2, -3, 1, -2, 5, 2, 4], [1, 2, -4, 8, 3, -2, 6, 4, 0, 1, 0, 5, -1, 2, 2, -3, 5, -4, 5, 4], [-2, 3, 0, 1, 3, 2, 7, 7, 2, 0, 0, 3, 0, 3, -4, 2, 1, -3, -2, 1], [-5, -9, -5, 3, -10, 10, -16, -19, 5, 5, -5, -4, 7, -3, 2, 3, 1, 11, 1, 6], [1, 5, 2, 3, 5, -1, 8, 5, 3, 2, -5, 1, -2, 1, 0, 0, -3, -5, 1, 2], [-4, 1, 0, 0, -1, 3, 0, 1, 2, -1, 0, 0, 0, 1, -2, 1, -2, 0, 0, 0], [-3, -5, -8, 5, -10, 6, -6, -8, 2, 3, -4, -4, 8, -1, 3, 1, -4, 10, 3, 4], [2, 1, 6, -4, 2, -10, 2, -1, -2, 1, 1, -3, -7, -6, -5, -3, 3, -2, -3, 1], [1, 4, 7, -4, 10, -6, 8, 6, 0, -1, 6, 5, -5, -1, -1, -4, 2, -5, -5, -2], [4, 0, 8, -13, 5, -8, 1, 5, -2, -4, 6, 1, -7, -4, -2, 4, 4, -1, -5, -4], [6, 0, -2, 3, -1, 3, -7, -13, 3, -2, 1, -2, 3, 0, -3, 0, 0, 1, 0, -2], [6, -7, 7, -14, 5, -10, 1, 7, -7, -10, 8, 2, -9, -4, 4, -4, 9, 5, 0, -9], [-4, -4, -8, 1, -8, 11, -14, -18, 5, 6, -6, -4, 8, 0, 3, 8, -3, 10, 0, 3], [-2, -1, -4, 9, -4, 4, -5, -7, 5, 3, -3, 2, 5, 3, 2, -1, 2, 3, 3, 2], [4, 1, 2, -2, 4, -8, 9, 5, -7, -6, 7, 4, -7, -4, 1, -4, 9, -3, 0, -3], [4, 5, 4, -5, 6, -5, 1, 2, -5, -3, 2, 1, -4, 0, 4, -1, 1, -1, 0, -4], [8, 6, 1, -1, 7, -6, 12, 5, -3, -2, 1, 3, -1, 0, 1, -3, 1, -5, 0, -3], [0, 3, -4, 10, -3, 6, -3, -7, 5, 8, -5, -4, 9, 3, -1, 3, -8, -1, -1, 6], [0, 2, -1, 2, -5, 4, -11, -11, 5, 7, 0, -1, 7, 0, -8, -1, -5, 2, 1, 0], [-3, 2, 3, 5, 8, -7, 15, 4, 1, -2, -2, 0, -5, -1, 4, -6, 1, -11, 1, 4], [4, -4, 2, -5, 0, 1, 2, 8, -1, -3, 8, 2, 3, 2, 1, -4, 2, 2, 0, -1], [-2, -3, -2, 7, -4, 2, -6, -9, -3, 0, -5, -4, 2, 0, -1, -4, 3, 4, 3, 5], [4, 4, 6, -11, 4, -8, 5, 5, -5, -4, 3, 3, -7, -2, 2, 2, 0, 1, -5, -6], [-3, -6, -7, -4, -2, 1, -12, -12, 2, 0, 4, 1, 3, 1, -7, 2, 2, 7, -2, 2], [1, -2, 3, 0, -4, 2, 3, 3, 0, 0, -3, -5, -1, -5, 2, 2, 1, -1, -2, 1], [1, -6, -11, 10, -7, 9, -9, -7, 2, 1, -2, -3, 6, 1, 9, 0, -2, 6, 2, 4], [3, 0, -9, 13, -5, 7, 5, -7, 7, 0, -10, -5, 4, 5, 5, 2, -6, 1, 2, 6], [-2, 4, 2, 1, 2, 1, -4, -6, 0, 2, 1, 0, 6, 3, -4, -1, 0, 0, -3, 4], [-1, -1, -2, 3, -4, 2, -4, -4, 0, 4, 2, 3, 8, 1, 0, 0, -1, 3, 2, -2], [-3, 0, -1, 5, -1, 4, 2, 2, 0, 1, -4, 0, 3, 5, -3, 0, 0, 1, 5, -1], [-8, 3, -1, 8, 5, 3, 2, 6, 4, 1, -1, 4, 1, 4, -4, -4, 2, -4, 2, 1], [-3, 2, -2, 4, -2, 4, -3, -11, 1, 2, -3, -2, 3, 3, 4, -1, 0, 0, 2, -1], [1, -2, -4, 0, 1, 0, 0, -4, -2, -2, 3, 4, -3, 0, -4, 0, 1, -1, 0, 1], [0, -1, -5, -5, 0, -1, 2, 3, -3, -6, 2, 3, -7, 0, 3, 3, 3, 3, -2, -2], [3, 4, -1, 1, -1, 0, -1, 3, -1, 1, -2, 0, -4, 1, -3, -2, -1, -2, -1, -2], [6, 6, 2, 0, -5, -1, -7, -5, -1, 3, -3, -2, 0, 0, -2, -2, 1, 1, -2, 3], [5, -7, -4, 4, -3, 10, -20, -5, 5, -1, -5, -5, 6, 5, 8, 5, -4, 6, 0, -2], [4, -1, -2, 5, -2, 5, -9, 1, 0, 4, 0, -3, 5, 3, 1, 0, -3, 2, 0, 3], [14, 1, 2, -9, 1, -6, 2, -2, -4, 0, 4, 1, -4, -3, 4, -3, 6, 4, -2, -2], [2, -6, -2, 14, -3, 2, -5, 5, -5, -1, -6, -3, 2, 0, 6, -3, 5, -2, 11, 6], [-2, 2, 6, -7, 11, -8, 15, 20, -7, -9, 11, 10, -8, 1, -5, -5, 9, -10, 1, -7], [-3, -2, -4, 4, -3, 4, -2, -2, 4, 3, -2, -1, 5, 0, 0, 1, -3, 2, 1, 4], [0, -4, -4, 5, -6, 5, -6, -2, 1, -1, 0, -2, 5, 0, 9, 0, 2, 6, 0, -1], [-5, -3, -2, 8, -4, 10, -16, -15, 7, 4, -8, -2, 2, 4, 8, 2, -1, 5, 2, 0], [6, -2, 11, -18, 5, -13, 4, 9, -10, -7, 9, 2, -9, -8, 1, -1, 4, -5, -8, -9], [13, -4, -4, 2, 1, 7, 3, -1, 2, 0, -6, -3, 5, 2, 15, 5, -3, 2, -3, -2], [-11, 1, -10, 13, -8, 8, -2, -4, 4, 11, -6, 1, 11, 5, -4, 0, -6, 3, 10, 8], [-7, -2, -7, -2, -10, 12, -12, -9, 12, 10, -5, 0, 9, 1, -9, 15, -11, 3, -1, 2], [1, -1, -2, 2, 2, 2, -1, -3, 4, 5, -6, -1, 3, 3, -1, 4, -5, 0, -1, -2], [4, 2, -4, 1, -6, 5, 8, 3, 3, 6, -5, 0, 2, 0, 8, 4, -4, 0, 0, 2], [-10, 2, -10, 11, -4, 6, -3, 7, 3, 0, -5, -4, 4, 4, 4, 2, -8, -2, 2, 8], [7, 0, -4, 2, -1, 2, -8, -8, 2, 0, 3, -4, 3, 0, 2, 0, -1, 1, 0, -1], [-1, -4, 4, -6, 4, -11, -2, -1, 2, -3, 7, 3, -4, -6, -1, -3, 8, -1, -3, 1], [-2, -3, 3, 7, -5, 4, -10, -9, -3, 2, -7, -3, 1, 1, 11, -1, 7, 1, 4, 4], [4, -1, 10, -11, 14, -15, 11, 21, -10, -11, 12, 4, -14, -2, 5, -2, 6, -5, -4, -3], [-8, 4, 12, -5, 4, -13, 4, 0, -9, -7, 9, 4, -10, -4, 5, -8, 2, -12, 0, -4], [8, 1, 1, -2, -3, 0, -7, 2, -9, -2, 3, 0, 0, 0, 1, -1, 6, 8, 0, -3], [-7, -6, -7, 0, -12, 9, -15, -16, 0, 10, -5, 3, 11, 0, -4, 3, 0, 15, 3, 5], [1, 11, 17, -17, 21, -24, 32, 16, -6, -12, 11, 8, -19, -8, -2, -10, 6, -18, -10, -6], [12, -8, -5, -7, -5, 1, -1, -6, -3, -3, 9, -1, 5, 0, 8, 1, 3, 5, 0, 3], [4, 10, -1, 8, 6, -5, 13, 11, -2, 1, -2, 1, 0, 1, -5, -2, -1, -9, 0, 6], [-19, 1, -10, 11, -6, 12, -16, -10, 10, 9, -8, -1, 11, 5, -12, 2, -8, -3, 0, 8], [-6, -5, 6, -9, 2, -8, 1, 3, -2, -6, 5, 2, -4, -5, 7, 3, 4, 3, -2, -2], [-5, 7, 18, -11, 14, -14, 12, 26, -7, -7, 3, 10, -16, 0, -2, -5, 7, -10, 0, -9], [6, -1, -1, 2, -4, 3, 6, -1, 2, 5, -2, -4, 6, 2, 3, 6, -7, -1, -4, -2], [-3, 4, 0, 3, 3, -8, 3, 3, -7, 0, 2, 4, 1, 4, -10, -4, 3, -3, 4, 3], [-5, -1, 8, 2, 5, -2, -1, 1, 3, 6, 3, 3, 4, -3, -6, -2, -1, -3, -2, 1], [11, -6, 1, -5, -3, 0, -6, -3, -7, -7, 5, -3, 0, -5, 13, -2, 6, 4, -3, -2], [-15, 9, 0, -2, 2, -4, 8, 6, 3, 6, 0, 5, -1, -5, -8, -2, -6, -10, -2, 6], [-6, 2, 7, -1, 5, -4, 2, 2, -3, 0, -9, -5, -10, -5, -18, 2, 2, -4, -2, 2], [-1, -2, -2, 1, -2, -2, 2, -1, 4, 5, 1, 1, -1, 2, -4, 1, -1, 1, 1, -2], [-8, 5, 0, 2, 2, 1, 13, 6, 4, 3, -4, -2, 6, 0, -13, 1, -5, 0, 0, -3], [1, -1, 14, -15, 7, -13, 6, 3, -5, -8, 5, 5, -10, -3, 4, -2, 9, -5, -5, -6], [0, -1, 2, 1, -2, 0, -8, -8, -5, 0, -5, -5, -5, -2, -13, 2, 1, 5, 3, -1], [7, 0, 8, -6, 5, -6, -2, 10, -6, -4, 3, -2, -5, 0, 6, 0, 5, -5, 0, -5], [-1, 8, 18, -12, 17, -17, 17, 23, -5, -9, 8, 14, -19, -3, -4, -7, 10, -13, -3, -8], [-2, 6, 2, -4, -2, -4, 8, 4, -6, 0, 6, 0, -2, -2, -3, -2, -2, -4, -2, 4], [-10, 1, 7, -7, 0, -6, -23, -1, -7, 6, 7, 3, 4, -3, -11, -3, 1, 0, 0, -2], [10, -6, 4, -13, -7, -4, -9, -8, -7, -3, 0, -6, -4, -2, 8, 6, -1, 10, -1, -6], [7, -7, 3, -11, 1, -9, 0, -2, -2, -5, 10, 2, -3, -6, 3, -2, 8, 1, -3, 0], [4, 6, 7, -4, 9, -14, 25, 7, -6, -2, 6, 6, -8, -7, -4, -7, 8, -8, -1, -1], [-1, -5, -13, 0, -2, 4, -3, 0, 1, -3, -2, 2, -5, 0, 3, 2, -1, 5, 2, 2], [-2, 7, 3, -7, 14, -12, 17, 12, -3, -9, 1, 2, -21, 0, -6, 2, 3, -16, -5, -1], [6, -5, -3, 0, -5, 14, -3, -3, 5, 4, -2, 0, 5, 6, 6, 0, -1, 9, 0, -5], [-3, 4, -1, 8, -7, 6, -1, -3, 4, 3, -2, -1, 10, 2, -9, -2, -3, -2, 3, -2], [8, 5, 0, 0, 13, -5, 18, 16, -2, -5, 6, 7, 0, 6, -4, -7, 8, -3, 3, -4], [-5, 2, 0, 13, 7, 3, -4, -4, 3, 0, -5, 2, -5, 2, -1, -6, -2, -13, 6, -2], [-6, 4, -2, 1, -3, -2, -11, -8, -9, -1, -3, 0, -10, -1, -9, -1, 5, 2, 1, -5], [-9, -4, -11, 13, -6, 18, -10, -16, 9, 9, -9, -2, 7, 1, -6, -1, -6, 5, 3, 5], [7, 1, 4, 1, 2, 2, -4, -12, 4, 1, -4, -5, 5, -1, -4, 0, -6, -1, -2, -2], [-15, 0, -3, 13, 0, 11, 4, 4, 11, 0, 3, 3, 3, 3, -15, -4, 1, -6, 4, 1], [1, 1, 23, -22, 14, -19, 12, 23, -11, -12, 13, 7, -23, -10, -10, -7, 13, -6, -5, -11], [4, 1, 4, -15, 8, -15, 12, 0, -5, -11, 11, 4, -9, -7, 0, 3, 0, -5, -4, -4], [-7, 2, 11, -13, 9, -13, 6, 5, -8, -10, 8, 3, -11, -2, 15, -1, 8, -4, -3, -9], [6, -1, -11, -1, -3, 4, -8, -7, 4, 1, 2, -2, -3, 0, 2, -2, -4, 7, -3, -2], [1, 2, 14, -22, 14, -16, 22, 26, -13, -12, 14, 6, -18, -3, -14, -3, 10, -8, -3, -8], [-6, -6, -2, 14, -7, 9, -4, -8, 5, 6, -7, -6, 16, 0, 3, -6, -5, 5, 8, 7], [-8, 5, -3, 3, -4, 2, -5, 3, 3, 0, -3, -1, -4, 1, -3, 1, -5, -4, 0, 6], [-10, -2, 1, 7, -3, 0, 17, 2, 3, 0, -3, 3, -6, 0, -5, 0, 1, -4, 3, -2], [-6, -5, 10, 2, 3, -14, -3, 3, -16, -12, 8, 0, -8, -9, -5, -10, 14, -2, 9, -2], [9, 7, 24, -34, 26, -32, 22, 18, -11, -19, 25, 13, -24, -12, -2, -1, 11, -12, -13, -17], [14, -2, -4, -5, 6, -1, -4, 2, 1, -2, 0, -10, -8, -4, 13, 0, -7, -2, -8, 5], [8, 1, -8, 16, -5, 14, 12, -2, 4, 5, -8, 1, 8, 10, 4, -1, -6, -3, 5, 2], [-4, -2, 6, -6, -1, -9, 13, 13, -10, -1, 4, 4, -6, -3, -7, -2, -1, -6, -3, -1], [7, -8, -7, 2, -10, 5, -8, -8, -2, 0, 2, -1, 9, -1, 23, -4, -2, 7, 4, -2], [1, 1, 6, -2, 10, -7, 13, 13, 1, 0, -3, 7, -8, 0, 1, -7, 1, -4, 7, -5], [-2, 9, 6, 7, 6, -2, 11, 0, 4, 5, -1, 0, -2, 3, -1, -11, -3, -12, -3, 1], [-1, -1, 13, -18, 16, -18, 8, 22, -13, -20, 15, 4, -16, -4, 6, -4, 13, -5, -4, -13], [6, 2, 1, -9, 7, -6, 4, 6, -1, -10, 14, 7, -7, -3, 2, 0, 6, -4, -6, -9], [2, 2, 7, -9, -3, -7, 7, 7, -3, 0, 2, -5, -2, -5, -9, 6, -3, -4, -6, -3], [3, 2, -3, 0, 4, -1, 12, 12, -4, 0, -2, 5, 1, 5, 3, 2, 2, -3, -2, 2], [7, 2, 12, -28, 5, -14, 6, 12, -4, -7, 10, 3, -11, -9, -19, 9, 1, -7, -12, -11], [-11, -11, -15, 12, -14, 15, -12, 8, 7, 9, -8, -6, 13, 0, 2, 6, -9, 9, 6, 14], [3, -6, -13, -2, -10, 13, -4, -14, 4, 5, -1, -1, 17, 1, 13, 2, -3, 7, 0, 9], [-19, 3, 2, 13, -12, 2, 5, -5, -5, 15, -9, -2, 6, 0, -5, -2, 5, -2, 11, 9], [11, -8, 13, -17, -1, -10, 7, 5, -3, -5, -1, -3, -13, -8, -9, 3, 7, 9, -4, -11], [11, 6, -12, 5, 3, 4, 5, -3, 7, 0, -2, -2, 9, 2, 2, 2, -5, -1, 2, 5], [-11, -1, 1, -9, 5, 4, 2, 7, -1, -3, 1, 0, 9, 2, -2, 2, -6, 1, 2, 1], [-6, -7, 2, -1, -4, 2, 5, 5, -3, -3, -1, 0, -2, -2, -5, 0, 3, 0, -2, -3], [3, -3, 11, -11, 4, -17, 13, 5, -8, -5, 5, 4, -11, -18, 1, -8, 10, -10, 0, 1], [4, 8, 11, -16, 6, -13, 5, 11, -2, 0, 0, 5, -15, -3, -1, 0, 4, -3, -6, 2], [-17, -6, -22, 28, -22, 26, -15, -13, 20, 18, -19, -8, 28, 5, 4, 3, -14, 12, 8, 17], [-7, -12, -19, 17, -21, 26, -24, -26, 12, 9, -16, -18, 20, 4, 4, 9, -7, 20, 4, 8], [-17, -1, -23, 15, -13, 18, 1, -15, 4, 4, -7, -8, 15, 8, 6, 8, -13, 5, 8, 13], [1, 11, 16, -5, 19, -2, 12, 20, 4, -1, 6, 8, -12, 2, -1, -2, 7, -14, -6, -9], [0, 15, 3, 14, 7, -12, 14, 11, -7, 5, 1, 9, 0, 1, -4, -8, 4, -17, 9, 11], [-10, 4, 8, -11, -2, -8, -13, 13, -11, 0, 5, 4, -14, -4, -4, -4, 8, 0, -4, -8], [0, 7, 4, 8, 10, -4, 20, 17, -4, -3, -3, 7, -3, 0, 3, -7, 3, -12, 7, 3], [-5, 6, 21, -25, 21, -20, 35, 41, -15, -15, 14, 10, -27, -8, -16, -5, 6, -19, -8, -9]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_260_bk_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_260_2_bk_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_260_2_bk_c(:prec:=20)
    chi := MakeCharacter_260_bk();
    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_260_2_bk_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_260_2_bk_c( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_260_bk();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<3,R![21904, -210160, 701300, -937744, 690777, -374306, 46432, 76600, -9730, 43502, 14776, 5410, 2867, -1366, -500, -106, -26, 28, 8, 2, 1]>],Snew);
    return Vf;
end function;