# SageMath code for working with modular form 35557.2.a.b # Compute space of new eigenforms: from sage.modular.dirichlet import DirichletCharacter H = DirichletGroup(35557, 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(35557, base_ring=CyclotomicField(2)) chi = DirichletCharacter(H, H._module([0, 0])) N = Newforms(chi, 2, names="a") # select newform: traces = [1,-2,3,2,-2,-6,-1,0,6,4,5,6,2,2,-6,-4,0,-12,0,-4,-3,-10,-2,0, -1,-4,9,-2,-6,12,0,8,15,0,2,12,1,0,6,0,-9,6,-2,10,-12,4,-9,-12,-6,2,0, 4,-1,-18,-10,0,0,12,8,-12,8,0,-6,-8,-4,-30,8,0,-6,-4,9,0,1,-2,-3,0,-5, -12,-4,8,9,18,15,-6,0,4,-18,0,-4,24,-2,-4,0,18,0,24,4,12,30,-2] 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