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