Exemple #1
0
 def test_sigma(self) :
     for n in self.known_values :
         for k in range(1, self.power_bound) :
             self.assertEqual(
                 sum(i ** k for i in numbers.divisors(n)),
                 numbers.sigma(n, k)
             )
Exemple #2
0
 def test_tau(self) :
     for n in self.known_values :
         self.assertEqual(len(list(numbers.divisors(n))), numbers.tau(n))