
# q-expansion of newform 9075.2.a.m, downloaded from the LMFDB on 09 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 = 9075
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 = [[1], [-1], [0], [-1], [0], [2], [-3], [3], [-1], [-6], [2], [3], [-3], [12], [1], [6], [-3], [10], [6], [-7], [2], [-7], [-6], [-14], [-3], [11], [8], [-8], [12], [-18], [-19], [-2], [16], [-4], [-15], [20], [18], [10], [-6], [9], [-15], [-5], [-3], [4], [21], [-26], [-16], [-14], [-22], [23], [-9], [-24], [-22], [20], [-6], [0], [-6], [-19], [-10], [17], [-1], [-21], [4], [8], [-19], [-30], [-16], [-34], [2], [6], [-18], [14], [6], [12], [-14], [24], [-12], [-2], [-22], [-10], [-37], [-15], [6], [6], [-35], [-13], [0], [-2], [38], [-22], [32], [-14], [40], [30], [8], [4], [-34], [-28], [29], [8], [17], [14], [36], [39], [-20], [-5], [-33], [6], [23], [-42], [0], [-32], [-18], [4], [-32], [28], [12], [-43], [-2], [34], [-29], [32], [22], [-31], [-20], [-23], [-9], [-4], [8], [14], [41], [26], [24], [-10], [-26], [-44], [-36], [37], [52], [31], [47], [-30], [10], [40], [-14], [0], [6], [-23], [-6], [24], [38], [-20], [16], [54], [-32], [29], [25], [32], [-16], [-49], [-37], [-51], [-16], [51], [-24], [1], [10], [-12], [-4], [-4], [26], [-34], [-18], [-44], [-20], [-32], [-37], [-48], [-7], [-36], [40], [38], [43], [18], [-32], [-40], [20], [52], [40], [-30], [-30], [36], [22], [8], [-18], [-12], [-14], [-34], [5], [-32], [-15], [40], [-11], [4], [45], [-48], [54], [-6], [55], [-28], [-28], [30], [18], [-3], [-32], [23], [-21], [65], [-37], [-16], [18], [-56], [72], [26], [-6], [-22], [-48], [-75], [-29], [-30], [23], [49], [-13], [59], [10], [34], [-37], [-53], [43], [9], [53], [15], [50], [-57], [39], [22], [-54], [5], [4], [24], [48], [29], [-24], [54], [50], [-32], [1], [68], [12], [-4], [-37], [52], [50], [14], [-70], [62], [-42], [-6], [29], [41], [31], [-2], [26], [57], [-76], [50], [-27], [-10], [-26], [-62], [-30], [58], [52], [-24], [-60], [5], [-7], [-11], [-16], [-79], [-24], [-59], [15], [42], [76], [-30], [-18], [8], [-2], [19], [-56], [-77], [39], [-20], [-18], [-42], [-69], [-55], [61], [-20], [-56], [42], [33], [72], [36], [24], [-75], [-58], [85], [22], [5], [38], [-3], [34], [-42], [21], [-26], [16], [-76], [1], [-48], [18], [25], [-14], [23], [-47], [2], [-42], [9], [27], [-75], [12], [86], [-4], [16], [-90], [-61], [-78], [90], [-2], [65], [-53], [-78], [-77], [48], [-27], [15], [-42], [33], [-8], [36], [1], [-5], [-80], [-32], [-89], [-77], [16], [4], [-40], [-10], [-60], [51], [-35], [-61], [36], [-20], [88], [-10], [58], [24], [22], [-69], [46], [-76], [-59], [-58], [39], [-73], [72], [7], [60], [17], [74], [60], [-58], [25], [84], [48], [-81], [-34], [-30], [16], [28], [61], [-101], [-6], [10], [0], [43], [-70], [3], [21], [57], [-52], [-78], [-70], [-84], [-16], [36], [-50], [-48], [25], [-96], [-67], [34], [-59], [-27], [40], [-60]]
