Legacy Documentation

Mathematica® Teacher's Edition (2002)

This is documentation for an obsolete product.
Current products and services
 Documentation /  Mathematica Teacher's Edition /  Built-in Functions /  Mathematical Functions /  Number Theory /

IntegerDigits

FilledSmallSquare IntegerDigits[n] gives a list of the decimal digits in the integer n.
FilledSmallSquare IntegerDigits[n, b] gives a list of the base-b digits in the integer n.
FilledSmallSquare IntegerDigits[n, b, len] pads the list on the left with zeros to give a list of length len.

FilledSmallSquare Examples: IntegerDigits[5810]LongRightArrow; IntegerDigits[5810, 16]LongRightArrow.
FilledSmallSquare IntegerDigits[n] discards the sign of n.
FilledSmallSquare If len is less than the number of digits in n then the len least significant digits are returned.
FilledSmallSquare FromDigits can be used as the inverse of IntegerDigits.
FilledSmallSquare See The Mathematica Book on the web: Section 3.1.3.
FilledSmallSquare Implementation Notes: see Section A.9.4.
FilledSmallSquare See also: DigitCount, RealDigits, BaseForm, FromDigits, IntegerExponent, IntegerPart, ContinuedFraction.