# SageMath code for working with modular form 30345.2.a.ea # Compute space of new eigenforms: from sage.modular.dirichlet import DirichletCharacter H = DirichletGroup(30345, base_ring=CyclotomicField(2)) chi = DirichletCharacter(H, H._module([0, 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(30345, base_ring=CyclotomicField(2)) chi = DirichletCharacter(H, H._module([0, 0, 0, 0])) N = Newforms(chi, 2, names="a") # select newform: traces = [24,3,24,27,-24,3,-24,12,24,-3,-9,27,6,-3,-24,33,0,3,12,-27,-24, -15,-6,12,24,6,24,-27,18,-3,9,27,-9,0,24,27,0,24,6,-12,33,-3,18,-18,-24, -48,21,33,24,3,0,45,12,3,9,-12,12,-39,18,-27,-6,24,-24,30,-6,-15,24,0, -6,3,12,12,-6,-12,24,24,9,6,12,-33,24,-42,6,-27,0,30,18,39,63,-3,-6,-18, 9,12,-12,27,-3,3,-9,27] 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