
# q-expansion of newform 192.7.e.f, downloaded from the LMFDB on 19 January 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 = 192
weight = 7
poly_data = [2, 0, 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], 1], [[0, 12], 1]]

hecke_ring_character_values = [[127, [1, 0]], [133, [1, 0]], [65, [-1, 0]]]
aps_data = [[0, 0], [21, 1], [0, 10], [-2, 0], [0, -2], [2950, 0], [0, 264], [5258, 0], [0, 604], [0, -130], [-22898, 0], [-34058, 0], [0, -988], [-6406, 0], [0, -10600], [0, 11346], [0, -19258], [62566, 0], [438698, 0], [0, 4020], [-730510, 0], [-340562, 0], [0, 29242], [0, -22788], [-281086, 0], [0, 55706], [865726, 0], [0, 86862], [-650810, 0], [0, 102776], [2280526, 0], [0, -63166], [0, -164012], [4573946, 0], [0, -262814], [2208094, 0], [1288870, 0], [879914, 0], [0, -351644], [0, -24682], [0, 17802], [6476182, 0], [0, 295904], [3500930, 0], [0, -286038], [9509758, 0], [7064138, 0], [-4668914, 0], [0, 1158034], [4481782, 0], [0, 135108], [0, 155896], [-6995806, 0], [0, -1679322], [0, -11008], [0, 507668], [0, 444966], [-13944530, 0], [-28129322, 0], [0, 1316572], [10141850, 0], [0, 1640890], [-36325366, 0], [0, -2120852], [40109906, 0], [0, 2323886], [27836282, 0], [-23789662, 0], [0, -3147082], [-47167706, 0], [0, -1033808], [0, -3643068], [34046062, 0], [51578134, 0], [42882842, 0], [0, -891584], [0, 3625802], [85581574, 0], [0, 2414408], [61055570, 0], [0, -1996750], [19615606, 0], [0, -2366376], [-845854, 0], [74820382, 0], [0, 7380166], [0, -6647520], [157358450, 0], [0, -10789690], [-177977810, 0], [0, 5514234], [0, 6344048], [4144318, 0], [0, -7032562], [117435530, 0], [0, 11770572], [0, 6642382], [0, 6751764], [-149806150, 0], [157017382, 0], [-279468502, 0], [0, 8856150], [0, -4878070], [0, 15157420], [28403930, 0], [65247554, 0], [0, -3928802], [0, 9034728], [0, -12863108], [108477650, 0], [343321486, 0], [-296325002, 0], [0, -7817980], [-414773062, 0], [-303858146, 0], [0, -10702592], [173810666, 0], [0, -14326956], [0, 2637286], [0, -6692390], [99346390, 0], [-279411838, 0], [0, -2411782], [0, 22053486], [115164362, 0], [0, -3333522], [128651830, 0], [0, 11847144], [-523207586, 0], [657372454, 0], [350495210, 0], [0, 27498628], [33699310, 0], [-298551530, 0], [0, -23493748], [-517372414, 0], [0, -10797558], [314717834, 0], [0, -46443266], [0, -61721436], [-117929734, 0], [0, 3546962], [-16062050, 0], [0, -21605946], [363153382, 0], [0, -51895756], [384724438, 0], [0, 20190652], [-387442726, 0], [0, 3809712], [499281478, 0], [0, 53904888], [7852106, 0], [0, 65252236], [1161927866, 0], [0, -21297976], [-1204308002, 0], [0, -37354352], [-247137550, 0], [0, 55234198], [0, -88244342], [0, 2523756], [1163220478, 0], [0, 82079262], [0, -46077208], [0, -51867460], [1839149710, 0], [-569927306, 0]]
