- galois.is_smooth(n: int, B: int) bool
Determines if the integer \(n\) is \(B\)-smooth.
See also
Notes¶
An integer \(n\) with prime factorization \(n = p_1^{e_1} \dots p_k^{e_k}\) is \(B\)-smooth if \(p_k \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.
Examples¶
In [1]: assert galois.is_smooth(2**10, 2) In [2]: assert galois.is_smooth(10, 5) In [3]: assert galois.is_smooth(12, 5) In [4]: assert galois.is_smooth(60**2, 5)