IntegerExponent

IntegerExponent[n,b]

gives the highest power of b that divides n.

Details

Examples

open allclose all

Basic Examples  (3)

The number of trailing zeros:

In[1]:=
Click for copyable input
Out[1]=

The highest power of 2:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Plot it:

In[1]:=
Click for copyable input
Out[1]=

Applications  (2)

Properties & Relations  (1)

Neat Examples  (1)

See Also

IntegerDigits  FactorInteger  RealExponent  MantissaExponent  DigitCount  IntegerLength  Exponent  Log10  Log2

Tutorials

Introduced in 1999
(4.0)