How many 7s

This topic has expert replies
Senior | Next Rank: 100 Posts
Posts: 52
Joined: Wed Aug 12, 2009 8:05 am
Followed by:1 members
GMAT Score:650

How many 7s

by anuptvm » Fri Dec 24, 2010 4:48 pm
How many times will the digit 7 be written when listing the integers from 1 to 1000?

1. 110

2. 111

3. 217

4. 300

5. 304

User avatar
Legendary Member
Posts: 543
Joined: Tue Jun 15, 2010 7:01 pm
Thanked: 147 times
Followed by:3 members

by anshumishra » Fri Dec 24, 2010 4:50 pm
anuptvm wrote:How many times will the digit 7 be written when listing the integers from 1 to 1000?

1. 110

2. 111

3. 217

4. 300

5. 304
All the numbers (0,1,2,...9) will be appearing equal number of times. The numbers are :
000 001 002 ..... ..... 999
So, there are a total of 3*1000 digits.
Now the number of times 7 will appear (or in fact any number 0,1,2,...9) will appear is = 3*1000/10 = 300.
Answer is 4.
Thanks
Anshu

(Every mistake is a lesson learned )

Senior | Next Rank: 100 Posts
Posts: 52
Joined: Wed Aug 12, 2009 8:05 am
Followed by:1 members
GMAT Score:650

by anuptvm » Fri Dec 24, 2010 4:55 pm
Thanks Anshumishra. Is there another method using Permutations? What is a good general strategy for such problems?

User avatar
Legendary Member
Posts: 543
Joined: Tue Jun 15, 2010 7:01 pm
Thanked: 147 times
Followed by:3 members

by anshumishra » Fri Dec 24, 2010 5:03 pm
anuptvm wrote:Thanks Anshumishra. Is there another method using Permutations? What is a good general strategy for such problems?

Here is another method (using Combinations, which I read on one of the blogs, and modified for the current question) :-

Since 7 does not occur in 1000, we need to count the number of times 7 occurs when we list the integers from 1 to 999.
Now any integer between 1 and 999 is of the form abc, where 0 ≤ a, b, c ≤ 9.
We first calculate the number of integers in which 7 occurs exactly once.
Now 7 can occur at one place in 3C1 ways and the other 2 places can be occupied by any other 2 digits from 0 to 9 except 7.
Hence number of such integers is 3C1 × 9 × 9 = 243.
Since 7 occurs exactly once in each of them, there will be 243 listings of 7 in such integers.
We next calculate the number of integers in which 7 occurs exactly twice.
The two places in which 7 occurs can be selected in 3C2 ways. The remaining 1 place can be occupied by any other digit from 0 to 9 except 7.
Hence number of such integers is 3C2 × 9 or 27.
Since 7 occurs exactly twice in each of them, there will be 2 × 27 = 54 listings of 7 in such integers.
Lastly we calculate the number of integers in which 7 occurs exactly once.
Now there will be only 1 such integer which is 777 and there are 3 listings of 7 in this integer.
Hence, the total number of times 7 occurs in all integers from 1 to 1000 is 243 + 54 + 3 = 300.

My strategy is you must know the basic way to solve the problem (like the one mentioned here), apart from that if you can find some symmetries that would be awesome (But make sure that the symmetry is there, like it is in current case, that is why I could use the first method as shown in my previous post).

Hope that helps !
Thanks
Anshu

(Every mistake is a lesson learned )

Master | Next Rank: 500 Posts
Posts: 139
Joined: Fri Nov 26, 2010 4:45 pm
Location: Boston
Thanked: 20 times
Followed by:1 members
GMAT Score:720

by stormier » Fri Dec 24, 2010 5:25 pm
anuptvm wrote:Thanks Anshumishra. Is there another method using Permutations? What is a good general strategy for such problems?
Anshu's solution is more elegant.

You could also solve the problem using permutations as follows

total count = count in single digit number (1-9) + count in two digit number(10-99) + count in 3 digit number(100-999)

count in single digit = 1
count in two digit = 7x + y7 = 1x10(because x can be any number from 0 to 9) + 9(y could be any number from 1 to 9)x1 = 10+9 = 19

