FiSGO.PrimesHandler.contained_power

contained_power(n, d)[source]

Given integers n, d, returns the integer m such that d**m divides n but d**(m+1) does not divide n.

Parameters:
  • n (int) – Integer.

  • d (int) – Integer.

Return type:

int

Returns:

Integer, the maximum power of d that divides n.