# SageMath code for working with modular form 17689.2.a.bb # Compute space of new eigenforms: from sage.modular.dirichlet import DirichletCharacter H = DirichletGroup(17689, base_ring=CyclotomicField(2)) chi = DirichletCharacter(H, H._module([0, 0])) B = ModularForms(chi, 1).cuspidal_submodule().basis() N = [B[i] for i in range(len(B))] # Compute space of new eigenforms: from sage.modular.dirichlet import DirichletCharacter H = DirichletGroup(17689, base_ring=CyclotomicField(2)) chi = DirichletCharacter(H, H._module([0, 0])) N = Newforms(chi, 2, names="a") # select newform: traces = [3,-2,3,6,2,1,0,-3,2,-9,7,-2,-2,0,7,-4,-7,-6,0,-1,0,6,14,13,-1, 9,6,0,3,-17,-11,-8,10,-12,0,-9,0,0,-7,8,-7,0,-4,11,19,-23,-8,-23,0,-1, -26,1,1,-33,-3,0,0,18,-10,-4,6,12,0,-5,-14,7,3,5,3,0,0,24,-1,29,20,0,0, 17,4,-5,-1,-24,-31,0,-7,18,-20,-1,-28,-19,0,39,-24,25,0,-6,-30,0,0,-23] 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