What is the growth relationship of the number of digits a number has as numbers increase?

152 Views Asked by At

To clarify the question, since I'm sure the wording is awkward:

In the decimal number system, to get from 1 digit to 2, it takes n=10 numbers. To get from 2 to 3, it takes 90 more numbers added to n. . . so on and so forth an you have a relationship like

digits n

1 9 2 99 3 999

or something like that. It seems that as n gets very large, digits increment much slower. Is there a way to describe this relationship? Is there some kind of upper bound? I'm puzzled by this because I'm bad at math.

1

There are 1 best solutions below

0
On

Let $d(n)$ be the number of digits of a positive integer $n$. Then $$d(n)= 1+ \lfloor \log_{10}(n) \rfloor$$

This uses the floor function and the base 10 logarithm.

The slow growth rate you mentioned is because of the fact that logarithms, which are the inverse of exponents, grow very slowly. You should read that article on logarithms - they are extremely useful in many areas of mathematics.