
// Make newform 1104.6.a.q in Magma, downloaded from the LMFDB on 23 May 2024.
// To make the character of type GrpDrchElt, type "MakeCharacter_1104_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_1104_6_a_q();".
// 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_1104_6_a_q();".
// 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 := [-84640, 19136, 1565, -374, -2, 1];
        Kf := NumberField(Polynomial([elt : elt in poly]));
        AssignNames(~Kf, ["nu"]);
    end if;
    Rf_num := [[1, 0, 0, 0, 0], [1541, 1289, -282, -2, 1], [-42872, -2669, 558, 2, -1], [-16008, -93, 374, 2, -1], [355396, -14971, -8430, 134, 25]];
    Rf_basisdens := [1, 207, 828, 276, 2484];
    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_1104_a();"
function MakeCharacter_1104_a()
    N := 1104;
    order := 1;
    char_gens := [415, 277, 737, 97];
    v := [1, 1, 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_1104_a_Hecke(Kf)
    return MakeCharacter_1104_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+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 := 6;
    raw_aps := [[0, 0, 0, 0, 0], [-9, 0, 0, 0, 0], [3, 0, 0, 0, -1], [27, 2, -1, 1, -1], [128, -4, 7, -1, 0], [64, 3, -5, 0, 1], [-196, -1, 19, 11, 5], [126, -3, -32, 0, -25], [-529, 0, 0, 0, 0], [-1563, 41, -12, -36, 62], [429, -55, 66, -120, 80], [-3724, 8, 13, 25, 114], [-993, -69, -158, 0, -30], [642, -95, 274, 232, 67], [3205, -80, -185, 164, -17], [-1903, -422, -20, -308, 535], [11106, 369, -337, -128, -77], [-11826, 88, 701, 331, 192], [11938, -397, 358, 246, 609], [15017, 305, -560, -240, 460], [1073, -419, -140, -970, 34], [13039, -332, 729, -983, 1217], [19084, 450, 803, 29, 626], [-10414, -695, -215, 721, -131], [8116, -16, -184, 484, -2234], [-26947, 1047, -566, 242, 612], [23923, -1216, -305, 171, -215], [24340, 636, 85, -351, 76], [-3614, 1002, -713, 2629, -3018], [-14634, 1501, 741, -2423, 2053], [32298, 2720, -4894, -3202, -2674], [60670, -1526, -3182, -266, -1312], [-23666, -2209, 2409, 3657, -1021], [47798, 386, 884, 3624, 40], [-72041, 2402, -4346, 3818, -1983], [18783, 1091, 3654, 3550, -464], [-144526, -874, -1443, -5179, 3874], [106728, -1392, -7034, -3188, -5188], [18081, 3321, 3168, -668, -1108], [-62385, 6079, -1388, -4724, -1750], [129992, -3043, -4129, -5806, 1705], [-216708, -2502, 3901, 1461, 4012], [-79410, -2950, -3886, 6764, -9172], [-252440, -4187, -4917, -142, -8545], [-33967, 1259, -2420, -670, -14988], [-14551, -7010, 20577, 3223, 8093], [136470, 5334, -2718, -6868, -188], [-102061, 133, 6836, -4826, 102], [-135632, 5426, 6921, 11337, 6526], [-408588, -1480, 14023, -7543, 2938], [-112834, -10338, 24786, -2440, 6794], [-157770, -934, -6760, -4912, 5484], [-667700, 5478, -11918, -3472, 5852], [-393032, 2684, -4311, 2915, 13872], [-604329, 4387, -14318, -3656, 8210], [-675510, -2714, 11220, -4362, 3820], [-249441, 2413, 5104, -1022, 11400], [-188958, 14184, -12306, 18730, -22970], [-703516, 14010, 214, 17386, -10652], [-362854, 8567, 1831, 19523, -16873], [-314346, 10419, -4108, -4268, 1397], [379085, -11760, -29898, -4594, -6131], [-640324, -1990, -15932, -2076, 12874], [-1005230, 17805, 3887, 22976, -9789], [43594, -31078, -1612, -31998, 28370], [274831, -29215, 5106, -21648, 13164], [-1248710, 9156, -8976, -13068, 28254], [-401124, 9556, 7574, 25078, -21286], [-1244192, 4381, -9021, 11818, -39063], [-286360, 31615, -12863, -6306, 6421], [574254, 33766, -24298, 4130, -17374], [-2203328, 14876, 1302, -6704, -28172], [-712021, 13136, -41195, 22381, -13599], [1103842, -16202, 26313, -27075, -1246], [-267368, -39821, 54896, -10278, 1535], [-2230644, -42246, 5014, -7458, 15382], [2526171, -978, 18552, 28, -5755], [-79352, -32858, 752, -7140, -2956], [1745792, 20859, -20041, 22187, -26243], [-1442156, 5295, -17551, -3654, -87547], [-2813540, -56170, 51531, 41405, 6814], [-363106, -44852, -38917, -71925, 33460], [-2163280, 37298, -101556, -12370, -18102], [-1241898, 15896, 66626, 77482, -8932], [-419998, -8398, 90812, -17456, 44104], [-451614, -31942, 40848, -47568, 4884], [524871, -10347, 41476, 13512, 30172], [-1317738, -17096, 90850, -46340, 62420], [1587359, 58511, -74978, -50078, -87350], [-100154, 58312, -51646, 60176, -3070], [-641996, 26672, -126607, -23165, -79776], [-1620890, 45300, 52906, -20784, 10542], [891836, 36230, -152446, 23320, -44814], [296956, 10727, -43139, -26322, -136521], [-748318, 26942, -41362, 3136, 10024], [-2384102, -53164, 139988, 73190, 79482], [1173513, -39221, 20174, 36636, -86420], [1822586, 81573, -51421, 1431, 7257], [-791144, 27089, -10218, -23606, 6273], [-2476622, 20567, -90153, -69754, 3099], [3091800, 46932, 7522, -51436, 37312], [2617147, -31146, 14140, 55508, -60403], [1166456, -7882, 9829, -122315, -25910], [1145310, 86723, 70305, 120321, -41365], [893728, -46991, 32930, 131460, 10053], [-493145, 76192, -224755, -19688, 18527], [3959452, 97244, 82214, 148006, -98508], [2036871, -125939, 289012, -2944, 55100], [-1753890, -122274, 20856, -142884, 59488], [-4839109, -28376, -193063, -31304, -119445], [-2624231, 97281, 8670, 4898, 199756], [163876, 37472, -8209, 60839, -165110], [1663780, -16757, -28443, -95543, -27835], [6031772, -119099, 45596, -209534, 32301], [2046559, -80068, 71843, -149391, 184565], [-641214, -38519, -25145, -41957, 115985], [2205294, 29701, -60494, -52592, -134381], [601894, 38279, 29845, 163468, 74265], [-673941, 54019, -118892, -84858, 92770], [2328956, 8708, 30657, -15293, 278132], [-3361148, -161940, 8615, -144029, 152558], [-3253921, -202550, 98587, 96448, 89665], [5820351, -76366, 136146, 45238, -278679], [201316, 192848, -235798, -18894, 47504], [263890, -97894, 41890, 125312, -84036], [-1521447, 52190, 7338, -191142, 171279], [973778, -11586, 170865, 34887, -62598], [-3358292, 43049, 83089, 304676, -61755], [1993345, 142468, -244637, -175457, -339329], [-3174376, 46934, -154345, 73843, -171252], [5059258, -124134, 108432, -19764, -18228], [-4676006, -10604, 250142, -146354, 157866], [-938739, 105864, -132907, 113839, 144011], [-4543918, 106860, 43985, -186211, 174984], [2301488, 29536, 229786, 91506, 333074], [-9633114, 229334, 88784, -4034, 210218], [1082633, -37064, -264020, 7404, -149795], [-1375340, -262085, 360962, -21160, 11811], [2159135, 92348, -123794, 141602, -26893], [1528300, 109418, -455968, -233170, -313944], [5799692, -103100, -114930, -28200, -386028], [439813, 300375, 66918, 256894, -395596], [2478695, -166575, 218080, 200252, -68210], [9549876, -85688, 48945, 236199, -337568], [-1412492, -125255, -9561, 58414, -36141], [3581962, 115478, -506904, -84290, -183572], [3840018, 236566, 49962, -51196, 202034], [6312012, -42176, -96570, -259952, 122958], [2506562, 127992, 162570, -404652, 400914], [5374070, -279627, 48547, -437700, 199391], [-7260822, -20798, -11536, 123498, -218146], [1455808, 149337, 121271, 113887, 552835], [-3894380, 68690, -439100, 163780, -62550], [12508273, -252942, -126471, 6604, 49277], [13037842, 455639, 69052, 172920, 102765], [8011932, -89686, 264888, -85802, 272190], [-10694567, 265522, -249475, 150827, 4897], [5438035, -22157, -174862, -40848, 43734], [7687582, -124948, 241600, -265200, -188624], [-5613985, 1208, -129456, 181772, 69371], [17828572, 37249, 239283, 34862, 115353], [4633168, 254013, -167407, 65605, -168341], [-14395477, 142299, -428706, -311160, 455036], [5637104, -72210, -313275, -247695, 259354], [3130258, -311471, 563595, 258967, 589829], [1740526, -110652, 291936, -26698, -100266], [-20037367, 155775, -397852, 248636, -873654], [-8141930, -134347, 518213, 59010, 357213], [4702138, 606942, -949192, 144060, -353370], [11247287, -458521, 610408, -526510, 172506], [6786908, 268540, -464987, 637307, -519252], [-8274022, 157194, 60212, -148290, 550294], [-12966818, -92364, 122682, 575526, -428698], [13269852, -335014, 107352, 398142, 170216], [-17140064, 256314, -485094, -138978, -509782], [14310208, -34037, 485885, 27221, 399373], [317968, 45546, 385126, 204092, 274966], [-7148271, 131225, 266250, -863528, 420858], [-28243803, -681674, 664495, 1753, 113249], [309744, 356714, -222945, -74471, -118792], [-36681905, -187821, 94886, 165168, 12744], [29219344, 298182, -591817, -67593, 61082], [-18241376, 446600, -957272, 26638, -322738], [1804150, -340388, 459192, 467974, -93728], [-14024508, 63558, -393096, -447954, -344982], [11509351, -626960, 263298, 62678, -870905], [10991912, -226650, 61696, 185828, 130564], [-21466938, -383595, 354182, -1584, -193957], [20629699, -118139, -218782, 673890, -346136], [-4326885, -424708, -584263, -166524, -673651], [426343, -511471, -44194, -737334, 910088], [4854930, 413902, 336594, 481386, 400248], [-14570128, 359243, -248742, 535944, -531577], [-42920555, -201165, -55844, 341340, -321264], [28696284, -512382, 15523, -334527, -1036838], [-15467580, 716425, 130403, 329771, -93333], [999190, -613826, 46942, 237900, -325734], [-19032404, -1018058, 1267915, -84549, 415984], [-6476436, 106123, 183773, -796355, -116567], [10255520, -322300, 379096, 321584, -874612], [-12323765, -584014, -320808, 53848, -82175], [-20682322, -150430, 547504, -920302, -70996], [-582372, 306150, 211422, 550862, 115512], [-3275832, -361324, 162194, -665530, 1026446], [18667344, -287628, 734983, -48909, 584616], [-44230011, 278295, 184762, 145780, -278132], [-29034489, -906026, 1064827, -13117, -269781], [-9162802, -60931, 751039, 468448, 862219], [-24317937, 487157, -755248, 547220, -1795812], [23984168, -462844, -318382, -608828, 1018992], [-5760935, 99865, 1255796, 374326, -337186], [-25562075, -537495, -529774, -476376, -64010], [-18999799, 846824, -1320979, -102679, -923197], [13678952, 648282, -409943, -628137, 479222], [20952035, 1155823, -268020, 789320, -1343624], [-54356218, 420570, -87068, 161606, 209510], [-37771143, -547551, 39426, 187754, 105940], [-41554944, 937442, -1085932, 843750, -1248428], [25872962, 1134294, -289164, -303072, 1004916], [-39888981, 262455, -102206, -248568, 487726], [-75791260, -704793, -296593, -698524, 468329], [-28696463, -154868, -1214827, -678475, -1072449], [-28542288, 1071106, 930120, 1241214, -592348], [-31483237, -276876, -706013, -72787, 58553], [32691430, -630166, 988128, 135064, -17112], [-49321396, 542437, 591789, 852560, 116335], [-12689312, 1023211, -1055379, 1076581, -715783], [5210851, -513902, -265937, -2099780, 1002331], [-22761401, -326810, 415589, -886845, 1277391], [22111812, 193032, 899548, 1108288, 289304], [-3187146, 631599, -1976105, -828574, -442257], [35019450, 1824311, 55132, 1803196, -1655699], [-64052717, 229062, 1837501, 953075, 759291], [-32105371, -269259, -889070, -1082454, 1153126], [34933062, -892353, 1446184, -1299498, 959725], [-5681398, -354220, -1130172, -166230, -1032342], [-14081592, -17716, -1571592, -19340, 130022], [-13556757, -1414556, 739054, -725622, -818529], [78109672, -351252, 650826, -206498, -887192], [-37725585, -722378, 1463787, 274032, -69557], [-4497716, 809610, -1709751, -422131, -2179294], [27345768, -1099156, -203874, -691328, -648840], [-10541007, -645329, 440700, -1083640, 2120514], [-25193424, 815237, -489575, 239344, -2108109], [-61165302, -670518, 2378614, 193140, 414914], [17317562, 664554, -2251244, -167424, -509232], [-26538846, 1674274, 693316, 904190, -1362624], [36300520, -226570, 1928779, -1289399, 1885274], [4652404, 1249501, 1244512, 1929020, -949519], [-88428846, 654014, 347488, 1923932, 660236], [-37567768, 829472, 663843, 152033, 673334], [-3988730, -288563, 625225, -271859, -1141751], [16624092, -115818, 761526, -1122398, 981842], [-23521616, -533474, 1007484, -595306, 214000], [2463137, -955507, 1026610, 1779260, 1183262], [44717318, 370262, -817484, 149588, -484924], [-14738056, -1248966, 2336821, 355057, -496104], [60665930, -1134049, 173374, 432148, -1248903], [10705757, -1014203, 2518346, 1567998, 474522], [-25794632, -803971, -1116797, -1338126, 481039], [8720605, 394822, -2780413, -346219, 104241], [14610640, -1269740, 1668885, 2304677, -178400], [-23039630, 199986, -234364, 1104378, 1432222], [57148516, 342332, -1587625, -180609, -1624026], [-30426708, 34948, -3745686, -1646700, -1001206], [4840262, 2282187, 927488, 1146178, 401041], [46668147, 1380496, -2438254, -1338498, -903461], [-10469038, 782521, 524077, 2769437, -1211343], [-9713542, 248627, -2337164, -838472, 350977], [-4937363, 1093929, -2978526, -149338, -434722], [7559338, 1539914, 306872, 2065218, -1451914], [-3604904, 1575299, -2281818, -1019776, -2402329], [75531300, -180936, -164698, -1057950, -430602], [10169421, -1688056, -32483, -2138067, 1405911], [15870518, 473418, -1631354, 1810040, 1098446], [67349230, -169282, 2622984, 1556012, -1617592], [8537672, -543453, 1147295, -837248, -1552713], [31586720, 1119172, -119090, -256488, 1215330], [-25151266, -2284336, 4643620, -27968, 1645268], [-61108032, 371816, 1147931, -1403445, 2446652], [-43480518, 630257, -2805213, -1722528, 555415], [39835933, -293186, 15583, 2278235, -326315], [29268388, 1539720, -1953910, 1843932, -952124], [-15048162, 844186, -1798841, -2271925, 1878770], [96038566, 760992, 649204, -94048, -1485250], [-47100044, -578715, 16449, -798212, -1364135], [39584070, -465296, -548814, 1034852, 260716], [59293519, -819018, 1894520, 789692, -1076479], [7604592, 2099682, -78866, 710612, -2826342], [74140221, -1494729, 3001332, -1444182, 2951032], [90936479, -467378, 554414, 544106, 2841405], [-55667820, 614768, -450951, 2680157, 1058624], [41313045, 844487, 135720, -1399494, 69872], [-37612792, -873858, 5017, -565583, -3499574], [-66692046, -575547, 497825, 2625946, 680009], [134675067, -672336, -2852952, -1129184, -1464137], [-14035147, -2374328, 2821595, 719913, -1219589], [24374187, 343945, 571534, 2751702, -258968], [32445748, -971548, 3044728, -448884, -1183980], [118001842, -376620, -54258, -511016, -687546], [77114334, 271746, 830012, -1013810, 2501102], [51327319, -662494, -1570904, -2535680, -2136387], [-95149703, -999812, 2394179, -72993, 1032551], [-35784262, 1907079, -3204035, -3685676, 626809], [130019588, -981265, 1264024, -1019504, -1388021], [77640440, 1093461, 135815, -2641554, 3259455], [-5046924, -2230728, 2259968, -1599132, -1054696], [114564714, 1269554, 1256687, 1647641, -11970], [-137200420, -400436, 2760760, 1173702, 995600], [11195274, 526739, -3174947, -2462720, 94887], [-60073688, -2165729, -2154313, -1796056, -1133473], [56662549, 2381116, -2708654, 2340538, 422489], [68460992, 1925415, 158983, 2429551, -2633147], [-2264624, 1083026, 2841130, 466920, -933314], [-77596958, 1000154, -5968054, -549494, -1026416], [150523910, -832760, 3332772, 219866, 4922452], [-175730288, 1798364, 1360232, 3821076, 2836488], [-130759029, -790260, 4357273, 2959424, 1507293], [162136, 1386010, -4735736, 1119678, -12228], [39483951, -283717, 1580454, 4477620, -3662022], [55410026, 1895529, -2346870, -1780044, -1675045], [65209390, 2527448, -2457694, -1429390, 2202388], [127299139, 2363229, -3221312, -44828, -616668], [-6033405, -1204257, -846686, -1844262, 1761872], [85386050, 1635555, -2308947, -2370139, -1404937], [-11720008, 1242596, -4556852, -463328, -1817234], [23383160, -3183341, 2451558, 1109740, 1148119], [168456246, -2299534, 238816, 1293820, 583472], [-148069578, 2400532, -1195130, 319680, -4089890], [106035831, 436160, -2352818, 1780718, 848847], [-62511924, 2427360, 430864, 2630978, -2905806], [101405769, 889667, 1745570, 3701806, -3468596], [17910312, -3575994, -158170, -3529096, 1983974], [35809062, 2561202, -354602, 1904126, -466816], [-23283358, -2164009, -1280036, -2568464, 3501341], [68209854, 4628983, -3293013, 2798934, -1179923], [181674824, 2405532, -1574467, -49151, -1761550], [-11409554, -701053, -1000921, -438413, -3407561], [79788732, -2702123, 1360775, 1497698, 5676627], [136636633, -2714630, -1361585, 1694955, -275155], [-110202650, -2759489, 4930021, 1049864, 1382279], [7967718, -4498499, 2074383, -296541, 4531049], [33724891, 2179483, 6405294, 447260, 4297906], [-43664555, 2826112, 3596319, 2470217, 3523723], [-130103691, 2373132, -2157108, 312036, -1792083], [-137949222, -1249490, -264684, -3765744, 392024], [-9903068, -4433817, 3605319, -3334444, 5510665], [224258412, 4110934, 562860, 695340, 699590], [17553888, -139702, 3403368, 2782886, -2629214], [173348865, -32964, -1262458, -232262, 1104485], [111420596, -1921188, -707256, 398252, 2119468], [120116501, 2720204, 652971, 4158352, -4752467], [-60284163, -1143131, -6337366, 971970, -4785606], [313124879, 3265140, 19965, 1408033, 19921], [-31488218, -3578262, 336867, 1143731, -18846], [-100834922, 3009476, -2692880, 2222666, -4107008], [144365440, 3412078, -2422286, 515542, -3460746], [-20547112, -1074982, -2538657, 2725887, -2705690], [-74460276, 1039660, 1541606, 2688858, 2990346], [43750413, 4622896, -1669693, 1985332, -7114369], [-183101228, 2977418, 925397, -3032461, 891636], [-13710639, 3264091, -2924752, 5246610, -769168], [210987779, -553861, -697864, -356596, -5555764], [-11093212, -3192376, 2006107, -2517031, 2588360], [-31291460, 1127300, 1517160, 2698692, -4273644], [-212913543, 161107, -373058, -5689518, 3656680], [-122919547, -5568031, 5303750, -221920, 3552182], [151052485, -2467978, -653399, -2986667, -3909011], [121788996, 1742016, -2327048, -1275298, -1435338], [145630628, -4763469, 3164009, -2840802, 3894211], [88198938, -1364998, -5366126, -1414428, 2763940], [246153669, -766335, 1870772, 2988432, -161880], [23138897, -3907270, 4132150, -3931778, 2663411], [85687209, -2451098, -386977, -1671431, -383699], [74204592, 3735348, 4218934, -1640520, 4724114], [-22907890, -3691986, 6697326, 6327658, 529988], [-146382578, -2687510, -3724182, -6436486, 5167308], [-87984494, 561470, 10826934, 4746132, 4350566], [-84434220, 421775, 3393167, -4496589, 2841081], [87698840, -372031, 4556027, 5057078, 1702803], [-181239933, 89164, -956290, 5188014, -2124505], [167797710, 4037563, 3784989, -1808243, 7433327], [17339010, 886040, 6229326, 782342, -433114], [-255266493, 1258013, -5191492, -5608820, 481200], [132371954, -1655687, 1431308, 4616170, -2185933], [209317358, -3049234, -42364, -4487500, 3274944], [-14665062, 6036206, -2009504, 5073098, 1973092], [-193214316, 942342, -11773774, -3020614, -2519200], [8189090, -871097, 5315462, 2057952, -1743815], [105012074, -3492590, 6290394, -5123290, 4229848], [213139258, -3190616, 6299012, -127482, 5032208], [-48670909, 2824757, -15104840, -2441326, -3922828], [-270675470, 2039679, -4749959, 1180908, -7857759], [75076076, -3121696, -711078, -15012, 4317344], [-48925194, -2370082, -1790442, -1023526, 5129520], [26564312, -4436106, 6644106, 5140888, 531240], [110686047, -958410, -6748515, -2165873, -5260017], [191077930, -2461199, 6760439, -2977241, 2234133], [107330078, -5091691, 7368178, -2528538, 1674311], [26212281, -851803, -1379882, -398196, -543530], [-165282572, 1077732, 91598, 6074612, -2046114], [-372764231, 1256583, -3702732, 3309370, -5529428], [203847701, 1990490, -1611099, 6428165, -4529111], [-155653872, 2587445, 446113, -2566007, 50867], [16806075, 5979961, -4511524, 5610456, -5891784], [-138987691, -1515983, 8062758, 5059898, 734152], [-203460490, -141548, 4178373, 5797429, 5466652], [-151236315, 1121449, 2682010, -2976946, -8595070], [44001200, 4644501, -1376132, -2618880, -3445163], [-13213474, -1823567, -3519231, -10937362, 3594671], [153425865, -1346972, -682685, 1537624, 703033], [-173143409, 4202379, -2327890, 2616820, 2373310], [336030008, 1406150, 1131879, 7761245, -5896630], [-132676124, -524947, -3393782, 2953722, -5941207], [232219852, -1265350, 2413544, -4661450, 5169000], [-163924367, -4016327, 2270360, -1095236, -661150], [-167188397, -3039766, 4604695, 3050272, 1048019], [344045185, -602197, -3699872, -2526864, -7207778], [-247098284, 211, -1706741, -7571213, 5448061], [82409058, 5077068, 4169920, -4246048, 10620562], [443934475, 3511260, -5038926, 4052082, -243841], [-57394076, 4082238, 1464871, 3330365, -208312], [-146598116, -7552164, 3635208, 4836364, -531536], [-95851818, -8505869, -4346603, -7665480, 1617377], [-38340322, 7626048, -2850048, 3638908, -6009876], [-98648307, -3230219, 4583680, -11485514, 5165410], [-201751424, -3452616, -1096341, -2095619, 6714844], [156288858, 475100, 2023236, -844700, 12644916], [-411871156, 1845606, 2509844, 5141848, 8105318], [52936515, -1930632, -4246911, 1509436, -2635111]];
    aps := ConvertToHeckeField(raw_aps);
    chi := MakeCharacter_1104_a_Hecke(Universe(aps));
    return ExtendMultiplicatively(weight, aps, chi);
end function;


// To make the newform (type ModFrm), type "MakeNewformModFrm_1104_6_a_q();".
// 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_1104_6_a_q(:prec:=5)
    chi := MakeCharacter_1104_a();
    f_vec := qexpCoeffs();
    Kf := Universe(f_vec);
    // SetVerbose("ModularForms", true);
    // SetVerbose("ModularSymbols", true);
    S := CuspidalSubspace(ModularForms(chi, 6));
    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_1104_6_a_q();".
// 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_1104_6_a_q( : sign := -1)
    R<x> := PolynomialRing(Rationals());
    chi := MakeCharacter_1104_a();
    // SetVerbose("ModularSymbols", true);
    Snew := NewSubspace(CuspidalSubspace(ModularSymbols(chi,6,sign)));
    Vf := Kernel([<5,R![-43015536, 7168896, 57952, -5422, -16, 1]>],Snew);
    return Vf;
end function;