def test_an_list(self): r""" Checking utility: an_list """ # (1 - 2^{-s})^{-1} (1 - 3^{-s})^{-1} euler1 = lambda p: [1, -1] if p <= 3 else [1,0] t1 = an_list(euler1, upperbound=20) expect1 = [1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0] self.assertEqual(t1, expect1) # (1 + 2^{-s})^{-1} (1 + 3^{-s})^{-1} euler2 = lambda p: [1, 1] if p <= 3 else [1,0] t2 = an_list(euler2, upperbound=20) expect2 = [1, -1, -1, 1, 0, 1, 0, -1, 1, 0, 0, -1, 0, 0, 0, 1, 0, -1, 0, 0] self.assertEqual(t2, expect2)
def test_an_list(self): r""" Checking utility: an_list """ # (1 - 2^{-s})^{-1} (1 - 3^{-s})^{-1} euler1 = lambda p: [1, -1] if p <= 3 else [1, 0] t1 = an_list(euler1, upperbound=20) expect1 = [1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0] self.assertEqual(t1, expect1) # (1 + 2^{-s})^{-1} (1 + 3^{-s})^{-1} euler2 = lambda p: [1, 1] if p <= 3 else [1, 0] t2 = an_list(euler2, upperbound=20) expect2 = [ 1, -1, -1, 1, 0, 1, 0, -1, 1, 0, 0, -1, 0, 0, 0, 1, 0, -1, 0, 0 ] self.assertEqual(t2, expect2)
def coefficients_list(self, upperbound=100): from lmfdb.utils import an_list return an_list(self.euler_polynomial, upperbound=upperbound, base_field=ComplexField())
def an_list(self, upperbound=100000): from lmfdb.utils import an_list return an_list(self.eulerFactor, upperbound=upperbound, base_field=sage.rings.all.RationalField())
def coefficients_list(self, upperbound=100): from lmfdb.utils import an_list return an_list(lambda p: self.euler_polynomial(p), upperbound=upperbound, base_field=ComplexField())
def an_list(self, upperbound=100000): #from sage.rings.fast_arith import prime_range # imported but unused from lmfdb.utils import an_list return an_list(self.eulerFactor, upperbound=upperbound, base_field=sage.rings.all.RationalField())