
# q-expansion of newform 450.5.g.b, downloaded from the LMFDB on 31 May 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 = 450
weight = 5
poly_data = [1, 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 = [[101, [1, 0]], [127, [0, 1]]]
aps_data = [[2, 2], [0, 0], [0, 0], [19, 19], [-202, 0], [99, -99], [-239, -239], [0, 40], [541, -541], [0, 200], [-758, 0], [-141, -141], [-1042, 0], [759, -759], [-459, -459], [-1819, 1819], [0, -4600], [2082, 0], [-5081, -5081], [3478, 0], [3479, -3479], [0, -7680], [6081, -6081], [0, 5680], [-561, -561], [-1682, 0], [-7021, 7021], [-2159, -2159], [0, -280], [-8479, 8479], [-821, -821], [2198, 0], [-9399, -9399], [0, -13960], [0, 9000], [-23798, 0], [-29781, -29781], [-12641, 12641], [29981, 29981], [-4739, 4739], [0, 32920], [-40558, 0], [-33002, 0], [23199, -23199], [-16899, -16899], [0, 14160], [48842, 0], [35019, -35019], [-68599, -68599], [0, 98760], [53721, -53721], [0, 45600], [-57038, 0], [-39402, 0], [31121, 31121], [-60739, 60739], [0, 63800], [-113238, 0], [14739, 14739], [7278, 0], [-58601, 58601], [-95499, 95499], [-38601, -38601], [-29162, 0], [-1881, 1881], [83781, 83781], [106282, 0], [142479, 142479], [-6479, -6479], [0, 32920], [-53919, 53919], [0, 171760], [-152261, -152261], [71339, -71339], [0, 172600], [158421, -158421], [0, 146760], [83579, 83579], [42078, 0], [0, -300960], [0, -208680], [86882, 0], [125078, 0], [-5921, 5921], [0, 55280], [63561, -63561], [0, -204880], [10599, 10599], [-224242, 0], [243499, -243499], [-226919, -226919], [0, -334240], [-278541, -278541], [84118, 0], [0, -166840], [190461, -190461], [0, -223960], [297918, 0], [-200601, 200601], [-288398, 0], [-123081, -123081], [162261, 162261], [264081, -264081], [0, 8320], [283082, 0], [-260401, -260401], [-281439, -281439], [419761, -419761], [0, -136240], [234962, 0], [406779, 406779], [-135621, 135621], [-151959, -151959], [0, -22440], [-199958, 0], [-448562, 0], [-73041, 73041], [-90259, -90259], [-56019, 56019], [0, -438920], [593762, 0], [-424561, 424561], [229021, 229021], [-450999, 450999], [-432438, 0], [895838, 0], [0, 64360], [0, 239840], [438339, 438339], [-145261, 145261], [0, -738040], [579101, -579101], [-495318, 0], [536979, 536979], [908798, 0], [0, 1027040], [161061, -161061], [-772201, -772201], [299781, 299781], [0, 897040], [-115798, 0], [-1241602, 0], [13219, -13219], [394641, 394641], [0, 694760], [0, -124400], [432299, -432299], [-669159, -669159], [0, 370040], [490981, -490981], [-206181, -206181], [118478, 0], [204719, -204719], [-562179, -562179], [-492241, -492241], [-1152842, 0], [0, 337520], [0, -760240], [-75721, -75721], [1165518, 0], [-331639, -331639], [-573639, 573639], [49859, 49859], [1411318, 0], [-708639, -708639], [234221, -234221], [898762, 0], [223379, 223379]]
