18 of 100: Which Digit Is Rare?

If you wrote down all whole numbers from 1 to 1000...

1 , 2 , 3 , 4 , . . . , 999 , 1000 1, 2, 3, 4, ... , 999, 1000

...which digit would appear the least?

There's a clever way to think of the numbers from 1 to 1000 that will make this problem easier.

0 1 5 9 Every digit appears the same number of times.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

19 solutions

If we write 000 , 001 , 002 , , 999 000,001,002,\ldots,999 , every digits appears the same number of times.

So, if we wirte 1 , 2 , 3 , , 1000 1,2,3,\ldots,1000 , the digit 0 0 would appears the least.

Ya ,simple approach.

Kelvin Hong - 3 years, 11 months ago

Amazing write up.

Ashish Menon - 3 years, 11 months ago

Concise! Nice!

Andrew Lamoureux - 3 years, 10 months ago

Simple but interesting

Jeanne Sung - 1 year, 6 months ago
Kazem Sepehrinia
Jun 17, 2017

If we write the numbers 000 \color{#3D99F6}000 , 001 \color{#3D99F6}001 , 002 \color{#3D99F6}002 , ..., 999 \color{#3D99F6}999 , then we have wrote 3000 \color{#D61F06}3000 digits in total. Due to symmetry 300 \color{#D61F06}300 of every digit. Now, we have to remove some of 0 \color{#D61F06}0 's. There are 108 \color{#D61F06}108 extra of digit 0 \color{#D61F06}0 in 001 \color{#3D99F6}001 , 002 \color{#3D99F6}002 , ..., 099 \color{#3D99F6}099 . Also put a 1 \color{#D61F06}1 before 000 \color{#D61F06}000 because we count digits of 1000 \color{#D61F06}1000 also. Thus in 1 \color{#3D99F6}1 , 2 \color{#3D99F6}2 , 3 \color{#3D99F6}3 , ..., 1000 \color{#3D99F6}1000 we got in total

300 108 = 192 300-108= \color{#D61F06}192 of digit 0 0

300 + 1 = 301 300+1=\color{#D61F06}301 of digit 1 1

300 \color{#D61F06}300 of each of other digits

192 + 3 = 195 of digit 0. You forgot to count the three 0s of 1000. But this doesn't change the conclusion

Quentin P - 3 years, 8 months ago
Avik Das
Jun 17, 2017

Here, we can permute the digits 1,2,3,...,9,0- to make 3 digit numbers we get also
1 digit numbers(001,002,...,009)
2 digit numbers(011,012,...,098,099)
0 digit number(000)
we do not count these `0's which are in front of an actual number.
So, there is a lack of '0's from 1,2,3,...,998,999. It can't be filled up by 3 '0's of 1000
- So, the answer is 0



Actually, only "1" appears once more, the others appear the same number of times. From 1 to 10, the digits in the first position completes a loop, as well as every other time it changes the second position. In the second position, the same happens every change in the third position, which also completes a cycle when reaching "1000". Long story short, the units, tens and hundreds positions loop through all digits, equally. In the thousands position, it only appears "1", once.

Victor Hugo Alves Steil - 3 years, 11 months ago
Susan Harris
Jun 18, 2017

0 never comes at the beginning of a number. and all the other numbers do. qed

Hana Wehbi
Jun 17, 2017

If we start by looking at the numbers: 000 999 000 - 999 , in other words, every possible combination of 3 digits, we will find that every digit occurs equally (since there’s no reason for any one digit to occur any more than any other - technically, 1000 numbers * 3 digits each = 3000 digits used, 10 different digits → 300 occurrences per digit).

Now subtract off all the instances of 0’s, from 001 , 002 , 003 001, 002, 003 , all the way up to 099, and you will have removed quite a few 0’s (108 to be exact). Also, remove the 000 000 , because we’re only considering 1 - 1000 1000 . This brings the total to 111 111 . Now add on a 1,000. This brings the total # of 1’s up by one, and the total # of 0’s up by 3 3 , so we’re left with one extra 1, and 108 missing 0’s.

Final totals:

192 0 s 192 - 0’s

301 1 s 301 - 1’s

300 300 of every other digit

Jacob Bilodeau
Jun 18, 2017

from 1-99 each number 1-9 appears 10 times while 0 only appears 9 times.

Devin Humphreys
Jun 18, 2017

Thinking inductively, there's a 111, a 222, a 333, and so on, but not a 000. There's an 11, a 22, a 33, but no 00, and no leading 0 in the rest. Zero thus becomes the rarest digit simply because leading zeroes aren't a thing.

Zach Cox
Jun 18, 2017

Counting Digits

def countingDigits(end_point = 1000):

digitCounts = [0,0,0,0,0,0,0,0,0,0]

for idx in range(1,end_point+1):

    strOfDigits = str(idx)

    for aDigit in strOfDigits:

        digitCounts[int(aDigit)] += 1

for idx, count in enumerate( digitCounts ):

    print idx, " = ", count

0 = 192 1 = 301 2 = 300 3 = 300 4 = 300 5 = 300 6 = 300 7 = 300 8 = 300 9 = 300

Marta Reece
Jun 17, 2017

If instead of a 1000, there was 0, and if all the numbers were written with enough leading zeroes to make them three digit numbers, we would cycle through all the possible digits in the ones place, then switch in the tens place and do it again, until all the digits were cycled in the tens, and so on with the hundreds. All the digits would appear exactly the same number of times.

But since the leading zeroes are not listed, there is a smaller number of zeroes.

(There is the extra 1 and some zeroes to make that 1000, but that does not begin to change the balance.)

Shumail Hassan
Jul 31, 2017

0 being least and 1 being most frequently occurring one.

Beth Davies
Jul 22, 2017

Simply because you write1,2,3... and 100, 101, 102. etc but you don't write 001, 002... or 010, 011, 012... so the 0s will not be used as much. If you wrote it as 001, 002, 003... then all the numbers would have been used the same amount of times.

Each of the place values cycle 1 through 9 and then 0. So, in the set of single digit numbers that presents one less zero than the other numbers. Zero occurs the least.

Syed Hamza Khalid
Jul 12, 2017

Because zero is kind of once in a 10 and only 11 in a hundred so it is kind of the least especially in a 1000

Keshav Ramesh
Jun 25, 2017

Let us start with the digit 1 1 , which appears:

20 20 times between 1 99 1-99 .

120 120 times between 100 199 100-199 .

160 160 times total for 20 20 times each between 200 299 , 300 399 , 400 499 , 500 599 , 600 699 , 700 799 , 800 899 , 200-299, 300-399, 400-499, 500-599, 600-699, 700-799, 800-899, and 900 999 900-999 .

1 1 time for 1000 1000 .

Adding this up, we have 160 + 120 + 20 + 1 = 301 160+120+20+1=301 .

We have 300 300 times for each of the eight other digits between 2 2 and 9 9 inclusive because 1000 1000 only satisfies the case with 1 1 .

However, the digit 0 0 appears:

9 9 times between 1 99 1-99 .

180 180 times total for 20 times each between 100 199 , 200 299 , 300 399 , 400 499 , 500 599 , 600 699 , 700 799 , 800 899 , 100-199, 200-299, 300-399, 400-499, 500-599, 600-699, 700-799, 800-899, and 900 999. 900-999.

3 3 times for 1000 1000 .

Adding this up, we have 180 + 9 + 3 = 192. 180+9+3=192.

192 < 300 192<300 and 192 < 301 192<301 , so 0 0 is our answer.

Cookie Coxon
Jun 19, 2017

As you go through the numbers from 1 to 1000, every number is represented over 100 times, just because each number is the first digit of a three-digit number 100 times - apart from 0.

Because the 1 and 2-digit numbers are not shown to begin with 0, 0 is represented nowhere near as many times.

Sanket Lalwani
Jun 18, 2017

Since we start with the Digit 1 hence except for 0 ...all numbers are repeated equally ... Hence the least appearing digit in Natural Numbers Is zero

But , considering Whole Numbers...all digits from 0-1000 appear equally..

Timothy Uruski
Jun 18, 2017

We can simulate this sequence more efficiently by using a different base, such as base 3: 1 , 2 , 10 , 11 , 12 , 20 , 21 , 22 , 100 , 101 1000 1,2,10,11,12,20,21,22,100,101\ldots 1000 , which yields the following counts:

Digit Count
0 0 : 17 17
1 1 : 28 28
2 2 : 27 27

From this we can infer that 0 0 is the least common digit.

Ann deJoy
Jun 18, 2017

When counting from 1 to ......,9, we rarely count 0 as part of the decimal system -0 to........9

Surya Subbarao
Jun 18, 2017

Each digit has a whole hundred's digit to itself, adding 100 to its count, however zero does not. We can immediately see that 0 is the answer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...