
# q-expansion of newform 2032.2.a.f, downloaded from the LMFDB on 18 April 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 = 2032
weight = 2
poly_data = [-4, -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 = [[0, 0], [-2, 0], [-1, 1], [-1, 1], [3, 1], [0, -2], [-1, -1], [-1, -3], [3, -3], [2, 2], [0, 0], [2, 0], [-3, 5], [-6, 0], [-10, 2], [1, -5], [4, 2], [6, 0], [-6, 0], [0, 0], [-6, 0], [6, -6], [4, 2], [0, -6], [0, -2], [-3, -1], [-16, 0], [-8, 4], [6, -2], [-9, 3], [1, 0], [-13, 5], [6, 0], [2, -8], [-6, 0], [-11, -1], [18, -4], [13, 3], [-5, 1], [-10, 2], [9, 3], [-3, -1], [12, -4], [-2, 0], [0, 6], [-8, 8], [12, 0], [-7, 3], [-19, -1], [-10, 10], [-20, -2], [13, -5], [12, -6], [1, -5], [-24, 2], [0, 8], [-16, -2], [-20, -4], [-5, -3], [2, -8], [-2, 0], [-5, 13], [0, -6], [-15, 7], [-8, 6], [3, 5], [-6, 0], [-4, -2], [-22, 8], [21, -9], [-18, 0], [-1, -7], [18, -10], [-13, 13], [-2, -4], [-10, 10], [0, 6], [16, -6], [22, -8], [8, 6], [9, -17], [18, 6], [22, 2], [-33, 3], [7, 9], [-15, 11], [11, 7], [-1, -5], [33, -5], [24, 0], [-30, 0], [-22, -2], [40, 0], [10, 4], [0, 2], [18, -2], [2, 8], [-6, 12], [12, -4], [-7, 3], [20, 6], [-24, 2], [-22, 4], [-5, -5], [-8, 6], [5, 9], [-12, 12], [0, -6], [1, -1], [22, -4], [0, 16], [7, -15], [38, -4], [-22, 0], [8, -12], [-28, 10], [-15, -5], [-11, 7], [20, -2], [-16, -2], [20, 10], [-30, -4], [-26, 4], [4, 10], [-12, 2], [3, -3], [-14, 0], [-12, 12], [0, -16], [-6, 12], [4, 12], [5, 19], [8, 12], [-30, 4], [4, 10], [-24, -2], [-16, -2], [7, -19], [20, -10], [-9, 19], [-15, 3], [5, -1], [-16, -8], [-6, 0], [-9, -15], [-39, 11], [-7, 19], [6, 0], [-6, 12], [0, -12], [18, 0], [-4, -10], [1, 11], [21, -1], [23, -15], [20, 4], [-8, -16], [-30, -4], [12, -10], [-8, -14], [16, -22], [-15, 1], [-12, 4], [4, -16], [6, 8], [20, 4], [-4, 16], [-30, 10], [38, -12], [22, 4], [-18, 20], [-6, 22], [-12, -12], [9, -23], [0, 8], [-4, -10], [37, 3], [-34, -2], [12, 12], [25, 3], [20, 4], [2, -4], [30, -6], [3, 11], [-40, 8], [43, 5], [39, 1], [-44, 0], [41, -3], [20, -4], [-18, 4], [34, -8], [12, -14], [6, -12], [-5, 1], [-26, 4], [38, -12], [6, -12], [5, -11], [-16, 16], [-11, 7], [-22, 6], [-48, -6], [-20, 30], [-50, -8], [15, -31], [26, -18], [-31, 7], [27, 3], [29, -9], [18, 12], [-48, 6], [-3, 3], [-28, -8], [16, -8], [-8, -10], [-21, -7], [-26, 16], [31, 5], [26, 8], [-39, 3], [-32, 0], [38, -16], [64, 0], [20, -16], [28, -6], [-6, 4], [38, -22], [-28, 12], [-36, -2], [3, 5], [35, 13], [-24, -8], [-27, 1], [4, -6], [-21, 17], [16, 6], [-6, -6], [30, -8], [37, -5], [-14, 16], [0, -6], [0, 24], [-34, 24], [-18, 28], [-26, 2], [-5, 9], [-4, -4], [26, -12], [-19, -13], [-44, 2], [12, -34], [-24, -12], [12, -2], [15, 1], [-30, 0], [33, 3], [28, -16], [40, -2], [10, 20], [-24, -8], [-27, 27], [-14, -12], [28, -6], [50, -20], [56, -6], [3, 29], [-7, 13], [-23, -9], [-8, -10], [-73, 1], [28, -22], [2, 0], [-33, 29], [-2, -4], [-3, -1], [-33, -3], [22, -16], [12, -26], [2, 4], [24, 12], [-27, -13], [36, -20], [30, 14], [-10, -8], [-33, -3], [26, -12], [-8, 10], [3, -3], [24, 2], [7, 17], [-9, -7], [-11, -19], [4, 20], [63, -7], [24, 6], [-33, 9], [-24, -14], [23, 5], [-3, -9], [31, -21], [6, -10], [44, -20], [-17, 5], [50, 4], [12, -6], [16, -8], [14, 4], [16, 4], [18, -36], [52, 4], [28, -26], [-7, 17], [-16, -14], [41, -5], [38, 12], [36, -2], [-10, 2], [-1, -21], [24, -6], [-17, 5], [-78, -4], [9, 27], [17, -9], [-21, 27], [1, -19], [0, -2], [16, -16], [16, -28], [51, -19], [-76, 6], [18, -30], [3, 21], [5, 11], [-18, 0], [-40, -14], [7, -15], [-78, 0], [-39, -7], [24, -24], [34, 14], [9, 9], [-53, -11], [-36, 36], [-76, 2], [-6, 0], [-1, -23], [-24, -16], [-4, 4], [-8, 26], [-70, 4], [-22, 4], [-2, -14], [0, -8], [-46, -12], [-19, 25], [36, -12], [-22, -16], [-21, -9], [-19, 19], [29, -33], [-10, 20], [-70, 14], [12, 14], [-24, 6], [-57, -9], [24, -14], [-55, 3], [-16, 6], [-6, -24], [18, 0], [-48, -8], [56, -2], [18, -34], [-54, 20], [38, -28], [-5, -7], [-50, 20], [-1, -13], [-46, 36], [-82, 4], [-14, 4], [-40, 40], [-42, 0], [10, -28], [24, 20], [38, -6], [15, 33], [40, 8], [-31, -13], [1, -7], [32, -22], [39, 9], [-74, 12], [-24, 0], [68, -6], [-70, -2], [-30, -8], [-35, 23], [52, -2], [-30, 0], [24, -26], [-50, 2], [-40, -10], [42, 8], [-76, 12], [-21, -3], [0, -26], [-25, 9], [51, -3], [52, -18], [-10, 2], [31, 25], [26, 4], [-78, 16], [10, -26], [-35, 23], [-36, 24], [3, -33], [32, 16], [-42, 36], [9, 27], [7, -35], [67, -7], [2, -12], [-24, 18], [-11, 31], [-30, -24], [-9, 33], [-33, 9]]
