# SageMath code for working with modular form 24843.2.a.ez # Compute space of new eigenforms: from sage.modular.dirichlet import DirichletCharacter H = DirichletGroup(24843, base_ring=CyclotomicField(2)) chi = DirichletCharacter(H, H._module([0, 0, 0])) N = Newforms(chi, 2, names="a") # select newform: traces = [24,7,24,25,0,7,0,18,24,2,16,25,0,0,0,31,-2,7,26,-5,0,15,-12, 18,16,0,24,0,3,2,45,43,16,26,0,25,52,-8,0,-7,-5,0,-9,51,0,32,-2,31,0,63, -2,0,34,7,-1,0,26,9,-5,-5,-11,54,0,36,0,15,34,0,-12,0,45,18,19,-37,16, 72,0,0,8,-25,24,-4,-12,0,80,-13,3,42,-21,2,0,16,45,-26,-26,43,32,0,16, -25] 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