
# q-expansion of newform 8000.2.a.f, downloaded from the LMFDB on 06 April 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
    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 = 8000
weight = 2
poly_data = [-1, -1, 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, 0], [0, -2], [0, 0], [0, -1], [5, -1], [-1, -1], [-4, 4], [-2, -1], [5, -3], [-6, 2], [2, 2], [-6, 1], [-4, 7], [-8, 4], [-5, -1], [-6, 9], [2, -9], [6, 4], [-6, -2], [-4, -6], [6, 6], [2, -4], [4, 0], [5, -5], [8, -10], [-6, 8], [11, -5], [4, -2], [-4, 8], [0, -2], [-4, 12], [1, 7], [0, -4], [-3, 11], [-10, 10], [-2, 0], [10, 4], [-6, 0], [-4, 17], [-14, 5], [14, -3], [12, 2], [6, -16], [4, -10], [6, -8], [14, 2], [2, 5], [-8, 8], [-4, 14], [-12, -6], [-18, 4], [12, -14], [-13, 5], [-8, 0], [-4, -6], [-8, 3], [6, -22], [14, -22], [5, 9], [-3, -5], [-12, -8], [-9, -5], [-22, 10], [-18, 22], [-8, 24], [-19, -3], [20, -16], [-2, 20], [-18, 12], [-2, -16], [6, -4], [14, 2], [-16, -4], [-14, -5], [-9, -7], [8, 1], [-12, 4], [-22, 13], [8, -27], [-4, 13], [-8, 16], [-2, 10], [-2, 0], [2, -6], [4, 2], [26, -4], [8, -11], [18, -10], [28, -20], [4, -16], [-26, 18], [30, -20], [-11, -19], [-2, 3], [11, 13], [-27, 1], [22, -14], [-23, -5], [22, -6], [6, -16], [-4, -26], [23, 3], [-18, -6], [-23, -9], [2, 5], [6, -16], [24, -12], [6, -4], [-24, 18], [25, -1], [4, -9], [-35, -3], [-32, -10], [15, -15], [32, -18], [12, -25], [-28, 14], [-20, 19], [19, 19], [9, 7], [-18, 12], [24, 10], [26, -13], [-2, -8], [12, -20], [-10, 6], [-8, -14], [-20, 10], [20, -21], [-35, -3], [-26, -3], [21, -35], [-26, 28], [9, 1], [20, 9], [-17, 29], [6, 20], [-10, 6], [14, -19], [23, -11], [-25, -11], [2, -8], [-8, 23], [12, 2], [28, 4], [-38, 16], [-10, 17], [14, 8], [26, -7], [8, 1], [-33, 15], [32, 5], [-16, 0], [-8, 15], [4, 18], [-22, -10], [14, 22], [5, -5], [-32, 20], [22, -8], [8, -20], [-8, 4], [27, -25], [-13, -15], [10, 16], [23, -49], [18, 0], [-2, -17], [-34, -12], [-42, 1], [-19, 23], [-6, -2], [8, -10], [-22, 22], [-6, -18], [-18, -4], [10, -1], [-28, -18], [17, 13], [-34, 8], [-5, -21], [4, 36], [-26, 24], [-24, 14], [48, -9], [-44, -2], [-62, 3], [-30, -2], [-23, 11], [-12, -10], [40, -12], [-28, 24], [29, -29], [8, 0], [-10, 26], [2, -26], [45, -1], [-2, 11], [32, 2], [20, 12], [-32, -16], [46, -36], [-17, 3], [-12, 29], [14, -3], [38, 8], [24, -38], [38, -18], [2, -4], [-31, -9], [-32, 30], [-24, -6], [-12, -29], [46, -16], [-30, 0], [43, -27], [16, -33], [10, 4], [32, -40], [23, -49], [4, 28], [-26, -18], [35, -15], [8, 21], [20, -14], [-18, 36], [4, 30], [-8, -4], [13, -27], [-46, 21], [-10, 7], [37, -49], [4, -32], [0, 9], [-22, 32], [68, 3], [-3, -9], [22, 13], [34, 7], [48, -10], [-24, -24], [-31, 11], [-8, 3], [24, -18], [50, -42], [48, 4], [-15, 29], [29, -29], [51, 13], [-36, 44], [21, -3], [-28, -5], [59, -9], [-45, 5], [18, -39], [-4, 8], [30, -54], [24, -52], [30, 4], [26, -36], [-35, 37], [2, 32], [-42, 14], [-2, -44], [42, 12], [-49, 33], [-16, -8], [-20, 39], [-48, -6], [-30, 67], [-56, 8], [32, -18], [-6, 40], [50, -10], [-56, 8], [-60, 7], [52, 12], [44, -58], [-40, 29], [-18, 15], [-1, -1], [-30, 36], [-32, 48], [-40, -14], [-6, -22], [-52, 10], [-58, 14], [-74, 7], [-20, 30], [-1, -3], [-4, 34], [22, 22], [-22, -8], [28, -52], [25, -23], [36, -22], [-62, 40], [-9, -5], [29, -53], [36, -36], [-34, 46], [11, 27], [6, 48], [-26, 20], [-38, 35], [0, 36], [-24, -6], [-48, 16], [46, -52], [-13, 43], [27, -57], [60, -10], [-39, -13], [-2, 32], [-8, -5], [30, 20], [20, -60], [40, -14], [22, -56], [-20, 15], [34, 1], [16, -36], [12, 12], [-3, -27], [-6, 30], [4, -9], [14, 17], [-26, 10], [-68, 5], [-19, -35], [48, -10], [-34, -33], [-50, 60], [2, -56], [4, -24], [42, 2], [-32, 34], [32, 4], [4, -19], [24, -19], [-54, 55], [30, 6], [4, 42], [64, -12], [13, -39], [-29, 53], [-56, -12], [-70, 36], [-22, -10], [-1, -29], [36, 12], [-56, 58], [-32, 10], [75, -13], [32, -4], [-62, 12], [-22, 34], [-53, -15], [8, -30], [-52, -19], [74, -4], [44, -49], [16, -13], [-60, 0], [-14, -46], [-4, 16], [22, 0], [-56, 29], [10, -36], [66, 7], [72, 16], [-11, -11], [-8, -54], [-16, 8], [-43, 25], [22, -19], [-82, 0], [10, -12], [-40, 25], [52, -68], [-28, 2], [52, -56], [25, -11], [62, -58], [50, -55], [20, -3], [0, -24], [25, -51], [-58, 4], [-44, -23], [-20, -5], [-50, 52], [59, 17], [-20, -34], [-26, 48], [18, -28], [-30, 10], [44, -53], [-73, 45], [4, 28], [2, -4], [-40, 58], [-65, -1], [60, -64], [-8, 26], [2, 12], [17, -15], [69, -9], [44, 0], [-26, 57], [76, 6], [29, 21], [56, -54], [28, 28], [-20, -14], [-24, -26], [10, 30], [-41, 71], [14, -2], [64, -1], [-12, -56], [26, 7], [-28, 45], [5, -45], [10, -32], [-10, -21], [-54, 36], [4, 27], [-2, 3], [-94, 18]]
