IntegerExponent
The largest exponent k such that b^k divides n.
k
b^k
n
$ wo 'IntegerExponent[24, 2]' 3