
# q-expansion of newform 6300.2.a.j, downloaded from the LMFDB on 19 June 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 = 6300
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], [0], [0], [-1], [1], [-2], [-8], [-2], [-1], [-1], [6], [9], [0], [-1], [-6], [-2], [6], [8], [-3], [-7], [16], [1], [6], [14], [14], [12], [10], [-12], [-7], [9], [5], [16], [-10], [-4], [-11], [19], [-12], [-16], [2], [-6], [20], [12], [-8], [11], [-27], [0], [12], [-4], [14], [2], [7], [12], [-14], [12], [2], [25], [-6], [-2], [-14], [15], [10], [18], [-4], [20], [18], [-31], [21], [-18], [25], [26], [-10], [-3], [4], [-1], [37], [2], [-25], [-6], [-1], [-26], [-26], [-17], [24], [4], [-26], [24], [-23], [-17], [34], [-24], [18], [34], [7], [-3], [36], [38], [18], [18], [-32], [35], [-27], [45], [-26], [-41], [-23], [-2], [36], [-24], [27], [40], [-38], [9], [-29], [-10], [29], [-13], [-4], [30], [34], [36], [-22], [18], [-22], [-39], [-48], [-6], [22], [52], [44], [28], [-1], [-36], [4], [37], [-40], [-20], [50], [-28], [12], [13], [-2], [-34], [57], [5], [-12], [16], [16], [40], [-26], [1], [14], [-14], [-19], [-8], [28], [-53], [25], [-28], [40], [-30], [-28], [-11], [16], [14], [3], [-54], [61], [-2], [-5], [-36], [-49], [-2], [-49], [-38], [-52], [-48], [1], [54], [-18], [-22], [39], [24], [13], [-22], [-9], [54], [23], [6], [-31], [-60], [-10], [-53], [-45], [-54], [53], [24], [5], [-31], [62], [-54], [-18], [-26], [-22], [-44], [-36], [-8], [46], [-60], [29], [68], [29], [-12], [31], [8], [-20], [4], [-5], [18], [-41], [51], [-67], [-48], [9], [-35], [70], [6], [24], [39], [28], [-23], [25], [34], [-44], [-7], [42], [10], [-48], [-27], [-31], [16], [15], [-2], [42], [47], [-6], [24], [54], [50], [-28], [-56], [-2], [-56], [40], [-60], [50], [44], [-11], [-68], [46], [-34], [16], [45], [26], [-46], [48], [64], [29], [-12], [71], [3], [28], [28], [-16], [-31], [-20], [-44], [53], [-46], [-5], [20], [-4], [32], [78], [36], [-16], [77], [-37], [-31], [20], [-38], [5], [2], [3], [80], [-69], [-60], [-60], [14], [-40], [2], [-44], [26], [69], [37], [-39], [34], [27], [-54], [15], [66], [-48], [38], [3], [-28], [-65], [56], [-6], [12], [44], [15], [-32], [-62], [22], [77], [73], [18], [49], [10], [-9], [-1], [46], [23], [-82], [-48], [-52], [22], [61], [-6], [-14], [80], [18], [35], [-4], [-11], [15], [29], [24], [-33], [66], [16], [-72], [67], [78], [-70], [-81], [14], [6], [0], [-54], [52], [-37], [-54], [48], [69], [62], [42], [-26], [-13], [3], [-3], [-38], [-69], [30], [18], [-65], [-24], [-15], [12], [-10], [-100], [-32], [-95], [-79], [1], [-20], [-84], [51], [58], [11], [32], [1], [-18], [-87], [62], [41], [-91], [4], [-6], [64], [51], [-22], [-39], [-67], [-38], [14], [54], [-29], [50], [104], [-50], [82], [-21], [36], [5], [61], [38], [80], [28], [92], [54], [94], [-52], [-72], [80], [22], [-44], [-79], [54], [28], [-86]]
