
# q-expansion of newform 8800.2.a.m, downloaded from the LMFDB on 24 September 2025.

# 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
    R = PolynomialRing(QQ, "x")
    f = R(poly_data)
    K = NumberField(f, "a")
    betas = [K.gens()[0]**i for i in range(len(poly_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 = 8800
weight = 2
poly_data = [0, 1]

# The basis for the coefficient ring is just the power basis
# in the root of the defining polynomial above.
hecke_ring_character_values = None
aps_data = [[0], [-1], [0], [4], [1], [2], [8], [6], [-5], [4], [1], [-3], [-6], [6], [12], [6], [3], [0], [-11], [-5], [10], [-2], [2], [-5], [-13], [-4], [-16], [16], [2], [-1], [-2], [-8], [3], [-8], [4], [-10], [23], [-20], [-18], [14], [-13], [7], [11], [12], [18], [-24], [4], [-13], [0], [27], [12], [6], [-20], [15], [10], [12], [-18], [-22], [-10], [18], [8], [-22], [-22], [-8], [25], [19], [13], [-36], [-30], [0], [-3], [-6], [7], [8], [17], [-13], [17], [10], [-14], [-14], [8], [-34], [-16], [19], [4], [21], [23], [0], [0], [-7], [5], [6], [11], [24], [20], [-14], [19], [-7], [-18], [-10], [44], [-36], [8], [4], [-4], [27], [12], [-4], [-16], [-32], [38], [-16], [26], [29], [-7], [35], [-7], [-3], [13], [50], [-19], [10], [-12], [20], [11], [36], [-5], [21], [27], [-24], [-34], [12], [43], [26], [42], [38], [-34], [4], [51], [-6], [-14], [-2], [15], [42], [-7], [-55], [-38], [48], [15], [-48], [6], [37], [28], [14], [-28], [-48], [10], [2], [-10], [-42], [-27], [-4], [4], [-51], [7], [59], [-56], [52], [-14], [29], [-6], [2], [34], [-26], [-37], [-39], [20], [-29], [28], [-28], [-24], [10], [51], [-34], [-43], [-22], [-42], [-28], [-32], [-42], [43], [0], [-45], [6], [-2], [-47], [52], [13], [14], [-40], [-18], [-26], [-42], [4], [-47], [-13], [-61], [32], [-12], [4], [16], [-9], [-69], [-12], [40], [-17], [-38], [24], [0], [-39], [26], [-22], [21], [-59], [-58], [38], [30], [0], [-22], [-70], [-37], [38], [-58], [28], [-55], [42], [9], [-6], [37], [27], [-1], [-32], [-24], [-7], [-72], [24], [32], [-20], [-50], [-50], [8], [-48], [-3], [-2], [8], [32], [62], [60], [19], [-44], [-16], [10], [-32], [60], [18], [-20], [-57], [37], [-26], [50], [73], [-29], [-10], [34], [26], [-53], [67], [-18], [50], [-70], [-30], [-5], [46], [58], [32], [43], [18], [72], [7], [-36], [-39], [-24], [-52], [44], [-64], [-10], [-41], [-51], [44], [62], [0], [-58], [64], [-76], [41], [61], [-29], [-15], [40], [-66], [60], [-54], [6], [49], [8], [-56], [9], [-38], [46], [-54], [2], [-61], [-8], [29], [30], [83], [-47], [-29], [42], [36], [-50], [34], [-28], [44], [60], [-67], [-35], [-52], [-17], [-56], [7], [-27], [-34], [13], [-59], [-90], [55], [59], [62], [-63], [-10], [69], [-38], [12], [-28], [30], [35], [18], [98], [-15], [90], [-40], [15], [-16], [39], [55], [30], [50], [-34], [-17], [72], [-52], [34], [-22], [47], [20], [36], [-46], [30], [-12], [30], [93], [-88], [8], [72], [3], [-12], [7], [10], [23], [-23], [-79], [-1], [-73], [13], [-58], [-36], [30], [-16], [-58], [-60], [35], [-48], [42], [-24], [0], [-78], [30], [52], [-75], [-54], [64], [-36], [64], [28], [85], [4], [-57], [98], [50], [-17], [-92], [0], [-36], [50], [-71], [39], [36], [-107], [16]]
