galois.is_powersmooth

galois.is_powersmooth(n, B)

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

Parameters
  • n (int) – A positive integer.

  • B (int) – The smoothness bound \(B \ge 2\).

Returns

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

Return type

bool

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