
// Make newform 525.2.t.i in Magma, downloaded from the LMFDB on 20 April 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_525_t();"
// To make the character of type GrpDrchElt with Codomain the HeckeField, type "MakeCharacter_525_t_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_525_2_t_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_525_2_t_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 := [59049, -59049, 52488, -32805, 13122, -10935, 4779, -3969, 2439, -990, 879, -330, 271, -147, 59, -45, 18, -15, 8, -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, 0, 0, 0], [-2464806686499, 599378376969, -803723866875, 384056772921, 40151613411, 281150210007, 10653923250, 69283377747, -33384337245, -3319073817, -20089418685, -269186809, -4099076013, 1784001634, -84223107, 782497053, -178469865, 207082363, -72492309, 1853159], [1076681692251, -667140004431, 384817926195, -282366698139, 18265918041, -118545320313, 36086204970, -23153332023, 25788817935, -79947147, 8943284355, -2462906579, 1426349307, -1446509806, 39501603, -390130047, 162636525, -102401257, 61404921, -2890481], [59049, -52488, 32805, -13122, 10935, -4779, 3969, -2439, 990, -879, 330, -271, 147, -59, 45, -18, 15, -8, 3, -1], [-124216368696, 92474657478, -38564923041, 41293402371, -1805530743, 13466295414, -6743006658, 1438739154, -4201583028, -89891217, -1012493701, 489293341, -76798004, 238842869, -3024666, 45356994, -26175683, 10136753, -9492577, 374590], [509072412114, -271250675046, 204440197941, -124876597023, 16605413991, -55791799488, 15025147218, -13217647248, 11507231808, -1194612159, 3624629931, -1113196403, 697566510, -656325622, 77059980, -155915910, 82657113, -46092229, 29688735, -2966978], [355360385574, -180410146155, 73006049088, -78345971172, -10911411990, -36567897120, 9120856554, -3725742870, 8437703904, 1440577464, 2697370908, -544812407, 197199084, -469349338, -56817684, -116224794, 41399964, -22354921, 14554602, 2492884], [-765386918172, 11945829213, 4121130312, 22207017429, 77237978652, 53776060299, 10898216496, -637275906, -6148178559, -7221677838, -3849224523, -735345046, 293172405, 287243806, 398769120, 154835325, 2957256, -8014193, 2527920, -21499201], [-947420203239, 762840521901, -614173182651, 318670771293, -104493039201, 120032916903, -44804773998, 45077323383, -24491341773, 9268474899, -8554053441, 3744554183, -2826353985, 1385843422, -624893895, 339079005, -240890493, 152828659, -79809225, 27539963], [904054086198, -521030864691, 341042227794, -222561640575, 33589174851, -95519799828, 29096927082, -23687023383, 19508200992, -2659586190, 6717166134, -2142427705, 1437462984, -1048450580, 211344786, -285153219, 143285262, -91433180, 46525242, -6949924], [652108733748, -1158564166353, 503763071580, -391909986657, 192634419348, -52535856339, 113434023780, -20806056054, 31564620855, -16612846806, 2693245815, -8371489802, 1330813251, -1740119938, 910346184, -164187981, 372589440, -129442891, 95677968, -32879723], [-40868304975, -102097203786, 72813177558, -26276498091, 36378032391, 2290610907, 11676129804, -5256258948, 525114144, -3830738928, -419155827, -888879001, 387779451, -21733274, 216742059, 13831884, 38614374, -20556833, 7140033, -8368807], [-502981146909, 191068978356, -26899173441, 105904455858, 41723645859, 46567327518, -11339948178, -3849238197, -13750818258, -4956108981, -3739936496, 836744553, 372543320, 831431112, 276030855, 159350880, -48045703, 2684874, -22667405, -11337162], [229996215855, 265428080604, -54227986677, 66332338884, -67695711039, -28688453748, -35617343346, -1448555013, -4355149386, 6526917327, 2233525978, 2559235259, -4499734, 261593596, -345761901, -66762696, -89227951, 18111052, -19113527, 13359008], [12587088231, -120059314722, 47688615378, -38514509775, 21927531222, -1522072971, 12399307749, -1497380301, 3064946289, -1889346930, 53366848, -921485620, 104008103, -188904650, 104206842, -9306003, 38000174, -11171750, 10401259, -4364263], [3330104729184, -2315778518493, 1672911130392, -905279639445, 307085679468, -342634173039, 155423928276, -119635003854, 70267045131, -28217392590, 22673122467, -12113832170, 7161353247, -3921970870, 1744377048, -965748537, 712644156, -427903495, 209020536, -58406807], [19282234437, -18850993029, 11255719176, -7173837495, 2424280509, -2133087372, 1432221048, -696840777, 572521473, -217352190, 140771301, -104042195, 44283756, -32722690, 13684149, -6383691, 5590548, -2952415, 1702863, -512306], [4885937721099, -3286594945926, 2125740933711, -1411166110878, 276100606341, -522411012918, 224407778778, -136208553093, 121239263448, -23975322969, 36037158696, -16879337693, 8278146360, -6695422312, 1715499495, -1529646570, 1004261433, -551423314, 309643545, -64124558], [1110298392927, -1128535799049, 594075294171, -425152745325, 128370832209, -113728598127, 92101089978, -31464490707, 37342884693, -10479456495, 7923685361, -6780884995, 1895278741, -2147271410, 620275959, -373629261, 333804013, -149123135, 102887633, -23316511], [2591067895821, -2785643680563, 1606462584291, -1078314717861, 381284114733, -276936711669, 233631858978, -93541863429, 86443730163, -35237167683, 18471947001, -17359908211, 5860397019, -4832801114, 2117657241, -814897359, 872092833, -407516183, 249408237, -81059545]];
    Rf_basisdens := [1, 74996560260, 74996560260, 19683, 6249713355, 37498280130, 18749140065, 74996560260, 74996560260, 18749140065, 74996560260, 18749140065, 24998853420, 24998853420, 6249713355, 74996560260, 635564070, 74996560260, 24998853420, 74996560260];
    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_525_t();"
