# SageMath code for working with modular form 16245.2.a.bw # Compute space of new eigenforms: from sage.modular.dirichlet import DirichletCharacter H = DirichletGroup(16245, base_ring=CyclotomicField(2)) chi = DirichletCharacter(H, H._module([0, 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(16245, base_ring=CyclotomicField(2)) chi = DirichletCharacter(H, H._module([0, 0, 0])) N = Newforms(chi, 2, names="a") # select newform: traces = [6,-3,0,5,-6,0,2,-6,0,3,0,0,8,-10,0,3,-4,0,0,-5,0,0,2,0,6,-20, 0,26,-4,0,12,-15,0,-7,-2,0,0,0,0,6,-12,0,4,-6,0,24,-6,0,16,-3,0,20,-26, 0,0,-22,0,-10,-16,0,-20,25,0,14,-8,0,12,27,0,10,8,0,4,16,0,0,24,0,12,-3, 0,-26,-22,0,4,44,0,-16,8,0,-2,-36,0,-7,0,0,-30,-49,0,5] 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