IntegerExponent [n,b]
gives the highest power of b that divides n.
IntegerExponent
IntegerExponent [n,b]
gives the highest power of b that divides n.
Details
- Integer mathematical function, suitable for both symbolic and numerical manipulation.
- IntegerExponent [n] is equivalent to IntegerExponent [n,10].
- IntegerExponent [n,b] gives the number of trailing zeros in the digits of n in base b.
- IntegerExponent automatically threads over lists.
Examples
open all close allBasic 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 :
Tech Notes
Related Guides
Related Links
History
Introduced in 1999 (4.0)
Text
Wolfram Research (1999), IntegerExponent, Wolfram Language function, https://reference.wolfram.com/language/ref/IntegerExponent.html.
CMS
Wolfram Language. 1999. "IntegerExponent." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/IntegerExponent.html.
APA
Wolfram Language. (1999). IntegerExponent. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IntegerExponent.html
BibTeX
@misc{reference.wolfram_2025_integerexponent, author="Wolfram Research", title="{IntegerExponent}", year="1999", howpublished="\url{https://reference.wolfram.com/language/ref/IntegerExponent.html}", note=[Accessed: 24-November-2025]}
BibLaTeX
@online{reference.wolfram_2025_integerexponent, organization={Wolfram Research}, title={IntegerExponent}, year={1999}, url={https://reference.wolfram.com/language/ref/IntegerExponent.html}, note=[Accessed: 24-November-2025]}