count in 3 digit = 7ab + c7d + ef7 = 1x10x10 ( both a and b could be any of the numbers from 0 to 9) + 9x1x10 (c could be any number from 1 to 9, d could be any number from 0 to 9) + 9x10x1 (e could be 1 to 9, f could be from 0 to 9) = 100+90+90=280

Total count = 1+19+280 = 300

User avatar
Legendary Member
Posts: 543
Joined: Tue Jun 15, 2010 7:01 pm
Thanked: 147 times
Followed by:3 members

by anshumishra » Fri Dec 24, 2010 5:30 pm
stormier wrote:
anuptvm wrote:Thanks Anshumishra. Is there another method using Permutations? What is a good general strategy for such problems?
Anshu's solution is more elegant.

You could also solve the problem using permutations as follows

total count = count in single digit number (1-9) + count in two digit number(10-99) + count in 3 digit number(100-999)

count in single digit = 1
count in two digit = 7x + y7 = 1x10(because x can be any number from 0 to 9) + 9(y could be any number from 1 to 9)x1 = 10+9 = 19

count in 3 digit = 7ab + c7d + ef7 = 1x10x10 ( both a and b could be any of the numbers from 0 to 9) + 9x1x10 (c could be any number from 1 to 9, d could be any number from 0 to 9) + 9x10x1 (e could be 1 to 9, f could be from 0 to 9) = 100+90+90=280

Total count = 1+19+280 = 300
Nice work stormier !
I liked the part where you used 3 different colors to make it easier to understand !
Thanks
Anshu

(Every mistake is a lesson learned )

User avatar
Junior | Next Rank: 30 Posts
Posts: 23
Joined: Fri Jun 03, 2011 6:44 am
Location: Dublin, Ireland
Thanked: 8 times
Followed by:1 members
GMAT Score:750

by testprepDublin » Wed Jun 29, 2011 4:22 am
There's a slightly easier way to look at it if we consider the digit positions.

The number of times 7 occurs in the hundreds' position is 100.
(From 700 to 799).
The number of times 7 occurs in the tens' position is 100.
(70-79, 170-179,...,970-979).
The number of times 7 occurs in the units' position is 100.
(7,17,27,...107,....,997).

3*100 = 300.
Deirdre at testprepdublin.com

Newbie | Next Rank: 10 Posts
Posts: 1
Joined: Mon Jul 18, 2016 11:13 am

by jeffreyut » Mon Jul 18, 2016 11:15 am
anshumishra wrote:
anuptvm wrote:How many times will the digit 7 be written when listing the integers from 1 to 1000?

1. 110

2. 111

3. 217

4. 300

5. 304
All the numbers (0,1,2,...9) will be appearing equal number of times. The numbers are :
000 001 002 ..... ..... 999
So, there are a total of 3*1000 digits.
Now the number of times 7 will appear (or in fact any number 0,1,2,...9) will appear is = 3*1000/10 = 300.
Answer is 4.
There are not 3000 digits from 1 - 1000. It should be 9 + 180 + 2700 + 4

GMAT/MBA Expert

User avatar
GMAT Instructor
Posts: 16207
Joined: Mon Dec 08, 2008 6:26 pm
Location: Vancouver, BC
Thanked: 5254 times
Followed by:1268 members
GMAT Score:770

by Brent@GMATPrepNow » Mon Jul 18, 2016 11:29 am
anuptvm wrote:How many times will the digit 7 be written when listing the integers from 1 to 1000?

A. 110
B. 111
C. 217
D. 300
E. 304
Here's another way to look at it.
Write all of the numbers as 3-digit numbers.
That is, 000, 001, 002, 003, .... 998, 999

NOTE: Yes, I have started at 000 and ended at 999, even though though the question asks us to look at the numbers from 1 to 1000. HOWEVER, notice that 000 and 1000 do not have any 7's so the outcome will be the same.

First, there are 1000 integers from 000 to 999
There are 3 digits in each integer.
So, there is a TOTAL of 3000 individual digit. (since 1000 x 3 = 3000)

Each of the 10 digits is equally represented, so the 7 will account for 1/10 of all digits.

1/10 of 3000 = 300

So, there are 300 0's, 300 1's, 300 2's, 300 3's, . . ., and 300 9's in the integers from 000 to 999

