galois.is_powersmooth(n: int, B: int) bool

Determines if the integer \(n\) is \(B\)-powersmooth.

Parameters:
n: int

An integer.

B: int

The smoothness bound \(B \ge 2\).

Returns:

True if \(n\) is \(B\)-powersmooth.

See also

factors, is_smooth

Notes

An integer \(n\) with prime factorization \(n = p_1^{e_1} \dots p_k^{e_k}\) is \(B\)-powersmooth if \(p_i^{e_i} \le B\) for \(1 \le i \le k\).

Examples

Comparison of \(B\)-smooth and \(B\)-powersmooth. Necessarily, any \(n\) that is \(B\)-powersmooth must be \(B\)-smooth.

In [1]: galois.is_smooth(2**4 * 3**2 * 5, 5)
Out[1]: True

In [2]: galois.is_powersmooth(2**4 * 3**2 * 5, 5)
Out[2]: False