function MakeCharacter_525_t()
    N := 525;
    order := 6;
    char_gens := [176, 127, 451];
    v := [3, 6, 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_525_t_Hecke();"
function MakeCharacter_525_t_Hecke(Kf)
    N := 525;
    order := 6;
    char_gens := [176, 127, 451];
    char_values := [[-1, 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, 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, -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, 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, -1, 1, -1, 0, 1, 0, 1, 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, -1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0], [0, 0, 0, -1, 3, 0, 0, 1, -1, 1, 2, 1, -2, 0, 0, -2, 0, 1, 1, -1], [-1, 1, 0, 2, -1, 1, -1, -2, -1, 0, -2, 1, 0, 0, 0, 0, 1, 0, 0, 0], [0, -1, 0, -2, 3, 0, 1, 0, -1, 0, 2, 0, -2, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, 0, 1, 0, -2], [3, 0, 0, -1, -1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0], [1, 0, 0, 0, 2, -2, -1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0], [2, 0, 0, -1, 0, 0, 1, 1, -1, 1, 0, 3, -1, 0, -2, -1, 0, -3, 2, 1], [1, -1, 0, -1, 0, 0, -2, -2, -2, 1, 1, 2, 0, 0, -1, 0, 0, -3, 0, 0], [-2, 1, 0, 2, 3, 0, -2, 1, 0, 2, 0, 0, -1, 0, 2, -1, 0, 3, -1, -2], [0, -2, -2, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 1, 1], [-1, 0, -2, -2, 2, 0, 1, -1, 0, 0, 1, -1, 2, -2, 1, -2, 0, 0, 1, 1], [-5, 1, 0, -2, 1, 0, -2, -1, 0, 2, -2, 3, 0, 0, 2, 0, 0, 1, 0, 0], [-1, 0, 0, 0, 0, -1, -1, -1, 1, 1, -2, -3, 0, 0, 1, 0, 0, 1, 0, 0], [2, -1, 0, 0, -6, 0, 1, -1, 1, -3, -1, -1, 2, 2, -2, 2, 0, -2, 0, 2], [-3, 2, 0, 0, 0, 0, 1, 1, 0, 0, -1, -2, 0, 0, 1, 0, 0, 2, 0, 0], [5, 1, 0, 0, -1, -1, 0, -1, -2, 2, 0, 7, 0, 0, -2, 0, 1, -1, 0, 0], [-1, 4, 4, 5, -6, 0, -3, 1, 3, 2, -4, 1, 1, -2, 1, 1, 0, 1, -2, -1], [-2, 1, 2, 2, 3, 0, -2, 1, 0, 2, 0, 0, -1, -4, 2, -1, 0, 3, -1, -2], [0, -1, 0, 2, -4, 0, 1, -3, -1, 0, -1, -1, 0, 0, -1, 0, 0, -2, 0, 0], [1, 0, -2, 3, -5, 0, -1, 0, 1, -1, -3, 0, 2, -2, -1, 2, 0, -1, -1, 1], [-1, 0, 0, 8, -4, 3, 0, -4, -4, -4, 0, 5, 0, 0, -4, 0, 3, -4, 0, 0], [-1, 0, 2, 4, -5, 0, -2, 1, 3, -1, 0, -2, 1, 0, 1, 1, 0, 3, -1, 0], [1, 0, 0, 6, -6, 2, 1, -5, -1, -1, -4, -1, 0, 0, -1, 0, 0, -1, 0, 0], [2, -2, 0, 3, -2, 0, -1, 1, -1, -1, -2, 1, 0, 2, -2, 2, 0, -1, 0, 0], [1, -1, 0, 1, 0, 0, -2, -2, -2, 0, 1, 2, 0, 0, -2, 0, -1, -3, 0, 0], [-3, 2, -2, 2, 3, 0, -2, 1, 1, 3, 0, 0, -2, 4, 3, 0, 0, 3, 0, -4], [1, 2, 4, -1, -3, 0, 1, 0, 1, 1, -1, 2, 0, -4, -1, 0, 0, -3, -2, 4], [1, 1, 0, -2, 4, 2, -1, 3, 1, 1, 1, 3, 0, 0, 0, 0, -1, 2, 0, 0], [-1, 2, 4, 2, -5, 0, -1, -2, 2, -1, -4, -2, 3, 0, 1, 3, 0, 0, -3, 0], [1, 0, 0, 3, -3, 3, 1, -2, -3, -3, 1, 1, 0, 0, -1, 0, 0, -3, 0, 0], [-4, 2, 0, 0, 0, 2, 2, 2, 1, -1, -1, -4, 0, 0, 2, 0, -4, 3, 0, 0], [-6, 0, 0, 0, -1, -3, 0, -1, -1, 1, 0, -5, 0, 0, -1, 0, 3, -1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, -2, 1], [1, 0, 2, -2, -3, 0, 2, -1, 1, -1, 0, 0, 4, -4, -1, -2, 0, -3, -2, 8], [-2, 4, -4, 0, 0, 0, -2, -2, 0, 0, -2, -2, 0, 4, 2, 0, 0, 4, -4, -4], [-2, 1, 0, 1, -2, 0, 2, 0, -2, 0, 1, -6, 0, 0, -2, 0, 0, -1, 0, 0], [-2, 0, 4, 2, -4, 0, -1, -1, 3, -2, 0, -4, 5, 0, 2, -1, 0, 3, 1, 0], [1, 0, 0, -1, 1, -2, 1, 2, 1, 1, 1, 6, 0, 0, -1, 0, 0, 1, 0, 0], [1, -2, 0, 4, 2, 0, -2, 2, -2, 1, -2, 2, -2, 0, -1, 2, 0, 0, 0, -2], [-3, 4, 0, 1, 1, 1, 1, 2, 0, 0, -2, -2, 0, 0, 1, 0, -2, 4, 0, 0], [10, 2, 0, 1, 0, 0, 1, 1, 1, 0, -2, -1, 0, 0, 1, 0, -5, 3, 0, 0], [-5, 2, 0, -4, 8, -10, -2, 6, 2, 2, 2, -8, 0, 0, 0, 0, 5, 4, 0, 0], [-1, 0, 2, 1, -9, 0, 1, -4, 4, -4, -4, -5, 4, 2, 1, 8, 0, -2, -4, 2], [0, 1, 0, -4, 2, -2, -3, -1, 0, 3, -2, -3, 0, 0, 3, 0, -2, 1, 0, 0], [4, -2, -2, -6, 12, 0, 3, 3, -7, 4, 4, 8, -5, 0, -4, -7, 0, -5, 7, 0], [2, -1, 0, 1, -4, 0, 0, 0, 0, -2, -1, 0, 4, -4, -2, -2, 0, -1, 0, 4], [2, -4, 0, -1, -1, 2, 0, -1, 1, -1, 2, 0, 0, 0, 0, 0, -4, -3, 0, 0], [-3, -1, 0, 3, 0, 0, -2, 0, 2, -1, 1, -4, -1, 0, 3, 3, 0, 5, -6, 1], [-1, -1, -4, 2, 2, 0, -1, 1, 0, 1, 0, 0, 1, 8, 1, -1, 0, 1, -1, 2], [-5, 8, 0, 4, -2, 0, -5, -1, 3, 3, -4, -2, 0, 0, 5, 0, 0, 7, -8, -4], [-3, 0, -2, -4, -6, 0, 3, -5, 5, -5, 2, -8, 2, -2, 3, 6, 0, 1, -3, 1], [-5, 2, 0, 6, -3, 2, -1, -4, -2, -1, -4, 6, 0, 0, -1, 0, 2, 0, 0, 0], [4, 0, 0, 10, -10, 6, 4, -6, -3, -3, -3, 2, 0, 0, -4, 0, 0, -3, 0, 0], [-3, 3, 0, -2, 8, 0, -1, 1, -1, 4, 3, 1, -1, -4, 3, -7, 0, 4, 0, -1], [-4, 4, 0, 2, 2, -5, -2, 0, -2, 2, -2, 1, 0, 0, -2, 0, 10, 2, 0, 0], [3, -6, -4, -3, 6, 0, 3, 3, -3, 0, 6, 3, -4, 2, -3, -2, 0, -3, 4, 4], [5, -1, 0, 5, -10, 4, 4, -6, -4, -5, -1, 6, 0, 0, 1, 0, -2, -5, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0, 4, 0, 0, -2, -2], [3, -5, 0, -8, 4, -4, 7, 11, 6, -1, 10, -2, 0, 0, -1, 0, -4, 1, 0, 0], [1, 1, -2, 0, 0, 0, 0, 0, -1, 1, -2, 2, 4, 0, -1, -4, 0, -2, 4, 0], [-6, 1, 0, 0, 2, -5, -3, -1, -2, 5, 0, -1, 0, 0, -5, 0, 5, -1, 0, 0], [8, -2, 0, -15, 0, 0, 3, 3, 3, 5, 2, -3, 0, 0, 8, 0, -4, 1, 0, 0], [1, 2, -2, 0, -4, 0, 1, 1, 2, 2, -1, 3, 0, 2, -1, 0, 0, -4, 5, -1], [-1, -6, 0, -1, 2, 4, -7, -5, 7, 2, -6, 5, 0, 0, 5, 0, -2, 1, 0, 0], [-1, 0, -2, -1, 3, 0, 1, -2, -1, 1, -3, 0, 6, -2, 1, -2, 0, -3, 1, 3], [4, -1, -4, -6, 11, 0, 3, 2, -7, 4, 2, 8, -3, 0, -4, -7, 0, -6, 7, 0], [-11, 8, 0, -1, -1, 0, 3, 2, -2, 2, -4, -5, 0, 0, 3, 0, 0, 6, 0, 0], [-5, -1, 0, 0, 3, -2, -4, -1, 0, 4, 0, -1, 0, 0, -4, 0, 2, -1, 0, 0], [-8, -2, 0, 9, 0, 0, -3, -3, -3, -4, 2, 3, 0, 0, -7, 0, 3, -5, 0, 0], [1, 1, 2, -2, -2, 0, 1, -1, 0, -1, 0, 0, -2, -4, -1, 2, 0, -1, 2, -4], [3, -4, -8, -3, 1, 0, 3, 0, -2, -2, 2, 1, 0, 8, -3, 0, 0, -4, 1, 5], [-9, -2, 0, 2, -1, 2, 1, 0, -2, -3, 4, 12, 0, 0, -3, 0, 2, -4, 0, 0], [1, -1, 8, -4, 6, 0, 2, 0, -3, 1, 2, 2, -3, 0, -1, -1, 0, -2, 1, 0], [0, -4, 0, -2, -2, 4, 6, 4, 6, -6, 2, -9, 0, 0, 6, 0, -8, 2, 0, 0], [1, 2, 4, 7, -6, 0, -3, 5, 3, 4, -2, 5, -3, -2, -1, 1, 0, -1, -2, 3], [4, 7, 0, 4, 0, 0, 3, 3, 3, 0, -7, -3, 0, 0, 3, 0, -2, 10, 0, 0], [-6, 6, 2, 8, -2, 0, -6, 2, 5, 5, -3, -1, 0, -2, 6, 0, 0, 7, -4, -4], [-10, -1, 0, -3, 6, 0, -4, 2, 4, -2, -1, -16, 0, 0, 6, 0, 0, 3, 0, 0], [11, -3, 0, -2, 1, -3, 6, 7, 4, -2, 6, -9, 0, 0, -2, 0, -3, 1, 0, 0], [-3, 4, 2, 4, -11, 0, -2, -5, 5, -3, -8, -6, 10, 0, 3, 4, 0, 1, -4, 0], [5, -2, 0, 4, -6, 0, -2, 2, -2, -3, -2, 2, -3, 2, -5, 3, 0, 0, 0, -3], [9, 1, 0, 0, -5, 6, 3, -2, -3, 0, 0, 9, 0, 0, 0, 0, -6, -2, 0, 0], [-2, 2, -4, 5, -4, 0, -3, 1, 3, 1, -2, -1, 0, 2, 2, 2, 0, 3, -4, 0], [2, 6, 0, 16, 0, 0, -4, -4, -4, -3, -6, 4, 0, 0, -7, 0, 9, 2, 0, 0], [5, 0, -2, -6, -7, 0, 4, -3, -1, -5, 0, 0, -2, 4, -5, 4, 0, -5, 4, -4], [-2, 0, -4, -6, 14, 0, 2, 0, -4, 4, 4, 2, -2, -4, 2, -6, 0, 0, 3, -1], [-6, 0, 0, -1, 1, 2, -6, -5, 4, 4, -9, 0, 0, 0, 6, 0, 0, 4, 0, 0], [2, 0, 0, -2, -8, 0, 2, -2, 2, -4, 0, -2, -2, -12, -2, 6, 0, -2, 0, -2], [10, 1, 0, 0, -10, 7, 7, -3, -4, -3, 0, 7, 0, 0, 3, 0, -7, -3, 0, 0], [-4, -1, 8, 7, -2, 0, -4, 2, 4, 0, 1, -4, 2, -4, 4, 0, 0, 7, 0, -2], [0, 6, -4, -4, -2, 0, 0, -2, 0, 0, 0, 0, 0, 8, 0, -4, 0, 2, -4, 0], [2, 0, -4, 6, -10, 0, -2, 0, 2, -2, -6, 0, 8, -4, -2, 0, 0, -2, 0, 4], [-13, -1, 0, -4, 2, 2, -2, 0, -1, 1, 2, 12, 0, 0, 1, 0, 2, -2, 0, 0], [11, 5, 0, 0, -9, -2, 7, -2, -7, 0, 0, 11, 0, 0, 0, 0, 2, -2, 0, 0], [-3, -4, 0, -2, 0, 0, 0, 0, 0, -1, 4, 0, 0, 0, -1, 0, 2, -4, 0, 0], [1, 2, -4, -3, -1, 0, 1, -2, -1, -1, -1, 0, 0, 4, -1, 0, 0, -1, 4, -6], [-1, 0, 4, -2, -4, 0, 1, -1, 3, -3, 4, -4, 2, 4, 1, -2, 0, 3, 1, 1], [-1, 0, 8, -2, 1, 0, 1, -2, 0, -1, 0, -2, -3, 0, 1, 5, 0, 0, -5, 0], [-8, 0, 0, -12, 12, -3, -8, 4, 4, 4, 0, 7, 0, 0, 8, 0, 0, 4, 0, 0], [-11, 8, 0, 11, 11, -6, -5, 6, 2, -2, -4, -5, 0, 0, -5, 0, 12, 10, 0, 0], [-3, 14, -4, 5, -14, 0, -5, -5, 5, 2, -14, -1, 4, 2, 3, 6, 0, 1, -12, -4], [-4, 4, 0, 4, 8, 0, -6, 2, -2, 4, 0, 0, -6, 0, 4, -2, 0, 10, -2, -12], [4, -6, 2, -2, 0, 0, 4, 2, -1, -1, 3, 3, 0, -2, -4, 0, 0, -7, 9, 3], [0, 0, 0, -1, 2, -8, -1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 4, 1, 0, 0], [3, -1, 0, -10, 5, -7, 3, 8, 7, 4, 2, -7, 0, 0, 4, 0, -7, 6, 0, 0], [-2, 0, 0, -7, 7, -4, -2, 5, 4, 4, 1, -4, 0, 0, 2, 0, 0, 4, 0, 0], [0, -4, 0, 1, -6, 0, 3, -3, 3, -3, -4, -3, 8, -6, 0, 6, 0, -7, 0, 8], [-7, 6, 0, 0, 0, -6, -1, -1, -4, 4, -3, 1, 0, 0, -1, 0, 12, 2, 0, 0], [0, 6, 0, 11, 0, 0, -9, -9, -9, 2, -6, 9, 0, 0, -7, 0, 9, -3, 0, 0], [-1, 0, 2, -1, 3, 0, -1, -2, -2, -2, 0, -3, 0, -2, 1, 0, 0, 4, 0, -6], [8, 1, 0, 8, -16, 6, 9, -7, -9, -4, 1, 7, 0, 0, -5, 0, -3, -8, 0, 0], [0, 0, -8, -3, 15, 0, 0, 3, -6, 6, 3, 6, -6, -8, 0, -6, 0, 0, 3, -3], [-4, 3, -10, 0, -7, 0, 0, -7, 4, -4, -6, -8, 7, 0, 4, 7, 0, 1, -7, 0], [4, -3, 0, 2, -10, 0, 1, -1, 1, -5, -3, -1, 7, 2, -4, 1, 0, -4, 0, 7], [17, 2, 0, -2, -2, 4, 5, 3, 2, -2, -1, 4, 0, 0, 5, 0, -8, 4, 0, 0], [10, -5, 0, 2, 0, 0, 1, 1, 1, -4, 5, -1, 0, 0, -3, 0, -10, -4, 0, 0], [-2, -1, 0, 2, 1, 0, 0, 1, 2, 2, 0, 0, 6, 0, 2, -4, 0, -1, -4, 12], [4, -2, 4, -9, 3, 0, 4, -5, -6, -6, 1, -2, 0, -4, -4, 0, 0, -2, -1, -1], [8, -3, 0, 12, -6, 3, 8, 2, -1, -9, 6, 1, 0, 0, -9, 0, 3, -4, 0, 0], [-3, 0, 0, -1, 4, 0, 1, -1, 1, 2, 0, -1, 1, 8, 3, 1, 0, -1, 0, 1], [4, -11, 0, 0, -18, 10, 5, -13, -2, -3, 0, 1, 0, 0, 3, 0, -10, -13, 0, 0], [0, -3, 0, 4, 5, 0, -3, 2, -3, 0, 0, 0, 1, 0, 0, -3, 0, 4, -3, 2], [7, 3, 0, -2, 4, -14, 1, 5, -1, 5, 3, 13, 0, 0, -6, 0, 7, 2, 0, 0], [-1, 3, 0, 2, -1, 4, -2, -3, 0, 2, -6, -1, 0, 0, 2, 0, 4, 3, 0, 0], [0, 0, 0, 10, -10, 13, 0, -10, -9, -9, -1, 6, 0, 0, 0, 0, 0, -9, 0, 0], [-3, 0, 0, 4, 14, 0, -4, 4, -4, 7, 0, 4, 2, 4, 3, -10, 0, 4, 0, 2], [-17, 4, 0, 0, 0, 1, 2, 2, -2, 0, 0, -17, 0, 0, 0, 0, -1, 2, 0, 0], [-5, 4, 0, -1, 0, 0, -5, -5, -5, 5, -4, 5, 0, 0, 0, 0, 2, -1, 0, 0], [4, -6, -10, 2, 2, 0, -1, 1, -5, -4, 0, 0, 1, 20, -4, -1, 0, 1, -1, 2], [2, -4, 0, 1, -2, 8, -3, -5, 3, -5, -4, 7, 0, 0, 8, 0, -4, -1, 0, 0], [-3, 0, 4, -9, 19, 0, 3, 0, -5, 5, 7, 2, -4, 4, 3, -8, 0, 1, 4, -2], [-2, -14, 0, -7, -7, 3, 8, 1, 8, -8, 7, -13, 0, 0, 8, 0, -6, -6, 0, 0], [5, -2, 16, -10, 6, 0, 6, -2, -6, -1, 2, 4, -4, -8, -5, 0, 0, -8, 0, 4], [0, 10, 8, -5, -5, 0, 0, -5, 0, 0, -5, 0, 0, -8, 0, 0, 0, 0, -2, -8], [-5, 1, 0, -1, 2, -2, 0, 2, 0, 8, 1, -10, 0, 0, -8, 0, 1, 1, 0, 0], [0, -1, -2, -14, 15, 0, 7, -6, -7, 0, 2, 0, -1, 0, 0, -1, 0, -6, 1, 0], [10, 0, 0, 15, -15, -3, 10, -5, -11, -11, 6, 12, 0, 0, -10, 0, 0, -11, 0, 0], [-2, 6, 0, -3, 10, 0, -3, 3, -3, 5, 6, 3, -8, 6, 2, -10, 0, 9, 0, -8], [5, 2, 0, -1, -1, 0, -7, -8, -9, 9, -1, 15, 0, 0, -7, 0, 0, -7, 0, 0], [-4, 4, -8, 10, -8, 0, -6, 2, 6, 2, -4, -2, -2, 4, 4, 6, 0, 6, -12, 2], [-7, -5, 0, -6, 12, -12, -11, 1, 11, 8, -5, -3, 0, 0, 3, 0, 6, 6, 0, 0], [-3, 0, -4, -5, -1, 0, 3, -4, 3, -3, 3, -6, 4, -4, 3, 0, 0, 1, 0, 2], [3, 1, 0, 12, -6, 4, 1, -5, -4, -5, -2, 2, 0, 0, -5, 0, 4, -3, 0, 0], [0, -3, -12, -4, 7, 0, 2, 1, -2, 0, 6, 0, -1, 0, 0, -5, 0, 1, 5, 0], [-2, 9, 0, 0, 12, -6, -4, 8, -1, 5, 0, 3, 0, 0, -5, 0, 6, 8, 0, 0], [-5, 6, -16, 4, -6, 0, -4, -4, 4, -1, -6, -6, 4, 8, 5, 4, 0, 6, -8, -4], [19, -3, 0, 0, 0, 0, -1, -1, -1, -1, 3, 1, 0, 0, -2, 0, 1, -4, 0, 0], [2, -7, 0, 4, 3, 0, -1, 2, -3, -2, 0, 0, 0, 0, -2, 2, 0, 0, 2, 0], [-8, 0, 0, -4, 4, 7, -8, -4, 1, 1, -5, -18, 0, 0, 8, 0, 0, 1, 0, 0], [9, -6, 0, 9, -12, 0, -3, 3, -3, -6, -6, 3, -2, 10, -9, 8, 0, -3, 0, -2], [-5, 12, 0, 0, 5, -10, -2, 3, -9, 11, 0, 6, 0, 0, -11, 0, 10, 3, 0, 0], [-3, 1, 0, 0, -2, 0, 2, 0, 5, 3, 0, 0, 1, 0, 3, 3, 0, -4, 3, 2], [2, -1, 0, -1, 2, 0, -2, 0, 2, 8, -1, 6, 0, 0, -6, 0, 0, 1, 0, 0], [2, 0, 2, 0, 6, 0, -2, 6, -3, 3, 7, 5, -4, 2, -2, -12, 0, 5, 6, -2], [-2, 2, 8, 8, -12, 0, -4, 0, 6, -2, -4, -4, 4, 0, 2, 4, 0, 4, -4, 0], [6, 0, 0, -1, -14, 0, 1, -1, 1, -7, 0, -1, 5, 0, -6, -3, 0, -1, 0, 5], [-6, -3, 0, 7, 0, 0, 0, 0, 0, -5, 3, 0, 0, 0, -5, 0, -9, -3, 0, 0], [8, -8, 0, -6, -12, 0, 9, -3, 1, -8, 0, 0, 11, 0, -8, 1, 0, -15, 1, 22], [-10, 8, -10, 8, 4, 0, -10, -2, 2, 2, -4, -8, 0, 10, 10, 0, 0, 18, -13, -11], [3, 0, 2, 4, 0, 0, -3, 5, -2, 2, 1, 5, -14, 2, -3, 6, 0, 2, -3, -7], [-3, 0, 0, -4, 4, 4, -3, 1, -2, -2, 3, 23, 0, 0, 3, 0, 0, -2, 0, 0], [-37, 2, 0, 5, 5, -4, -9, -4, -5, 5, -1, -9, 0, 0, -9, 0, 8, -3, 0, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_525_t_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_525_2_t_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_525_2_t_i(:prec:=20)
    chi := MakeCharacter_525_t();
    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_525_2_t_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_525_2_t_i( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_525_t();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,2,sign)));
    Vf := Kernel([<2,R![4761, 0, -15180, 0, 32116, 0, -38258, 0, 32743, 0, -15953, 0, 5569, 0, -1211, 0, 190, 0, -17, 0, 1]>,<13,R![286443, 0, 142515, 0, 24651, 0, 1950, 0, 72, 0, 1]>,<37,R![1630729, -1842711, 1605928, -558671, 165997, -30371, 5983, -842, 136, -12, 1]>],Snew);
    return Vf;
end function;