Cheers,
Brent
Brent Hanneson - Creator of GMATPrepNow.com
Image

GMAT/MBA Expert

User avatar
Elite Legendary Member
Posts: 10392
Joined: Sun Jun 23, 2013 6:38 pm
Location: Palo Alto, CA
Thanked: 2867 times
Followed by:511 members
GMAT Score:800

by [email protected] » Mon Jul 18, 2016 5:30 pm
Hi All,

If you find these types of questions to be challenging, then you might find it helpful to 'break down' the prompt into logical pieces...

To start, you know that all of the 700s (700 through 799) will have a 7 in the 'hundreds spot', so that's 100 sevens right there.

Next, you should be able to figure out that one out of every 10 numbers will end in a 7. List them out and you'll see...

1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
Etc.

Since we're dealing with the numbers from 1 to 1000, we know that we'll have 100 'groups of 10.' One out of every 10 of those numbers will END in a 7, so that's another (100)(1) = 100 sevens.

Now we just have to consider the "tens digits.' In the first 100 integers, there will be 10 numbers that have a 7 in that 'spot':
70 71 72 73 74 75 76 77 78 79

That pattern will occur in each 100 digits...

170 171 172 173 174 175 176 177 178 179
Etc.

Since there are 10 'groups of 100' and each group has 10 sevens in the "tens digits", that's another (10)(10) = 100 sevens.

Total = 100 + 100 + 100 = 300

Final Answer: D

GMAT assassins aren't born, they're made,
Rich
Contact Rich at [email protected]
Image

GMAT Instructor
Posts: 2630
Joined: Wed Sep 12, 2012 3:32 pm
Location: East Bay all the way
Thanked: 625 times
Followed by:119 members
GMAT Score:780

by Matt@VeritasPrep » Wed Jul 20, 2016 11:08 pm
jeffreyut wrote:
There are not 3000 digits from 1 - 1000. It should be 9 + 180 + 2700 + 4
Anshumishra is treating each number from 0 to 999 as having leading zeros - a clever approach - so there are indeed 3000 digits to work with: 0 is 000, 1 is 001, etc.

Newbie | Next Rank: 10 Posts
Posts: 1
Joined: Mon Sep 11, 2017 10:29 pm

by xzcfsd » Mon Sep 11, 2017 10:32 pm
anuptvm wrote:How many times will the digit 7 be written when listing the integers from 1 to 1000?

1. 110

2. 111

3. 217

4. 300

5. 304

User avatar
Newbie | Next Rank: 10 Posts
Posts: 1
Joined: Wed Dec 18, 2013 4:05 pm

question

by rmg89 » Mon Aug 27, 2018 7:27 am
I took the following approach but got the answer wrong:

first I divided the numbers into ten equal groups of 100 digits each

0-99
100-199 and so on

within each of those groups, the number 7 will appear exactly 20x times: 10x in the first position (7, 17, 27, ...) and 10x in the second position (70, 71, 72, ...)

For numbers 700-799, the digital 7 will appear exactly 100 times. I then just added everything up:
0-99: 20x
100-199: 20x
200-299: 20x
300-399: 20x
400-499: 20x
500-599: 20x
600-699: 20x
700-799: 100x
800-899: 20x
900-999: 20x

The result ist 280x. Where's my mistake?

GMAT/MBA Expert

User avatar
GMAT Instructor
Posts: 7223
Joined: Sat Apr 25, 2015 10:56 am
Location: Los Angeles, CA
Thanked: 43 times
Followed by:29 members

by Scott@TargetTestPrep » Sun Apr 14, 2019 5:47 pm
anuptvm wrote:How many times will the digit 7 be written when listing the integers from 1 to 1000?

1. 110

2. 111

3. 217

4. 300

5. 304
The digit 7 as the hundreds digit appears 100 times (700 to 799). As the tens digit, it appears 100 times also (ten times each in the 70s, 170s, 270s, ..., 970s). As the units digit, it appears 100 times also (7, 17, 27, ..., 997). Therefore, the digit 7 has appeared a total of 300 times.

Answer: D/4

Scott Woodbury-Stewart
Founder and CEO
[email protected]

Image

See why Target Test Prep is rated 5 out of 5 stars on BEAT the GMAT. Read our reviews

ImageImage