# SageMath code for working with modular form 20181.2.a.bi # Compute space of new eigenforms: from sage.modular.dirichlet import DirichletCharacter H = DirichletGroup(20181, base_ring=CyclotomicField(2)) chi = DirichletCharacter(H, H._module([0, 0, 0])) N = Newforms(chi, 2, names="a") # select newform: traces = [2,2,2,2,0,2,-2,6,2,0,0,2,-4,-2,0,6,-4,2,0,0,-2,-4,8,6,-10,-12, 2,-2,4,0,0,-6,0,4,0,2,-16,8,-4,0,-16,-2,4,-8,0,4,12,6,2,-10,-4,-20,-4, 2,0,-6,0,0,4,0,12,0,-2,-14,0,-4,12,12,8,0,-16,6,-28,-12,-10,16,0,-12,20, 0,2,-8,-24,-2,0,-24,4,-4,-4,0,4,0,0,12,0,-6,4,2,0,-10] f = next(g for g in N if [g.coefficient(i+1).trace() for i in range(None)] == traces) # q-expansion: f.q_expansion() # note that sage often uses an isomorphic number field