All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Digit Counting (Posted on 2005-02-25) Difficulty: 3 of 5
Show that for every positive integer n, the total number of digits in the sequence 1,2,3,...,10^n is equal to the number of zero digits in the sequence 1,2,3,...,10^(n+1).

See The Solution Submitted by David Shin    
Rating: 3.3333 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution | Comment 1 of 2

Let's find the first number first.

There are 9 1-digit numbers.

There are 90 2-digit numbers, 10 - 99, for 2*9*10^1 digits.

At any given number of digits, k, there are k*9*10^(k-1) digits. This holds true through k = n.

There is one (n+1)-digit number.

The total is 9 + 2*90 + ... + n*9*10^(n-1) + n + 1.

Now the second number to see if it's equal to the first:

There are no zeros among the 1-digit numbers.

Among the 2-digit numbers, there are 9 zeros.

Among k-digit numbers, in any given position except the first, a zero will occur 9*10^(k-2), the factor of 9 referring to the 9 possibilities for the first digit and the 10^(k-2) referring to the 10 possibilities in each of the remaining positions (other than the first and the one whose zeros you're considering). So for each of the k-1 positions a zero could occur, it will occur 9*10^(k-2) times.  That adds up to (k-1)*9*10^(k-2).

This time we are going up to all the (n+1)-digit numbers plus one (n+2)-digit number. But that (n+2)-digit number has n+1 zeros, so we get

0 + 9 + 2*9*10^1 + ... + (n+1-1)*9*10^(n+1-2) + n + 1.

This simplifies to the same number as the first.

  Posted by Charlie on 2005-02-25 14:25:24
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information