
# q-expansion of newform 6750.2.a.f, downloaded from the LMFDB on 05 June 2024.

# 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 = 6750
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 = [[-1, 0], [0, 0], [0, 0], [1, 0], [-1, 2], [-3, 2], [1, 1], [-3, -1], [5, -2], [1, -4], [-9, 3], [4, -4], [7, -5], [2, -6], [5, 1], [-3, 1], [5, -2], [-3, -3], [1, -4], [-8, -2], [-3, 5], [-6, 0], [10, -8], [-4, 1], [-9, 8], [-3, 7], [5, 0], [-9, 16], [2, -5], [0, -9], [-5, -3], [-6, 8], [-11, 8], [0, -6], [-1, 8], [-13, 12], [4, 8], [-7, -3], [4, -2], [-6, -1], [-15, 10], [-13, 12], [-3, -2], [10, -3], [-9, -3], [-2, -15], [-6, 12], [21, -1], [2, 5], [-9, -3], [-1, -11], [9, -15], [-18, 10], [3, -6], [-1, 5], [5, -4], [15, 2], [-7, 1], [25, 2], [3, -5], [-19, 18], [4, -1], [-3, -6], [9, 6], [13, -18], [-3, 8], [-8, 6], [6, -24], [-9, 20], [-1, -6], [3, -8], [-31, 5], [-9, 24], [6, 0], [18, -17], [-18, 14], [13, -26], [-17, -7], [25, 7], [10, -28], [23, 5], [-11, 20], [-23, -8], [-26, 18], [-24, 3], [9, -23], [-24, 18], [-13, 24], [-26, 14], [-10, 12], [-27, 12], [18, 3], [-21, -9], [30, -13], [8, 0], [-12, -9], [27, -12], [-40, 4], [-1, 16], [-3, 6], [12, 6], [15, -24], [-10, -7], [-18, 16], [4, 8], [20, -21], [-11, 10], [-14, 31], [6, 17], [11, 0], [-15, 0], [-20, 6], [-18, -16], [17, -17], [23, -24], [20, -10], [7, -31], [2, -14], [15, -8], [10, -20], [-12, 17], [15, -11], [14, -31], [10, -17], [15, -36], [23, 7], [-9, 20], [1, -2], [27, 6], [6, 5], [5, 0], [-18, -11], [-12, -15], [-6, 6], [-15, 36], [-16, 18], [-39, 14], [17, -20], [-40, 8], [-8, -8], [-26, 0], [-37, 11], [-15, 7], [-7, 35], [-36, 22], [10, -37], [46, -4], [-49, 5], [-34, 12], [28, -34], [-18, 3], [-27, 0], [-42, 12], [-9, 21], [42, 7], [27, 18], [15, 26], [-47, 16], [-2, -36], [24, -30], [21, 12], [-53, 8], [-30, 31], [9, -20], [-25, -7], [24, -21], [4, 8], [-14, 18], [23, 1], [-37, 37], [40, -26], [36, -41], [2, -10], [43, -3], [4, 15], [0, 39], [39, 1], [7, 19], [-33, 30], [-6, 21], [-22, 6], [-13, 14], [-21, -12], [0, -19], [20, 17], [-31, -16], [-55, 3], [27, 9], [30, 18], [28, 13], [15, -2], [25, -5], [-1, -14], [-65, 5], [34, -23], [-42, -16], [21, -20], [26, -15], [25, -14], [27, -7], [20, 26], [3, 10], [-9, -21], [-21, 16], [47, -31], [-5, 32], [35, -20], [40, -2], [12, -2], [-1, -2], [11, -2], [11, -5], [-34, 19], [45, -24], [-18, 24], [-39, 36], [54, -10], [-21, -3], [-29, 52], [47, -32], [9, -20], [35, -27], [24, -42], [-3, 36], [-1, -14], [28, 15], [-25, 2], [36, -38], [35, 7], [49, 13], [36, -30], [-4, 16], [39, -43], [23, -49], [-59, 18], [-25, 46], [35, 25], [30, 25], [-1, 44], [-25, 7], [-37, 19], [32, -3], [26, 13], [-5, 47], [-4, 5], [22, -47], [-25, -9], [-36, 23], [-2, 33], [28, -17], [18, -27], [6, 30], [14, 26], [7, 21], [17, -2], [-17, 44], [50, -11], [-37, 1], [16, -43], [39, -44], [43, -13], [58, -23], [-52, 12], [-8, -9], [-23, 40], [-28, 30], [24, -49], [-23, 2], [-10, 33], [-31, 44], [42, 6], [-37, 42], [13, -54], [15, -18], [26, 13], [8, -27], [9, 14], [48, -36], [-23, 2], [-48, 46], [24, -30], [6, 26], [-3, 27], [-30, 17], [23, -59], [-44, 28], [-34, 36], [45, -33], [-25, 36], [33, -37], [36, -36], [-21, 24], [-65, 16], [7, -52], [36, 1], [-44, 19], [5, -6], [1, 43], [25, -1], [28, -10], [-40, 4], [37, -64], [-36, 2], [55, 4], [-12, 0], [5, 30], [18, -21], [-32, 0], [73, -4], [2, -42], [42, 3], [18, -32], [-15, -18], [12, 14], [78, 0], [-46, 21], [26, 14], [-3, -12], [-21, 57], [-50, 62], [-8, -43], [-12, 12], [-1, 46], [51, -2], [15, -18], [-3, -36], [-13, -17], [26, -24], [36, 16], [30, 36], [1, 0], [-39, 24], [-47, -19], [35, 2], [42, -12], [1, 44], [-24, 18], [28, 29], [-41, 39], [-19, 21], [-42, 21], [-12, 18], [-31, 32], [25, -12], [-17, 34], [-34, 17], [-57, -21], [-3, 28], [-27, 12], [48, -57], [25, -30], [-51, 44], [-15, 15], [-56, 18], [-30, 6], [-26, 46], [-3, 30], [20, 29], [-18, -34], [28, -17], [32, -45], [-6, -13], [-3, -36], [-15, -30], [27, -58], [-55, 49], [41, -55], [-49, -14], [-18, 21], [-1, 28], [-20, 0], [54, -47], [4, 55], [-51, 8], [55, -30], [-6, -23], [36, -48], [0, -45], [50, -28], [-82, 3], [-41, -2], [-49, 58], [-8, 21], [-12, 0], [6, -42], [63, 18], [1, 9], [70, -1], [15, 48], [-32, 4], [-58, -3], [21, 33], [-33, 46], [15, -54], [-64, 43], [66, 21], [-48, 41], [-5, -35], [-24, 13], [-47, -4], [48, -72], [-78, 32], [-25, -11], [1, -53], [58, -38], [-39, 11], [-15, 12], [-30, 9], [-20, 12], [-4, -20], [-7, -3], [9, -63], [81, 0], [-70, 42], [9, -50], [0, 42], [17, -40], [-72, 21], [22, -61], [85, -2], [-4, 5], [-53, 48], [40, -11], [-22, 4], [56, -9], [30, -16], [-83, -10], [36, -10], [-1, -38], [-13, -22]]
