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)
Applications (2)
Properties & Relations (1)
Neat Examples (1)
A "formula" for DigitCount:
Table[n - IntegerExponent[n!, 2], {n, 30}]Table[DigitCount[n, 2, 1], {n, 30}]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_2026_integerexponent, author="Wolfram Research", title="{IntegerExponent}", year="1999", howpublished="\url{https://reference.wolfram.com/language/ref/IntegerExponent.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_integerexponent, organization={Wolfram Research}, title={IntegerExponent}, year={1999}, url={https://reference.wolfram.com/language/ref/IntegerExponent.html}, note=[Accessed: 12-June-2026]}