# SageMath code for working with modular form 20339.2.a.p # Compute space of new eigenforms: from sage.modular.dirichlet import DirichletCharacter H = DirichletGroup(20339, 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(20339, base_ring=CyclotomicField(2)) chi = DirichletCharacter(H, H._module([0, 0])) N = Newforms(chi, 2, names="a") # select newform: traces = [17,0,2,16,7,-3,8,6,17,-4,17,25,-3,23,1,10,3,-19,3,13,0,0,-11, -3,20,7,11,15,-6,-9,5,-13,2,33,25,15,20,-21,-8,-4,8,19,0,16,-5,23,-18, 86,11,48,11,-22,-14,-24,7,24,4,7,-2,-9,27,5,15,50,6,-3,0,-15,-3,-6,57, -90,-2,54,-12,13,8,48,2,4,1,4,-32,-4,44,0,10,6,79,-31,78,-2,44,-10,20, -105,17,23,17,36] 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