Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's a question I was thinking about:

For all positive integers n, list the decimal representation of the numbers 1, 2, 3, ..., n without any leading zeroes. Does there exist an n such that this list contains an equal number of each of the digits 0, 1, 2, 3, ..., 9? (For example, if n=15, the list is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, and it contains eight 1's, one 0, and so on.)

I thought about it for quite a while, and intuitively it seems very unlikely, but I couldn't formulate a rigorous proof. Could you guys help me in discovering one?


share|cite|improve this question
up vote 2 down vote accepted

no, the number of times zero appears is always less than the number of times one appears.


set $k_i(n)$ equal to the number of times $1$ has appeared in the $10^i$'s place minus the number of times $0$ has appeared in the $10^i$'s place.

each $k_i(n)$ is non-negative and if the place of the first digit of n is $10^m$, $k_m(n)$ is positive, so the sum of all the $k_i(n)$ is positive.

share|cite|improve this answer
Is there a simple proof of this claim? – coffeemath Nov 11 '13 at 0:22
Here is the proof, as requested. – Zackkenyon Nov 11 '13 at 0:40
It looks like this shows the number of $1$'s appearing for $1\le k \le n$ exceeds the number of $0$'s, which is enough. I'd suggest adjusting the notation to $k_i(n)$ for the difference between the number of $1$'s minus the number of $0$'s which appear for $1 \le k \le n$ and maybe elaborating on sub-proofs of $k_i(n)\ge 0$ and the statement re. numbers whose most significant digit is in the $10^m$ position. (and +1 -- that wasn't my downvote.) – coffeemath Nov 11 '13 at 1:21
Sorry, this proof seemed instantly clear to me, and I thought maybe user107905 maybe just wanted a hint. But then downvotes and challenges to my honor. – Zackkenyon Nov 11 '13 at 1:39
I didn't see it immediately, even when looking at it. Had to do some paperwork to get the proof. I hope you didn't view my "is there a simple proof" as a challenge of your answer, it was just a request for a fill-in, as you placed in the answer afterwards. Thanks. – coffeemath Nov 11 '13 at 2:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.