
# q-expansion of newform 9600.2.a.f, downloaded from the LMFDB on 16 March 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 = 9600
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], [-2], [-2], [-6], [6], [6], [2], [2], [4], [-10], [-2], [8], [-6], [-6], [10], [-14], [-8], [8], [-2], [0], [-12], [-10], [6], [2], [-14], [-12], [2], [14], [10], [18], [-18], [-14], [2], [16], [-2], [20], [14], [14], [6], [10], [12], [14], [18], [-12], [-6], [14], [8], [10], [14], [16], [2], [14], [14], [26], [-14], [4], [22], [10], [32], [-26], [0], [-24], [14], [-14], [-26], [-10], [-36], [2], [14], [4], [-14], [22], [2], [14], [-30], [-14], [30], [38], [-26], [-22], [-12], [38], [12], [-24], [-14], [-26], [-30], [14], [-8], [-8], [-18], [-18], [6], [18], [2], [-22], [40], [-14], [8], [14], [36], [-42], [-10], [14], [28], [6], [20], [-38], [26], [26], [30], [10], [32], [18], [4], [-42], [-38], [22], [50], [-18], [18], [24], [50], [18], [-6], [32], [30], [-34], [22], [-30], [-4], [38], [10], [54], [-6], [-8], [18], [42], [22], [10], [-14], [44], [34], [-52], [-22], [-42], [50], [54], [-50], [30], [36], [-10], [12], [28], [52], [-30], [-2], [42], [-48], [-34], [-26], [-10], [6], [-38], [-28], [18], [-26], [-22], [-14], [-14], [-48], [38], [40], [-10], [14], [42], [-54], [34], [-22], [-54], [-6], [22], [-10], [26], [-2], [-28], [6], [36], [-18], [-48], [10], [-30], [16], [38], [-66], [42], [22], [-22], [42], [-44], [18], [-14], [-54], [-66], [-48], [-12], [6], [-10], [38], [18], [34], [20], [12], [-50], [-38], [-2], [30], [-6], [50], [-12], [-26], [-2], [-8], [-6], [-50], [-48], [14], [-42], [26], [62], [28], [-22], [16], [18], [18], [58], [-38], [32], [36], [-2], [-62], [10], [-34], [60], [18], [50], [26], [38], [18], [18], [78], [74], [-2], [6], [50], [28], [-10], [22], [6], [8], [50], [14], [-2], [-26], [-70], [-34], [40], [6], [26], [40], [22], [16], [14], [50], [-12], [-14], [10], [-30], [-42], [80], [22], [-22], [-4], [-36], [30], [-46], [-44], [-42], [26], [-72], [-34], [-42], [78], [-30], [-28], [-10], [-22], [-64], [-42], [46], [-80], [28], [-50], [-34], [-36], [2], [12], [6], [70], [-30], [-82], [12], [6], [-10], [6], [-12], [22], [-10], [-62], [-42], [34], [-26], [-26], [2], [78], [-24], [18], [42], [74], [30], [-8], [12], [54], [28], [34], [54], [74], [-78], [54], [62], [10], [-8], [14], [54], [66], [-28], [-84], [18], [-22], [-18], [10], [-66], [58], [6], [-40], [-10], [54], [66], [-62], [-66], [-6], [18], [0], [14], [66], [90], [-18], [74], [34], [54], [-22], [0], [-30], [38], [-92], [-66], [-14], [46], [10], [6], [22], [-10], [-50], [-102], [36], [-26], [24], [-38], [70], [-90], [-14], [-40], [48], [-10], [8], [42], [-50], [34], [50], [14], [10], [30], [26], [-40], [18], [46], [-76], [62], [86], [-42], [32], [82], [46], [106], [-48], [78], [-18], [90], [-86], [98], [50], [42], [-10], [-82], [-20], [-54], [54], [60], [-38], [50], [10], [62], [-14], [-46], [22], [-62], [-28], [-20], [-104], [66], [-70], [80], [66], [-74], [88], [2], [-74], [50], [8], [-40], [36], [-90], [-98], [-102], [-22], [-110], [-74], [102], [10], [80], [30], [-6], [-108], [-18], [76], [-8], [6], [-62], [6], [24], [40], [94], [38], [-98], [-30], [-52], [-54], [86], [14], [-6], [-34], [-30], [-86], [-84], [-6], [90], [58], [-32], [98], [-82], [-26], [-22], [38], [10], [28], [-30], [-76], [34], [-6], [-34], [6], [-26], [-86], [-90], [-102], [-60], [38], [48], [26], [-88], [-18], [-34], [-106], [-26], [18], [-102], [-76], [-70], [26], [10], [-18], [94], [-42], [6], [-18], [-42], [24], [-30], [38], [30]]
