galois.is_smooth¶
- class galois.is_smooth(n, B)¶
Determines if the positive integer \(n\) is \(B\)-smooth, i.e. all its prime factors satisfy \(p \le B\).
The \(2\)-smooth numbers are the powers of \(2\). The \(5\)-smooth numbers are known as regular numbers. The \(7\)-smooth numbers are known as humble numbers or highly composite numbers.
- Parameters
- Returns
True
if \(n\) is \(B\)-smooth.- Return type
Examples
In [548]: galois.is_smooth(2**10, 2) Out[548]: True In [549]: galois.is_smooth(10, 5) Out[549]: True In [550]: galois.is_smooth(12, 5) Out[550]: True In [551]: galois.is_smooth(60**2, 5) Out[551]: True