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:

The highest power of 2:

Plot it:

Applications  (2)

Number of trailing zeros in factorials:

Powers of 2 in successive integers:

Properties & Relations  (1)

Find the highest power of 2 that appears in the factors of a number:

Neat Examples  (1)

A "formula" for DigitCount:

Introduced in 1999
 (4.0)