
// Make newform 605.4.a.o in Magma, downloaded from the LMFDB on 10 February 2025.
// To make the character of type GrpDrchElt, type "MakeCharacter_605_a();"
// To make the coeffs of the qexp of the newform in the Hecke field type "qexpCoeffs();"
// To make the newform (type ModFrm), type "MakeNewformModFrm_605_4_a_o();".
// 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_605_4_a_o();".
// 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 := [1764, 0, -1452, 0, 376, 0, -35, 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, 1, 0, 0, 0, 0, 0, 0], [0, -1086, 0, -143, 0, 49, 0, -2], [0, 2640, 0, -1271, 0, 154, 0, -5], [276, 0, -202, 0, 29, 0, -1, 0], [-438, 0, 220, 0, -29, 0, 1, 0], [0, 11544, 0, -5548, 0, 623, 0, -19], [1380, 0, -620, 0, 67, 0, -2, 0]];
    Rf_basisdens := [1, 1, 126, 378, 18, 18, 378, 9];
    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_605_a();"
function MakeCharacter_605_a()
    N := 605;
    order := 1;
    char_gens := [122, 486];
    v := [1, 1];
    // 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;

function MakeCharacter_605_a_Hecke(Kf)
    return MakeCharacter_605_a();
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 := 4;
    raw_aps := [[0, 1, 0, 1, 0, 0, 0, 0], [-3, 0, 0, 0, -1, 0, 0, 0], [5, 0, 0, 0, 0, 0, 0, 0], [0, 0, -1, -4, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 11, 3, -1, 0, 0, 0, 0], [0, -8, 6, -6, 0, 0, 2, 0], [0, -15, -1, -3, 0, 0, -4, 0], [-69, 0, 0, 0, 3, 9, 0, -1], [0, -22, -16, 8, 0, 0, 6, 0], [-65, 0, 0, 0, 1, -5, 0, 9], [4, 0, 0, 0, 18, 36, 0, 4], [0, -37, 3, -96, 0, 0, -20, 0], [0, -66, 1, 12, 0, 0, -23, 0], [-73, 0, 0, 0, 9, -52, 0, 4], [-185, 0, 0, 0, -41, 11, 0, -5], [-1, 0, 0, 0, 3, -61, 0, -3], [0, -87, 19, 126, 0, 0, -18, 0], [-587, 0, 0, 0, -7, 44, 0, 0], [-359, 0, 0, 0, 53, 21, 0, 3], [0, -148, 0, 40, 0, 0, 48, 0], [0, 86, -32, -270, 0, 0, -18, 0], [0, 5, -31, 273, 0, 0, 6, 0], [-19, 0, 0, 0, 180, 98, 0, 14], [-277, 0, 0, 0, 3, -201, 0, -25], [0, 32, 58, -5, 0, 0, -18, 0], [-533, 0, 0, 0, -245, -3, 0, -25], [0, 77, -80, -235, 0, 0, 147, 0], [0, 53, 7, 338, 0, 0, 50, 0], [72, 0, 0, 0, 86, 254, 0, -34], [0, 147, -6, 263, 0, 0, 131, 0], [0, 225, -97, 93, 0, 0, -92, 0], [-505, 0, 0, 0, -87, -325, 0, 67], [0, 57, -117, 595, 0, 0, -92, 0], [0, 325, 33, 760, 0, 0, 8, 0], [0, 259, 51, -1, 0, 0, -198, 0], [-688, 0, 0, 0, 120, 76, 0, -44], [-568, 0, 0, 0, -106, -217, 0, -91], [0, -340, -29, 522, 0, 0, 269, 0], [0, -5, 15, -733, 0, 0, -40, 0], [-232, 0, 0, 0, -102, 38, 0, 42], [1763, 0, 0, 0, 194, 356, 0, -120], [-93, 0, 0, 0, -143, -743, 0, 67], [0, 528, 50, -312, 0, 0, 66, 0], [0, -434, -104, -1826, 0, 0, -90, 0], [568, 0, 0, 0, 130, 454, 0, -62], [0, 745, -69, 1031, 0, 0, 144, 0], [-318, 0, 0, 0, -304, 249, 0, 83], [0, 1532, 47, 228, 0, 0, -103, 0], [-1065, 0, 0, 0, 50, -560, 0, 136], [0, -909, -171, 773, 0, 0, 126, 0], [0, 543, 241, -609, 0, 0, -308, 0], [0, 197, 149, 688, 0, 0, 280, 0], [-1339, 0, 0, 0, -427, 433, 0, -165], [-2179, 0, 0, 0, -305, -57, 0, -137], [0, -353, 145, 113, 0, 0, -312, 0], [4276, 0, 0, 0, -487, 243, 0, 95], [0, -360, 66, -2434, 0, 0, 178, 0], [0, 96, -22, 3592, 0, 0, 58, 0], [0, -1266, 38, -850, 0, 0, -456, 0], [0, 269, -256, -439, 0, 0, -37, 0], [0, -731, -473, -223, 0, 0, -150, 0], [0, 943, 207, -829, 0, 0, -366, 0], [143, 0, 0, 0, 327, -115, 0, -293], [3909, 0, 0, 0, -709, 265, 0, -43], [1258, 0, 0, 0, -136, 1092, 0, 8], [-2989, 0, 0, 0, -739, -427, 0, 167], [0, 1169, -47, -219, 0, 0, -572, 0], [0, 518, 623, -678, 0, 0, 59, 0], [0, 380, -62, -2882, 0, 0, -118, 0], [3365, 0, 0, 0, 465, -97, 0, -9], [0, 129, 233, 1239, 0, 0, 474, 0], [-2669, 0, 0, 0, 447, -220, 0, -244], [0, -711, -17, 2701, 0, 0, 466, 0], [-1740, 0, 0, 0, -1180, 174, 0, -66], [-3901, 0, 0, 0, 925, 1533, 0, 223], [-1074, 0, 0, 0, -197, -1349, 0, -29], [-500, 0, 0, 0, 1264, -972, 0, 52], [735, 0, 0, 0, -656, -872, 0, 116], [0, 293, 29, -3682, 0, 0, 160, 0], [-3823, 0, 0, 0, -2245, -881, 0, 21], [-2028, 0, 0, 0, -491, 345, 0, 257], [0, 1232, 234, 1644, 0, 0, -302, 0], [-3799, 0, 0, 0, 1443, 711, 0, 179], [0, -1162, -420, 4652, 0, 0, -222, 0], [-260, 0, 0, 0, 208, 431, 0, 9], [-2144, 0, 0, 0, 493, 1859, 0, 139], [0, 2145, -367, 1495, 0, 0, 444, 0], [0, -618, 900, -2501, 0, 0, 142, 0], [-5886, 0, 0, 0, 348, -1607, 0, 55], [-13563, 0, 0, 0, -71, 160, 0, -192], [0, -444, -62, 4244, 0, 0, 306, 0], [-8525, 0, 0, 0, 1159, -1211, 0, -129], [0, 1068, -94, 1688, 0, 0, 878, 0], [-3212, 0, 0, 0, -490, 914, 0, -494], [0, 1325, 156, -1027, 0, 0, 143, 0], [3403, 0, 0, 0, -878, -484, 0, 68], [5275, 0, 0, 0, 1018, 656, 0, 44], [0, -177, 517, 1857, 0, 0, -960, 0], [0, -1198, -326, -6243, 0, 0, -36, 0], [0, -2161, 751, 5423, 0, 0, -170, 0], [0, 1416, -170, 4578, 0, 0, -1386, 0], [0, 148, -167, -3530, 0, 0, -561, 0], [0, 169, 19, -8008, 0, 0, -90, 0], [0, 2524, 446, 1640, 0, 0, -726, 0], [-4647, 0, 0, 0, 1941, -613, 0, -493], [3432, 0, 0, 0, -1344, 87, 0, -207], [0, -4185, 631, -2889, 0, 0, 448, 0], [-1055, 0, 0, 0, 493, 1607, 0, -427], [0, 4490, -472, 1736, 0, 0, 522, 0], [0, -435, 1099, 3835, 0, 0, -620, 0], [0, -534, 1632, 738, 0, 0, -302, 0], [6141, 0, 0, 0, 1653, 615, 0, 159], [7380, 0, 0, 0, -8, -772, 0, 512], [-2172, 0, 0, 0, 2104, 432, 0, -512], [3248, 0, 0, 0, 974, 358, 0, 1066], [454, 0, 0, 0, 258, 1433, 0, 983], [8882, 0, 0, 0, 740, 769, 0, -281], [8326, 0, 0, 0, 338, 336, 0, -768], [0, 274, 132, -3234, 0, 0, 478, 0], [-8246, 0, 0, 0, 61, 973, 0, -347], [0, -1905, -457, -7283, 0, 0, 988, 0], [0, -8046, 450, -3190, 0, 0, 640, 0], [-5138, 0, 0, 0, -1342, -1149, 0, -911], [3619, 0, 0, 0, 1309, -1371, 0, 23], [0, 5302, 108, 56, 0, 0, 826, 0], [3593, 0, 0, 0, -404, 2228, 0, -64], [5135, 0, 0, 0, 2697, -199, 0, 1087], [336, 0, 0, 0, 720, -1153, 0, 165], [0, 1024, 106, -2582, 0, 0, -2038, 0], [0, -1492, 590, -2892, 0, 0, 2194, 0], [0, 2921, 716, -781, 0, 0, -1153, 0], [-2228, 0, 0, 0, 2934, 2358, 0, -50], [-6147, 0, 0, 0, 475, 2553, 0, 673], [0, -1776, 944, 6116, 0, 0, -704, 0], [0, 5404, 222, 13042, 0, 0, 1882, 0], [9873, 0, 0, 0, 1069, -1625, 0, 439], [0, 2603, 426, -9293, 0, 0, -97, 0], [13739, 0, 0, 0, -2005, 1453, 0, -339], [0, 9594, -1040, 2688, 0, 0, -702, 0], [0, -3091, -1553, 7811, 0, 0, 1500, 0], [0, -1539, -359, 4476, 0, 0, 1432, 0], [-13517, 0, 0, 0, -1079, 2688, 0, -272], [0, -1917, -100, 4325, 0, 0, 2505, 0], [-7578, 0, 0, 0, 113, -1683, 0, -759], [-5088, 0, 0, 0, 926, 170, 0, -310], [0, 2830, 282, -6782, 0, 0, -520, 0], [0, 8324, -686, 936, 0, 0, 522, 0], [-10249, 0, 0, 0, 769, 2233, 0, 807], [-6087, 0, 0, 0, 1129, 1258, 0, -278], [0, -3233, 233, -4913, 0, 0, 714, 0], [13388, 0, 0, 0, -4177, 2425, 0, 1117], [-24111, 0, 0, 0, -1371, 3647, 0, -271], [0, 4668, -1159, 9872, 0, 0, -2293, 0], [-4088, 0, 0, 0, -1390, 1303, 0, -559], [23176, 0, 0, 0, -1332, 1270, 0, -290], [0, -4127, -1343, -10581, 0, 0, -370, 0], [13368, 0, 0, 0, 5590, 2482, 0, 86], [0, 3968, -622, -11624, 0, 0, -346, 0], [0, 1944, -1040, 2245, 0, 0, -712, 0], [709, 0, 0, 0, -3069, 343, 0, 701], [0, 8936, 1334, 6342, 0, 0, 438, 0], [0, -1143, 1077, 3269, 0, 0, 1418, 0], [3770, 0, 0, 0, 488, -410, 0, -370], [-11492, 0, 0, 0, -5782, -2640, 0, 248], [-1681, 0, 0, 0, -665, -1584, 0, 788], [3823, 0, 0, 0, -1461, -2091, 0, -729], [0, -4003, -309, -3573, 0, 0, 2050, 0], [0, 1548, 2354, 13597, 0, 0, -1434, 0], [-24054, 0, 0, 0, -1770, 1308, 0, -148], [0, -8101, 163, -11665, 0, 0, 234, 0], [-11455, 0, 0, 0, -5092, -1108, 0, -340], [0, -8284, 2282, -5180, 0, 0, -462, 0], [0, -7698, -1064, 10670, 0, 0, 1250, 0], [-30175, 0, 0, 0, -1535, -1811, 0, -1117], [7395, 0, 0, 0, 3116, 5024, 0, 556], [0, 506, -1358, -5234, 0, 0, -1044, 0], [-5257, 0, 0, 0, -798, 7502, 0, -474], [0, 3355, -737, -6873, 0, 0, 494, 0], [0, 2704, 1000, -2120, 0, 0, -1824, 0], [6575, 0, 0, 0, 711, -3290, 0, -274], [0, 9760, -2534, 7610, 0, 0, -254, 0], [-24811, 0, 0, 0, -1977, -3647, 0, 845], [0, 406, 42, -13520, 0, 0, -1792, 0], [-3850, 0, 0, 0, 2002, -8715, 0, 971], [9534, 0, 0, 0, -2674, -4396, 0, 912], [0, 5933, 2537, 3191, 0, 0, -1216, 0], [-29133, 0, 0, 0, 5087, 2349, 0, 95], [0, -3649, -99, -5828, 0, 0, 3870, 0], [0, 6329, -73, 10079, 0, 0, -456, 0], [-17739, 0, 0, 0, 5797, 1683, 0, 323], [0, -1123, -1615, 22913, 0, 0, 918, 0], [-42126, 0, 0, 0, 1748, -314, 0, 230], [10300, 0, 0, 0, -4512, -2222, 0, 550], [0, 4836, -1377, 14020, 0, 0, 57, 0], [-35087, 0, 0, 0, -1057, -927, 0, 593], [0, 3996, 1772, -7816, 0, 0, -2120, 0], [6989, 0, 0, 0, -1769, 6085, 0, -7], [0, 14063, 61, 24655, 0, 0, 1558, 0], [0, 7375, 484, -6541, 0, 0, -131, 0], [0, -5908, -2942, 2603, 0, 0, -2854, 0], [0, 76, 1664, -27106, 0, 0, 852, 0], [24391, 0, 0, 0, -6889, -7403, 0, -151], [0, -12848, 2278, -12557, 0, 0, 2474, 0], [-50708, 0, 0, 0, -3652, -2364, 0, 32], [14461, 0, 0, 0, -4117, 6765, 0, 281], [-33641, 0, 0, 0, -1763, -3903, 0, -789], [0, -758, 61, -9582, 0, 0, -1527, 0], [0, 5402, 20, 9203, 0, 0, -1318, 0], [14904, 0, 0, 0, -3520, -7388, 0, 916], [0, -20355, -1311, 7893, 0, 0, 2960, 0], [4068, 0, 0, 0, -7651, -5281, 0, -649], [-35745, 0, 0, 0, -1281, -1867, 0, -401], [865, 0, 0, 0, 5751, 3679, 0, 1953], [0, 8290, -1172, -30186, 0, 0, 218, 0], [5482, 0, 0, 0, -1383, -12027, 0, 1265], [0, -2451, -1216, 19759, 0, 0, 1883, 0], [0, -386, -512, -15020, 0, 0, 2050, 0], [17881, 0, 0, 0, -1689, -764, 0, -1252], [-28127, 0, 0, 0, 793, -37, 0, -165], [0, -2878, 470, -834, 0, 0, 3216, 0], [0, 5666, -3732, -4620, 0, 0, 5250, 0], [5430, 0, 0, 0, -6514, -5968, 0, -136], [-3861, 0, 0, 0, -3467, -2536, 0, -1828], [0, 12568, -2081, -4882, 0, 0, 4221, 0], [0, 683, -1209, -10056, 0, 0, -4420, 0], [25751, 0, 0, 0, -417, -4717, 0, -2181], [1499, 0, 0, 0, -8271, 2063, 0, -759], [0, -7609, -2065, 9799, 0, 0, -1262, 0], [0, -1391, -1995, -2241, 0, 0, -730, 0], [-16071, 0, 0, 0, -7445, -6883, 0, 1085], [0, 8335, -2147, -5967, 0, 0, 2120, 0], [0, 9415, 1401, 1469, 0, 0, 3804, 0], [0, 1229, 5307, -4694, 0, 0, -358, 0], [-1506, 0, 0, 0, 5020, 8235, 0, -1983], [0, 8190, 2011, 20436, 0, 0, -1573, 0], [-45898, 0, 0, 0, -4567, -4305, 0, 2011], [0, -6932, 2500, -15118, 0, 0, 7504, 0], [-9972, 0, 0, 0, 6064, -7730, 0, 654], [4676, 0, 0, 0, -1902, -7780, 0, -768], [-6467, 0, 0, 0, 15053, 1743, 0, -347], [0, -4772, -354, 5320, 0, 0, -2962, 0], [-24841, 0, 0, 0, 8773, 11828, 0, -632], [15993, 0, 0, 0, -5406, -12034, 0, -2042], [0, 11075, 997, -11175, 0, 0, -874, 0], [0, 15759, -671, 10083, 0, 0, 4728, 0], [2408, 0, 0, 0, -3124, -2547, 0, 2271], [32437, 0, 0, 0, 4891, -97, 0, 569], [0, -19283, 179, -9239, 0, 0, -3384, 0], [0, 13462, 7387, -6992, 0, 0, -2193, 0], [0, -10281, -2703, -6923, 0, 0, 5406, 0], [0, 14054, -640, 2532, 0, 0, -4478, 0], [20541, 0, 0, 0, -5023, -6616, 0, 1592], [1392, 0, 0, 0, 5250, -10798, 0, 874], [0, -9657, -2087, -4089, 0, 0, -822, 0], [0, -3911, 2821, 1989, 0, 0, 4658, 0], [-25849, 0, 0, 0, -12012, -5874, 0, -698], [0, 661, 3744, 3587, 0, 0, -7673, 0], [-9853, 0, 0, 0, -4841, 2901, 0, 2857], [0, -6515, 673, 185, 0, 0, 1448, 0], [0, -23554, -1095, 8146, 0, 0, 2397, 0], [0, 6536, 3061, -21330, 0, 0, 1251, 0], [0, -24440, 68, -27405, 0, 0, 80, 0], [0, -4902, -5386, 34560, 0, 0, -1076, 0], [57381, 0, 0, 0, 3899, -1969, 0, 2647], [-31761, 0, 0, 0, -5097, -1147, 0, -1129], [34333, 0, 0, 0, 3704, 5808, 0, -1024], [55373, 0, 0, 0, -6320, -696, 0, 364], [0, -9771, -4646, -31737, 0, 0, 465, 0], [0, -18944, 3982, -5630, 0, 0, -3394, 0], [3340, 0, 0, 0, 472, -2754, 0, -2098], [33341, 0, 0, 0, 6723, -456, 0, -216], [-48488, 0, 0, 0, 5816, 11984, 0, -1168], [0, -13035, -195, -20555, 0, 0, -5010, 0], [0, 5434, 2288, 25082, 0, 0, -6174, 0], [54963, 0, 0, 0, 7811, 2557, 0, 431], [66903, 0, 0, 0, 9115, 12601, 0, -3617], [0, -20682, -686, -2189, 0, 0, -1600, 0], [0, 11789, 2675, -23910, 0, 0, -430, 0], [0, 2266, -4478, -18908, 0, 0, -3052, 0], [0, -23915, -3080, -4941, 0, 0, -465, 0], [-39913, 0, 0, 0, 4899, -8225, 0, 1425], [0, -12918, 715, -27120, 0, 0, 5963, 0], [0, -17132, 168, -16613, 0, 0, 4292, 0], [0, -10165, 2367, -37101, 0, 0, 934, 0], [46596, 0, 0, 0, -2310, 12438, 0, 3202], [-18844, 0, 0, 0, 8308, 10264, 0, 2888], [0, 5614, -698, -13732, 0, 0, -5552, 0], [5758, 0, 0, 0, 1890, 2256, 0, 5120], [0, -3194, -414, -16710, 0, 0, 1524, 0], [41564, 0, 0, 0, 136, 7890, 0, -3386], [-32657, 0, 0, 0, -279, 7213, 0, 1495], [0, -2626, -1472, 15860, 0, 0, 4418, 0], [0, -23872, -4556, -4654, 0, 0, 3560, 0], [0, 6798, -3816, 3568, 0, 0, 3538, 0], [0, -6944, -6692, 12004, 0, 0, -5436, 0], [7929, 0, 0, 0, -491, 15093, 0, -505], [-45579, 0, 0, 0, -7929, -11853, 0, -265], [0, -11113, 351, -7275, 0, 0, 11502, 0], [0, 609, 3844, 22769, 0, 0, 467, 0], [0, 6671, 4927, 961, 0, 0, 180, 0], [0, 6034, -1864, 12008, 0, 0, -1774, 0], [0, -30394, -554, -46878, 0, 0, -424, 0], [-63483, 0, 0, 0, 12131, -3370, 0, -1974], [-2081, 0, 0, 0, -13159, -5785, 0, -1935], [-6895, 0, 0, 0, 2525, 10551, 0, 5043], [-22042, 0, 0, 0, 13312, 2385, 0, 787], [21581, 0, 0, 0, 2834, -912, 0, 4492], [-79, 0, 0, 0, -4251, -19903, 0, 3083], [0, -4509, 4339, 9177, 0, 0, -4540, 0], [0, -34828, -837, 14230, 0, 0, 8933, 0], [10662, 0, 0, 0, 2346, -7404, 0, 288], [0, 18772, -7662, 45913, 0, 0, -5590, 0], [7373, 0, 0, 0, 2437, -27022, 0, 2018], [0, -3612, 9077, 35448, 0, 0, -5521, 0], [0, -10810, 6620, -31008, 0, 0, 8022, 0], [-60644, 0, 0, 0, 13560, 15928, 0, 1440], [0, -3377, 5149, -5129, 0, 0, -6332, 0], [40239, 0, 0, 0, -16845, -17977, 0, -49], [0, -10739, 2023, 34866, 0, 0, -1666, 0], [0, 27864, -6906, -22800, 0, 0, 7306, 0], [-42905, 0, 0, 0, 12823, 9325, 0, -1487], [0, 12560, -7532, 29568, 0, 0, 1544, 0], [51185, 0, 0, 0, 1811, 2652, 0, -464], [0, -1647, -1289, -19001, 0, 0, -5846, 0], [36548, 0, 0, 0, -2795, 3661, 0, -927], [-20892, 0, 0, 0, 1474, -6354, 0, 586], [-28952, 0, 0, 0, -8612, -3545, 0, 1077], [0, -13971, 7116, -13369, 0, 0, 5879, 0], [0, 12446, 6976, -36402, 0, 0, -2310, 0], [0, 9602, -5544, 20828, 0, 0, -2558, 0], [20896, 0, 0, 0, -3162, -29600, 0, 804], [0, -6577, -4521, 46493, 0, 0, -4362, 0], [0, -14295, -6160, 14519, 0, 0, -5457, 0], [0, 13250, 4172, 38740, 0, 0, 5050, 0], [-75807, 0, 0, 0, -1079, 6247, 0, -151], [-27170, 0, 0, 0, 403, -13809, 0, -5381], [0, -17698, -9618, -5132, 0, 0, 8452, 0], [29266, 0, 0, 0, 9919, 9999, 0, -1425], [0, 8133, -8547, -38027, 0, 0, 3594, 0], [-24350, 0, 0, 0, 1208, 24208, 0, -2276], [31975, 0, 0, 0, 24341, 10773, 0, 893], [0, -1822, -1574, 24810, 0, 0, 3036, 0], [-10440, 0, 0, 0, -7830, -15416, 0, -312], [-101415, 0, 0, 0, 1639, -13883, 0, -2263], [0, 23771, -943, -41819, 0, 0, -2832, 0], [74230, 0, 0, 0, 7648, -492, 0, 412], [-51925, 0, 0, 0, -5611, 8273, 0, -5069], [0, 16945, -3099, -4613, 0, 0, -322, 0], [12370, 0, 0, 0, 4, -4330, 0, -2542], [0, 13146, 436, 15926, 0, 0, 12278, 0], [-44361, 0, 0, 0, -7729, -17025, 0, 3251], [-33536, 0, 0, 0, -9823, -12513, 0, 5603], [0, 12157, -154, 26075, 0, 0, 6629, 0], [0, 20492, 2970, -3537, 0, 0, -6482, 0], [0, -15176, 1050, 53320, 0, 0, -5470, 0], [15804, 0, 0, 0, -2824, -6868, 0, 704], [0, -20739, 6541, 16825, 0, 0, 370, 0], [0, -25280, -3698, -43068, 0, 0, 186, 0], [-26645, 0, 0, 0, 9223, 9065, 0, 2363], [0, -18626, -4150, 19478, 0, 0, 1300, 0], [0, 10644, 9136, -4699, 0, 0, 1104, 0], [-50293, 0, 0, 0, -4863, -14344, 0, -6704], [0, -28205, -1345, -25717, 0, 0, 5610, 0], [-85727, 0, 0, 0, 19589, 8711, 0, 361], [-4016, 0, 0, 0, -3918, 30, 0, 5702], [0, -20024, -2376, 11730, 0, 0, 6168, 0], [0, -5954, -3773, -11472, 0, 0, 5179, 0], [0, 26369, -4863, 11824, 0, 0, 240, 0], [30058, 0, 0, 0, 14692, -8830, 0, 830], [-10462, 0, 0, 0, -1344, -15816, 0, -7032], [0, 29920, 3489, -21798, 0, 0, -4141, 0], [0, 3619, -9237, 3374, 0, 0, 3944, 0], [0, 36440, 5090, -22704, 0, 0, -2314, 0], [-63764, 0, 0, 0, -12552, -6654, 0, -4374], [126730, 0, 0, 0, -12788, -4606, 0, 46], [0, 15743, 5693, -59475, 0, 0, -2920, 0], [0, -3156, 4034, -17646, 0, 0, 18306, 0], [0, 5429, 675, -22564, 0, 0, -14878, 0], [0, -29362, 810, -48586, 0, 0, -1228, 0], [8519, 0, 0, 0, 10112, 13024, 0, 2708], [10635, 0, 0, 0, 7061, -2953, 0, -4581], [0, 12405, -4615, 65017, 0, 0, 4538, 0], [0, 6479, -7137, 16745, 0, 0, -12472, 0], [0, 19483, 4933, -21399, 0, 0, -19556, 0], [-23478, 0, 0, 0, 26788, 21427, 0, -535], [119039, 0, 0, 0, 1737, 6649, 0, 2003], [1777, 0, 0, 0, -12477, 21077, 0, -2023], [0, 43173, 5453, 85269, 0, 0, 6154, 0], [-56694, 0, 0, 0, 12892, -20255, 0, 2479], [32552, 0, 0, 0, 8436, 15414, 0, -326], [-108856, 0, 0, 0, -16640, -3714, 0, 1126], [107652, 0, 0, 0, -15290, -17000, 0, -808], [14775, 0, 0, 0, -10279, -2918, 0, -7486], [130036, 0, 0, 0, -1624, 17574, 0, -526], [0, -15288, 2226, -9330, 0, 0, -3982, 0], [0, -15237, -8847, 30345, 0, 0, -112, 0], [102051, 0, 0, 0, 16074, -10554, 0, 318], [-154939, 0, 0, 0, -8101, -1525, 0, 1597], [0, -40117, -847, 28584, 0, 0, 8742, 0], [0, -29963, 4605, 72500, 0, 0, -4980, 0], [52457, 0, 0, 0, -23891, -5475, 0, 3217], [0, 8541, 7420, -36197, 0, 0, 1007, 0], [84886, 0, 0, 0, 14448, -3620, 0, 3628], [0, 3171, -5883, -78980, 0, 0, 6410, 0], [0, 5195, 847, -33741, 0, 0, -5966, 0], [-100282, 0, 0, 0, -23176, -4432, 0, 976], [0, 19190, -3048, -47237, 0, 0, -6582, 0], [6611, 0, 0, 0, 6099, 11917, 0, -101], [93345, 0, 0, 0, -6401, 23713, 0, 3279], [0, 25259, -6085, -35819, 0, 0, -7540, 0], [0, 41370, -822, -22812, 0, 0, 1872, 0], [-83173, 0, 0, 0, 15923, 8413, 0, 5411], [0, -18883, 7203, -52569, 0, 0, 1732, 0], [0, 17236, -3778, 117708, 0, 0, -2082, 0], [126446, 0, 0, 0, -7134, -9484, 0, -3144], [0, -9493, -4691, 11129, 0, 0, 2460, 0], [-70725, 0, 0, 0, -1409, -8842, 0, 6570], [100185, 0, 0, 0, 13805, 13817, 0, -215], [0, -28471, 369, 41465, 0, 0, -9962, 0], [-21736, 0, 0, 0, -14076, -6946, 0, -1390], [0, -10164, 7208, 59246, 0, 0, -4096, 0], [45840, 0, 0, 0, -5952, 13563, 0, 7285], [0, -42141, 7211, -37129, 0, 0, 7730, 0], [48756, 0, 0, 0, -7172, -9946, 0, -3850], [-1314, 0, 0, 0, -16722, -7266, 0, -1346], [-54580, 0, 0, 0, -10752, 10655, 0, -887], [0, 1946, -2686, -16526, 0, 0, -8232, 0], [-53334, 0, 0, 0, -11264, -808, 0, 9380], [0, 29222, -4552, -30120, 0, 0, 6786, 0]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_605_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_605_4_a_o();".
// 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_605_4_a_o(:prec:=8)
    chi := MakeCharacter_605_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 4));
    S := BaseChange(S, Kf);
    maxprec := NextPrime(2999) - 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_605_4_a_o();".
// 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_605_4_a_o( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_605_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,4,sign)));
    Vf := Kernel([<2,R![144, 0, -1755, 0, 487, 0, -41, 0, 1]>,<3,R![-11, -282, -8, 12, 1]>],Snew);
    return Vf;
end function;