Bunuel wrote:

seekmba wrote:

How many times will the digit 7 be written when listing the integers from 1 to 1000?

(A) 110

(B) 111

(C) 271

(D) 300

(E) 304

Can someone explain a simpler approach to this problem?

Many approaches are possible. For example:

Consider numbers from 0 to 999 written as follows:

1. 000

2. 001

3. 002

4. 003

...

...

...

1000. 999

We have 1000 numbers. We used 3 digits per number, hence used total of 3*1000=3000 digits. Now, why should ANY digit have preferences over another? We used each of 10 digits equal # of times, thus we used each digit (including 7) 3000/10=300 times.

Answer: D.

I get how the answer is 300 and that you intentionally start with 000 instead of 001... but I disagree that no digit has preference over another (since the number range is 1-1000 and not 000-999, so the former's number of digits matters the most,

esp. if they ask how many 1s digits there are). The 1 digit is used 301 times, not 300 (you have to include the 1 in 1,000). The 0 digit

does show up 300 times, but it assumes that we use that method. Even if we assume the method, it depends on which segment of the numbers you look at, esp. if the GMAT asks a variation of this question that shows this difference as outlined below (in which case, you should start with 001 and not 000 so there are 3 less 0s in the first 99 numbers, compared with the three extra 0s in the very last number). So, for the 0s, you can't simply say that 001-099 has the same number of 0s as the 1s in the range 100-199.

That gives us a total of 3001 digits. Yet, even this total is misleading...

if the GMAT asks how many times the number 0 shows up in any of the digits from 1-1000, you wouldn't start with "001". Rather, you'd start with "1". Then, the number of 0's in total is 192, and consequently, the total number of digits is 2893.

Only the digits 2-9 show up the same number of times between 1-1000. If you want to be a bit more conservative about it, you should only use the method when the same number of digits are used for the lower and upper limits of the range (e.g. 10-99; 100-999), then use the method again for the single digits, the tens digits, and the thousand digits, and add it all up.

The "1" digit shows up this many times per given interval below:

001 - 099

x20 100 - 199

x120 = 100, (looking at just the units/tens digits) 01, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 31, 41, 51, 61, 71, 81, 91, all the 1s in the hundred digit is 100-1s

200 - 299

x20300 - 399

x20400 - 499

x20500 - 599

x20600 - 699

x20700 - 799

x20800 - 899

x20900 - 999

x201000

x1Total = 301The "0" digit shows up this many times per given interval below, though you should not use this method for the aforementioned reason:

001 - 099

x117 = (looking at just the units/tens digits) 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 20, 30, 40, 50, 60, 70, 80, 90, all the 0s in the hundred digit is 99-0s (it's 99 since we can't include 000 and there are only 99 numbers - if we did include 000 it would be 100-0s in the hundred digit + the two other 0s in the number 1000)

100 - 199

x20 200 - 299

x20300 - 399

x20400 - 499

x20500 - 599

x20600 - 699

x20700 - 799

x20800 - 899

x20900 - 999

x201000

x3Total = 300Conversely, if they ask how many times the number 0 shows up in each digit from 1-1000, it would be:

1 - 99

x9 = 10, 20, 30, 40, 50, 60, 70, 80, 90

100 - 199

x20 = 100 (two 0s), 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 120, 130, 140, 150, 160, 170, 180, 190

200 - 299

x20300 - 399

x20400 - 499

x20500 - 599

x20600 - 699

x20700 - 799

x20800 - 899

x20900 - 999

x201000

x3Total = 192Or simply:

\([\frac{(10^n)}{10}]*n - 111*(1 - \frac{x}{x})\), where n is the total number of

complete set of digits from 100 onward (so, up to 999 counts as 3, but up to 1,000 doesn't count as 4 as it would need to be 9,999 to count as 4), and x is the number that you want to find repeating (e.g. 0-9). I made up this equation but I think it works... you just need to ignore the undefined part and make it equal to 0 if you were to select 0...

So, if you try it for 1 - 99,999,999, and see how many times the number 4 appears, then it's:

\([\frac{(10^8)}{10}]*8 - 111*(1 - \frac{5}{5}) = 8*10^7\) times the number 4 shows up between 1 and 99,999,999 inclusive.