Digit

The number of digits D in an integer n is the number of numbers in some base (usually 10) required to represent it. The numbers 1 to 9 are therefore single digits, while the numbers 10 to 99 are double digits. Terms such as "double-digit inflation" are occasionally encountered, although this particular usage has thankfully not been needed in the U.S. for some time. The number of base-b digits in a number n can be calculated as


where is the floor function. For b = 10, the formula becomes


The number of digits d in the number n represented in base b is given by the Mathematica function DigitCount[n, b, d], with DigitCount[n, b] giving a list of the numbers of each digit in n.

Numbers in base-10 which are divisible by their digits are 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22, 24, 33, 36, 44, 48, 55, 66, 77, 88, 99, 111, 112, 115, 122, ... (Sloane's A034838). Numbers which are divisible by the sum of their digits are called Harshad numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, ... (Sloane's A005349). Numbers which are divisible by both their digits and the sum of their digits are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 111, 112, 126, 132, 135, 144, ... (Sloane's A050104). Numbers which are equal to (i.e., not just divisible by) the product of their divisors and the sum of their divisors are called sum-product numbers and are given by 1, 135, 144, ... (Sloane's A038369).

b order Sloane Numbers ()
2 increasing    
2 nondecreasing A000225 3, 7, 15, 31, 63, 127, 255, 511, 1023, ...
2 nonincreasing A023758 2, 3, 4, 6, 7, 8, 12, 14, 15, 16, 24, 28, 30, 31, ...
2 decreasing   2
10 increasing A009993 12, 13, 14, 15, 16, 17, 18, 19, 23, 24, 25, 26, ...
10 nondecreasing A009994 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 24, ...
10 nonincreasing A009996 10, 11, 20, 21, 22, 30, 31, 32, 33, 40, 41, 42, ...
10 decreasing A009995 10, 20, 21, 30, 31, 32, 40, 41, 42, 43, 50, 51, ...
16 increasing A023784 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, ...
16 nondecreasing A023757 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, ...
16 nonincreasing A023771 17, 32, 33, 34, 48, 49, 50, 51, 64, 65, 66, 67, ...
16 decreasing A023797 32, 33, 48, 49, 50, 64, 65, 66, 67, 80, 81, 82, ...

In hexadecimal, numbers with increasing digits are called metadromes, those with nondecreasing digits are called plaindrones, those with nonincreasing digits are called nialpdromes, and those with decreasing digits are called katadromes.

The count of numbers with strictly increasing digits in base-b is , and the number with strictly decreasing digits is .

 

196-Algorithm, Additive Persistence, Digit Count, Digit Product, Digit Sum, Digit-Shifting Constants, Digitaddition, Digital Root, Factorion, Figures, Harshad Number, Katadrome, Metadrome, Multiplicative Persistence, Narcissistic Number, Nialpdrome, Number Length, Plaindrome, Scientific Notation, Significant Digits, Smith Number, Sum-Product Number




References

Bailey, D. H. and Crandall, R. E. "On the Random Character of Fundamental Constant Expansions." Exper. Math. 10, 175-190, 2001. http://www.nersc.gov/~dhbailey/dhbpapers/baicran.pdf.

Sloane, N. J. A. Sequences A0053490481, A009993, A009994, A009995, A009996, A023757, A023758, A023771, A023784, A023797, A034838, A038369, and A050104 in "The On-Line Encyclopedia of Integer Sequences." http://www.research.att.com/~njas/sequences/.