
# q-expansion of newform 230.6.a.a, 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 = 230
weight = 6
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 = [[-4], [8], [-25], [199], [150], [-1202], [735], [-22], [-529], [-5525], [-95], [-397], [20633], [-11384], [1992], [-7349], [-23827], [-44016], [-37713], [-50057], [-16698], [-31004], [-70077], [7676], [-150094], [-95545], [-67960], [160011], [-119442], [206491], [310260], [-16060], [175094], [69059], [-150080], [-462052], [-211807], [-119454], [311784], [485184], [-260664], [111496], [282032], [-107808], [417830], [-322018], [1022281], [1073234], [-532220], [176824], [-442996], [-1306071], [1609806], [-1138182], [216048], [1597693], [1798545], [-579025], [-781034], [-261022], [-190871], [-769679], [551346], [-3258896], [267129], [2417484], [-1623155], [-1788086], [-1357988], [-2824457], [1299720], [345284], [4838333], [303566], [-2005284], [-187083], [4769362], [2607524], [-123598], [-6661939], [-2357662], [3375750], [2043108], [-546629], [2472432], [3685504], [908395], [406629], [6757102], [1218914], [5805027], [4279652], [-2752628], [9213799], [7864479], [-3721631], [1861506], [6781310], [6130108], [-10049466], [2254104], [3995803], [-9213795], [2922258], [-14427992], [-5784452], [-9120498], [-6637500], [-13253408], [-4348565], [14542408], [-15334906], [16754777], [13604980], [-13546360], [4500966], [620123], [-15634062], [2463298], [12853662], [15720274], [14319756], [-17936307], [20056324], [-7258468], [-9824928], [-13976916], [-12446935], [-12481907], [-8202597], [15612777], [-21483488], [-13902466], [-25915195], [-27707475], [26091880], [-16303818], [7361003], [11091645], [2303935], [17603001], [9041370], [8443864], [3109569], [-1211263], [-6712286], [21815322], [-38107274], [30590253], [-34374942], [-8014218], [-32842056], [1013800], [24044618], [29579791], [-16865352], [-42481356], [-10680205], [-40221334], [10576272], [29013196], [50764986], [-22684372], [13183964], [26875189], [-11014361], [-33709211], [20182360], [5779204], [41008368], [-27596148], [49967481], [-55773106], [-39502029], [-18791248], [-63827080], [-5997676], [-49542489], [1607705], [59589686], [3602646], [-13074936], [58745650], [15669098], [-78338211], [-56232362], [1695634], [16973617], [44619449], [16947867], [-4061266], [-64705866], [14574962], [45377097], [-40166432], [13437717], [-36731118], [-49451186], [27119182], [32502726], [-29322208], [-38401180], [-76743406], [-19116082], [-31190588], [-78419618], [-110828436], [-56171010], [44482689], [-60261772], [89914870], [35841662], [-73133192], [-65466732], [-12045187], [80177756], [116106794], [29089169], [84189421], [99343854], [-45238471], [-109639226], [-93502957], [-117065555], [-126129510], [-68606781], [74739886], [70021777], [100322100], [-74449653], [-124450402], [-98671518], [117811146], [152564283], [90055471], [150738716], [-60898924], [-106933350], [90492905], [111791047], [70169339], [-22074623], [66185518], [-71552946], [13145644], [-100458460], [-153495556], [-20426594], [70279870], [60966759], [145281390], [-72296290], [82475997], [155181026], [4669446], [13565009], [20776608], [111403272], [-87777046], [-20079954], [8418981], [-53458215], [-94868713], [-133446163], [-25511480], [-32036740], [-59257620], [107215098], [141889529], [-67708948], [-26627203], [45027303], [68533579], [-130666774], [64250852], [-63485566], [-39066108], [248613209], [105162572], [-54393464], [-162484266], [-191173792], [112994168], [263073684], [-2034802], [484295], [96378307], [-245491918], [172009288], [-129873150], [-294940482], [-3897867], [211039052], [-311140432], [173885792], [6401296], [45754006], [187291050], [-150287505], [-314054530], [119178413], [-39944509], [-159305336], [233745508], [334529828], [-100501148], [56177762], [-251462546], [181572876], [-48375876], [235506828], [67552270], [-18262980], [145969580], [66596705], [-62972264], [-262859163], [-160007095], [-297437541], [-184104202], [208452068], [-373484383], [-235696350], [-83700626], [-36374461], [356930044], [188475220], [-198160514], [-82039568], [120085897], [59698615], [-365847438], [-253155433], [231788594], [15462308], [222009520], [-163518430], [-18740286], [39402922], [437600831], [-31598418], [-395044470], [-377947486], [-324469768], [-406035467], [275066335], [65995337], [-198437630], [150854202], [408713829], [488482923], [-17618008], [126271427], [320152209], [3425448], [215352826], [438018930], [83510250], [-420842286], [203816262], [-219735189], [44513773], [-331809802], [277529136], [66236342], [-341457198], [102131412], [-167496205], [-288041012], [-125594821], [-256477599], [194789446], [3578160], [49428720], [-231423454], [-90514471], [218215446], [537328175], [490768344], [691715630], [120372870], [-81407770], [26629292], [536059546], [322527300], [-83604158], [364374989], [223770148], [700723687], [701870503], [174246826], [408494570], [-268818661], [-684194044], [-294419362], [-570243625], [545369254], [-48256], [-516327664], [292250069], [5467403], [-145585158], [497142869], [-376997335], [-287791701], [43875755], [-667736267], [432419882], [159401252], [-423074868], [-687385244], [291734338], [368625300], [-186148736], [-396198363], [-12045182], [-126734000], [606900088], [605188887], [508485692], [-530918954], [218933278], [-684244446], [-97688236], [-255012304], [-576203076], [-621242916], [101787011], [-190899940], [595943483]]
