
# q-expansion of newform 575.4.a.j, downloaded from the LMFDB on 23 September 2026.

# We generate the q-expansion using the Hecke eigenvalues a_p at the primes.
# Each a_p is given as a linear combination
# of the following basis for the coefficient ring.

def make_data():

    from sage.all import prod, floor, prime_powers, gcd, QQ, primes_first_n, next_prime, RR

    def discrete_log(elts, gens, mod):
        # algorithm 2.2, page 16 of https://arxiv.org/abs/0903.2785
        def table_gens(gens, mod):
            T = [1]
            n = len(gens)
            r = [None]*n
            s = [None]*n
            for i in range(n):
                beta = gens[i]
                r[i] = 1
                N = len(T)
                while beta not in T:
                    for Tj in T[:N]:
                        T.append((beta*Tj) % mod)
                    beta = (beta*gens[i]) % mod
                    r[i] += 1
                s[i] = T.index(beta)
            return T, r, s
        T, r, s = table_gens(gens, mod)
        n = len(gens)
        N = [ prod(r[:j]) for j in range(n) ]
        Z = lambda s: [ (floor(s/N[j]) % r[j]) for j in range(n)]
        return [Z(T.index(elt % mod)) for elt in elts]
    def extend_multiplicatively(an):
        for pp in prime_powers(len(an)-1):
            for k in range(1, (len(an) - 1)//pp + 1):
                if gcd(k, pp) == 1:
                    an[pp*k] = an[pp]*an[k]
    from sage.all import PolynomialRing, NumberField, ZZ
    R = PolynomialRing(QQ, "x")
    f = R(poly_data)
    K = NumberField(f, "a")
    betas = [K([c/ZZ(den) for c in num]) for num, den in basis_data]
    convert_elt_to_field = lambda elt: sum(c*beta for c, beta in zip(elt, betas))
    # convert aps to K elements
    primes = primes_first_n(len(aps_data))
    good_primes = [p for p in primes if not p.divides(level)]
    aps = map(convert_elt_to_field, aps_data)
    if not hecke_ring_character_values:
        # trivial character
        char_values = dict(zip(good_primes, [1]*len(good_primes)))
    else:
        gens = [elt[0] for elt in hecke_ring_character_values]
        gens_values = [convert_elt_to_field(elt[1]) for elt in hecke_ring_character_values]
        char_values = dict([(
            p,prod(g**k for g, k in zip(gens_values, elt)))
            for p, elt in zip(good_primes, discrete_log(good_primes, gens, level))
            ])
    an_list_bound = next_prime(primes[-1])
    an = [0]*an_list_bound
    an[1] = 1
    
    from sage.all import PowerSeriesRing
    PS = PowerSeriesRing(K, "q")
    for p, ap in zip(primes, aps):
        if p.divides(level):
            euler_factor = [1, -ap]
        else:
            euler_factor = [1, -ap, p**(weight - 1) * char_values[p]]
        k = RR(an_list_bound).log(p).floor() + 1
        foo = (1/PS(euler_factor)).padded_list(k)
        for i in range(1, k):
            an[p**i] = foo[i]
    extend_multiplicatively(an)
    return PS(an)
level = 575
weight = 4
poly_data = [92, 168, 7, -27, -1, 1]

# The entries in the following list give a basis for the
# coefficient ring in terms of a root of the defining polynomial above.
# Each line consists of the coefficients of the numerator, and a denominator.
basis_data  = [[[1, 0, 0, 0, 0], 1], [[0, 1, 0, 0, 0], 1], [[98, -11, -25, 1, 1], 16], [[-42, -41, 17, 3, -1], 8], [[-162, -109, 25, 7, -1], 16]]

hecke_ring_character_values = None
aps_data = [[-1, -1, 0, 0, 0], [-1, -1, 1, -1, 0], [0, 0, 0, 0, 0], [2, -1, -3, -1, 0], [1, 2, 7, 4, 2], [-29, 6, 4, 0, -1], [-10, 14, 2, 4, 9], [-29, -11, 0, 5, -5], [23, 0, 0, 0, 0], [93, -17, -21, 9, -5], [8, 14, -17, -8, 12], [7, -28, -11, -24, 53], [-4, 67, -20, -9, -19], [136, 10, -60, 6, -4], [-188, 29, -8, -33, 8], [-205, 56, -81, 12, -25], [275, 68, -55, -88, -9], [-365, 10, 101, 24, -60], [-115, -28, 19, 4, 7], [-4, -69, -48, 35, 77], [-202, 49, -64, 135, -84], [124, 136, -4, 152, -92], [-35, 190, 29, 74, 9], [104, -246, 120, -134, 56], [-165, -128, 173, 106, -26], [935, 92, 63, -52, -67], [-133, 66, 169, 100, -44], [-329, -2, -161, -18, 45], [251, 25, 2, -15, -263], [-401, -212, -149, -152, 195], [-28, -427, 146, 11, -186], [38, -11, -206, 83, 32], [-723, 25, -278, -287, 55], [-1165, 21, -117, 111, 155], [1067, -89, -72, -89, 245], [-1151, -193, 203, -1, -28], [175, -4, 243, 340, -87], [-41, 262, 130, 268, -463], [248, 348, -28, 116, -4], [-387, 66, 245, 28, -238], [-1056, 179, -120, 153, -396], [-567, -161, 228, 163, -149], [-194, -430, -90, -38, -436], [-420, 817, -270, -201, 298], [-2733, 121, -227, -107, -74], [-1974, -270, -168, -326, 92], [-519, -506, 585, -38, 77], [-1746, 76, 446, -224, 298], [598, -28, 76, 808, -406], [-1360, 528, -522, -524, 118], [-1700, -125, 574, 417, 230], [591, 207, 271, 529, -391], [-662, -1198, 790, 450, -310], [937, -113, 404, -529, -71], [916, -989, 206, -655, -270], [-1296, -218, -212, 300, -179], [-1561, -881, 1149, -151, -251], [1764, -341, 197, -245, 336], [1892, -529, -24, 161, 218], [1744, 592, -242, -564, -300], [-1629, 976, 219, 224, -365], [-3655, -914, 921, 6, -703], [209, 112, -563, -506, 868], [-3346, -721, 768, 329, -298], [1998, 287, -697, -909, -138], [-1329, 485, 1142, 25, 327], [3841, -1199, 869, -277, 505], [-1891, -1085, 670, -665, -601], [845, -412, -1215, 42, 90], [-3321, 371, -83, 121, 1059], [-506, -1359, 408, -745, 238], [-4308, 1890, -178, -254, 102], [-13, 1032, -1163, 936, 481], [-1836, 150, -1096, 270, -146], [-4239, 574, -685, -104, -324], [1115, -834, -119, -1086, 13], [5511, 694, 45, -508, 118], [-1751, 23, -465, 731, 372], [-2516, -2154, 1848, -490, -698], [-482, -854, -25, 640, -1384], [722, -1314, -470, -686, 1458], [7427, -2011, 102, -111, -799], [2278, 748, -1644, 1036, 182], [-2618, -885, 953, 131, -742], [699, 376, -568, -674, 1765], [-1665, -1202, -492, 44, 1329], [5328, 1221, -39, 2105, -1378], [-3123, 842, 65, -1550, 773], [222, -127, -1752, -485, 1316], [-8254, 1866, 1340, -958, 1152], [1011, 746, -363, -102, -69], [-488, 2974, -1022, 618, 146], [5300, 785, 194, -929, -258], [871, 779, -1311, -191, 2549], [-5623, -1253, 1401, -419, -989], [3856, -1561, 991, -521, 466], [1350, -1685, -46, -2167, 1158], [-1338, -206, 1456, -1510, 932], [-1284, 328, 366, -1664, 1882], [-612, 873, -2462, 2159, -748], [1671, 664, 3260, 1022, -59], [-7461, -3818, 2257, -1178, -531], [-3649, 1144, 141, 1584, -1783], [-3266, 624, -1196, -560, -872], [-1553, 1554, -2219, 2040, -1888], [1126, -4069, 2550, -2447, 536], [-555, -1289, 1943, -1941, -474], [382, 3778, -490, 2950, -1572], [4057, 4264, 1517, 1698, -1022], [-16480, -222, -811, -272, 646], [-948, 1572, -2408, -824, 232], [558, 314, -1080, -2514, 988], [-2568, 3094, 1628, -876, 907], [3299, 2835, -2538, 171, -829], [7618, 1086, -154, -1118, -692], [-5878, 5278, -2426, 1994, 86], [9771, 996, -1525, 2608, -1499], [1908, 4037, 376, -1145, -1466], [-2037, 1414, 1512, 1372, 499], [10398, -3400, 262, 956, -1982], [4697, -2680, 2735, 190, 2170], [-5990, 989, 134, -389, 1560], [-2275, -1912, 2581, 1012, -115], [-5591, 638, -1252, 1216, 59], [8370, 4694, -1304, 1246, 978], [15547, 487, -132, 755, -1395], [-2823, -1644, -1597, -1798, 1300], [9204, -2971, -1093, -1723, 672], [5698, -388, 1394, 2210, 173], [5927, 5970, -4389, -886, 1151], [8283, 301, -4773, 555, 1733], [17837, 637, -1242, 2593, -1375], [8568, -5826, 3096, -2294, 334], [4049, -484, -5341, -448, -133], [-10502, -434, -937, 4460, 228], [-4828, 9432, -2718, -360, 1354], [-19122, 778, -898, -3042, 3558], [-12921, 592, 2817, 220, -2333], [-33, -2280, 2885, 1032, -2205], [2266, -2990, -3700, -468, -2655], [5753, -1323, -5621, -1257, 1079], [-10834, -1272, 1764, 4048, 160], [374, 6421, -2930, -345, 1580], [-2731, 296, -3521, -2236, 3437], [-4229, 4556, -2853, -360, -993], [-8688, -6172, -46, -396, 352], [-8897, -1969, 5744, -197, -553], [-5928, -4763, -1860, 987, 1522], [3429, -1243, 4427, -3705, 1015], [8086, -623, 2792, 2131, -840], [-7519, -7030, 4553, -252, -2296], [-6964, -1304, 2692, 2020, 1804], [2181, 5335, -3188, 5147, -2081], [-9716, -1529, 2762, -571, 468], [3451, -6622, 2383, -3166, -3131], [-2622, -7430, 368, -4570, 1186], [2344, -2130, 3664, -1882, -288], [919, 7345, -1643, 4219, -2549], [-987, 3633, -1978, 2089, -2697], [19987, -710, -1903, 1464, -3384], [1463, -6630, -2456, -2004, 2165], [8463, 2696, -3403, -4878, 1194], [-31052, -3223, -2122, -325, 1630], [-4095, -1464, 5071, -1510, -244], [-10010, 411, 6067, -3025, 1262], [2868, 4036, 4636, -1118, -2653], [-18998, -1064, 3656, -3110, 3637], [-27568, 700, 1234, 164, 2790], [-19098, -1556, 1834, 2244, 4704], [-26955, 2683, -1125, 4075, 2340], [10196, -3756, -2024, -2928, 5372], [-15057, 2783, 361, 4921, -4151], [11596, -3294, 5262, -1942, 5648], [5540, 3370, -2648, 740, 2033], [11825, 153, 5275, 493, -1728], [12562, -8572, 4880, -932, 1202], [2538, 1191, -1318, -359, -2844], [-12901, 223, -2233, -3779, 3637], [-25218, -4810, 4778, 2400, 605], [26253, 1685, -5554, -771, 6791], [8426, 3625, -164, 5499, -1212], [-7919, 2704, -6237, -562, -3088], [-11617, 3464, -140, 402, -3565], [9908, 3116, -5914, 680, -1468], [9186, -4276, 1490, 3794, -1115], [34097, -5327, 4310, -2895, 5555], [-13707, -8887, -2956, 269, 357], [3491, -1408, 1973, -3592, 6177], [-12376, -1183, -1444, -2695, -1047], [3462, 2204, 7460, 1234, -2097], [15458, 411, -3020, 1409, 960], [18058, 4352, 2894, -304, -2994], [-7610, 12270, 578, 3042, -2578], [211, 3602, -1643, -3278, 3573], [-4084, 7480, 4806, -3096, 966], [8812, -8833, 3935, 639, -2628], [8788, 2794, -914, 4018, -2504], [-23594, -7570, -4144, -1646, -404], [-28394, 1682, -1520, 3902, -1148], [-2194, 4987, -930, 1601, 78], [4987, -1762, 11665, 1916, 1608], [23193, -5681, 3820, -4889, 931], [-38837, -3715, -1651, 6385, 874], [-21398, 3076, -46, 4296, -6346], [-7288, -9272, -1872, 1092, 3368], [18592, 12987, -8888, 1081, 2754], [-22148, -1210, 9994, 226, 710], [-1773, -2725, -2463, -61, 6718], [1472, 4830, 9287, 6032, -1230], [3280, 5651, 2696, 3441, -4024], [158, 7533, 4246, 2035, -11498], [-10068, -2243, 5248, 2123, -1442], [26781, -8325, 62, -2813, -3887], [21514, -8260, 6864, -2360, -174], [-33587, -9020, 2519, -6004, -1077], [-13106, -10184, -2220, -7356, 1634], [15110, 1943, 964, 1245, -4860], [-8651, 87, -8185, -603, -5863], [17326, -3891, 8683, -1971, 7084], [-4376, -4207, 11156, -125, -1154], [-16801, -8727, -1431, -6577, 4273], [-542, -5842, -1968, 10286, -4972], [-3064, -7307, 172, -12079, 7643], [-22122, 15785, -3785, -127, -5056], [59056, 3083, 1918, -3719, 228], [53437, -1315, 2883, 4379, -2973], [22567, -1277, -10014, 5563, -8403], [-412, 8588, -13181, -6790, 1988], [3627, 4933, -8266, -11059, 2071], [1083, 996, -10663, -8756, 7617], [31623, -3909, -11896, 2227, -97], [-36823, -1384, 5155, -7198, 6542], [-4914, -4430, 10062, -4274, -6838], [-7176, 16074, 1074, -112, -4751], [18015, -6770, -1261, -7106, 6685], [4020, 4442, -5124, 502, 412], [25938, -16274, 4860, -34, -650], [7256, 6866, 258, 9418, 2284], [-69739, 3597, 4251, -3425, 2835], [-7294, -7959, 9010, -6567, -2019], [14023, -6322, -12993, -4074, 9773], [-3317, -4831, -12831, 135, 1951], [-22372, -491, -5580, -12805, 12618], [48798, 1715, -11172, -4703, 2104], [18970, -20892, 6300, -5008, -5418], [-30779, 15432, -5092, -2926, 9067], [1076, -499, 5916, 14511, -12176], [8583, -10277, -6988, -1513, -3689], [-4949, -7088, 9353, -11570, 1106], [25722, -4408, -1794, -910, -10309], [1924, -3596, -10180, -5456, -1414], [23008, 17082, -7124, 7134, 8838], [11182, -6539, 2639, 3341, -4624], [-60302, 4842, -3910, 8826, 3978], [-55886, -8680, 6912, -3292, -2676], [-29531, -2855, -2423, 1419, -5891], [-7979, 23470, -4469, 2980, 1688], [1046, -10914, 7794, -2002, 4320], [-34933, 5204, -10668, 2726, 1735], [5788, 51, -584, 12641, -9818], [36588, -11646, -3748, 3768, -6479], [-15165, 11788, 3723, 700, -7773], [51569, 5290, 563, 1026, 2591], [-10997, -2960, 2047, -2712, -9155], [13984, -2048, -2562, 5368, 306], [25923, 282, 9769, -168, 6892], [27127, 6210, -871, 7772, -2332], [-6002, -2676, 6912, 6036, -7852], [-14363, 1116, -633, 9768, -8395], [-20873, 974, 13854, 5932, 6875], [7339, 215, -15939, -1615, -3747], [22141, -13146, 11863, 6498, -645], [-27888, -815, 1749, 7545, 1492], [4938, 2354, -11906, 6438, -706], [-33054, 13839, 3426, -2439, -5732], [-3026, 11607, 9536, 4453, 3440], [76631, 8760, -5681, -12138, -250], [3105, -7708, 16657, 17508, -9757], [31396, 15528, -1014, -2332, 3626], [23461, -11723, 10302, 2041, -8007], [-864, -23847, 4006, -9785, 2772], [3124, 34842, -10864, 4510, 4540], [-19017, 18318, 8161, -5264, -240], [22696, 796, -1810, -13288, 6538], [-9065, 9215, -7586, 2243, 1729], [26890, -36832, 8348, 910, -5353], [32291, 14268, 14395, -472, -753], [11012, -6652, 8932, -344, 5006], [-16187, -10520, 621, -16326, 13246], [-27293, 8430, -4069, -14916, 5404], [3034, -3316, -15028, 6992, 9348], [45877, 13292, 5535, 1064, -8247], [-20918, -11118, -4190, 4822, 2580], [43339, -8229, 13774, -8693, 3191], [-11885, 10817, -15119, -9267, 5500], [-23865, -3600, 19337, -15038, 9636], [4004, -14126, -8202, -2638, -432], [-65015, 20427, -8589, 10307, 4530], [-54175, 14291, -7269, -12187, 12017], [-66691, 14577, -2089, 3177, 9878], [-53570, -355, 8607, 12525, -1558], [-6055, 15666, -719, 3430, -4633], [34778, -3184, 1282, 13760, -14168], [-20066, 18501, -14936, 5251, -6646], [-68413, 8195, -8242, 13711, -1009], [-4932, -18881, -2974, -6107, -8390], [-6751, -12276, -10367, -12186, -1412], [-43311, 9125, 8918, -3335, -2393], [-19970, -9832, 12228, 16020, -17702], [80077, -11026, -4851, 4884, -2998], [50320, -15243, 14716, 5923, 5384], [4791, 18003, 1278, 14883, 693], [-14622, -20672, -9442, -3936, 8176], [-20705, -6807, -1663, 9661, -3788], [39618, 5471, -3349, 8611, -12268], [-9262, -4424, -2160, -14444, 2654], [48963, 10263, -4351, 13729, -7469], [-10394, 3488, -3181, -12014, 17474], [-22789, 7846, -1477, -2666, 12375], [31531, 3007, 2137, 12015, -14770], [-4115, 736, -7241, -7750, 14304], [26234, 29400, -21702, -5290, 4947], [-36664, -10355, -21308, -12053, 7874], [39596, 906, 29322, 8646, 1180], [-13226, -18304, -6614, -5686, -5995], [-1816, -6684, 252, -16048, 7060], [86289, -4189, 4682, 12259, -5699], [-30901, 7126, -18906, -13720, 2289], [-3643, 29441, -15146, 19573, -335], [13675, 17378, -4577, -3786, -3775], [-59339, 1989, 1429, 43, 3589], [-103983, -15309, 15435, -7493, -1446], [62661, 2501, -4679, 10547, -17493], [8907, -35078, 4974, 9448, -1527], [-32484, 42060, -200, -2252, -424], [-87559, 346, -952, 132, 3923], [-18899, -2580, 1663, -11898, 7962], [-22586, 7120, -13160, 25760, -8352], [-37831, -17289, -12753, 10995, 6038], [-31582, 6564, -8466, -10586, 25739], [10692, -17199, 9656, -6357, -1378], [75033, -10348, -1673, 698, -1682], [13474, -3226, -11770, 14434, -10998], [-37850, 1832, 18116, -1556, 710], [-779, 1984, -23643, -4228, 4709], [-70677, -12172, 17777, 3572, -3667], [-101595, 7677, 14327, -6033, 7541], [7437, 1801, -7194, -12455, 5891], [-19446, 28036, -12828, 7760, 4100], [-48337, 6684, -9529, 3916, -3239], [-16305, -41967, 5821, 3827, 4405], [-83058, -21321, 11758, -16411, 4020], [43835, 16138, -18283, -1018, 655], [12816, -30988, 26292, 7974, -4527], [48908, -12586, -21698, -11042, 19082], [5580, 5408, -19310, -11280, 24188], [-61504, -12800, 4440, 3256, 12474], [-37953, 5711, 9068, 14027, -17733], [23512, -24985, 14016, -13671, 16442], [-27074, -6138, 21312, 426, -11064], [45545, -30842, 1811, -13590, -5635], [18373, 41027, 11783, 11937, -15779], [-67178, 14465, -3204, -6153, -6156], [26333, -16996, -30969, 3478, 3556], [-79097, -10127, 29569, 6697, -5354], [-11600, -10285, -9444, -4771, -2410], [45145, 10083, -7541, -16349, 16396], [-57903, -16968, 23975, 8512, -1049], [-61142, 25528, -15708, -756, 3062], [-14995, 3375, -6001, -11671, 11613], [26935, -11148, -31063, -1200, 4807], [4264, -10407, 13064, -16853, 22942], [2461, -930, -22117, -12984, 1332], [59744, 19616, -24936, -14620, 14044], [-40131, -22896, -892, 798, -8339], [-11531, 31939, 15079, -3871, -1065], [33324, 8812, -564, -4156, 2702], [-56560, 4516, -13708, 1490, -9027], [-57210, -12158, -924, -13354, -2774], [-79380, -2657, 3818, 3773, -4036], [16935, -4300, 10093, -10418, -3958], [-107659, 41518, -25425, 11592, -13562], [-46726, 8256, -20118, 324, -6384], [-23560, -10951, 38696, 6419, -5386], [27504, 28058, 14920, -4926, 2616], [-348, 30293, -16486, -1941, -5912], [-7612, -20888, 24111, 662, -1300], [139851, -37207, 12902, 9, -3569], [-1651, -11160, 8701, -4560, -6211], [77386, 27897, -13587, -3379, 2088], [-69562, -26, 5484, -5922, 19668], [100603, 227, -20428, -7021, 13211], [-63651, -29233, -13107, -14031, -8321], [-96496, -20788, 17984, 20236, 100], [-22930, 18632, 32760, 5152, -452], [72218, 17491, -179, 21075, -14378], [-22798, -22020, 28872, 12780, -16328], [-56744, -19194, 23396, -10230, 532], [17179, 23371, -15902, 40303, -12121], [-22185, 19024, -16665, 26660, -6381], [46173, -48593, 12349, 12785, -6111], [1598, -7931, -5520, 7515, -3488], [27155, 6146, -2299, -5386, -6383], [9546, -8725, 12871, 8039, -10158], [6471, -4437, 29867, 7553, -519], [96822, -6789, -26722, 5015, -4823], [8355, 1678, 37803, 16938, -15311], [119501, 18794, 9656, 652, -2275], [43782, -4548, -19640, -27568, 20798], [120384, -116, -296, -21644, 12052], [4392, -31289, -20130, -8395, 16082], [-122585, 2731, -5383, -8065, 10150], [-53844, 24036, 16504, -16332, 10504], [19083, -33672, -5339, 3242, 15516], [34284, -42387, 5551, -13311, 13116], [25332, -15193, -1392, 2529, -334], [32015, 9977, -3516, -3183, 24377], [-180958, 12302, 3728, -4402, 18222], [-25022, 37116, 1618, -13178, 13229], [-47635, 13103, 11318, -9841, 26197], [-29825, 20684, 437, -14218, -534], [31624, 15696, -33966, -15380, 27744], [72200, 2902, 16202, 32890, -14364], [-45522, 30326, -33776, 32822, 294], [-1916, 1687, 7236, -1831, 16920], [40018, 24597, -10254, -9429, -20], [17500, -7324, 30012, 7700, -8532], [-25126, 33455, -22531, 13971, 13168], [14520, -36765, 2374, -17711, -21926], [48242, 3931, 4402, -11345, 23897]]
