You are holding a book, which has 2018 non-blank pages individually labelled.
You hate the digit 7 so much that whenever you see a page labelled with number containing the digit 7, you would tear the page off. For instance, the page labelled with number 172 contains the digit 7, and you are going to tear it off!
After going through all the pages in the book, how many sheets of paper have you torn off?
Note: One sheet of paper has 2 pages, one page on one side and one page on the other. The first labelled non-blank page is at the very top. All non-blank pages are labelled sequentially. There are no blank pages!
Inspired by this problem .
This is part of the set Fun With Problem-Solving .
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.
Just a different approach.
From 2001 - 2018 there are 2 sheets torn out (with page numbers 2007/2008 and 2017/2018). Putting those aside for now, we consider the first 2000 pages.
We start with the 200 pages that have a 7 in the hundreds position, i.e. 700 - 799 and 1700 - 1799. In the first set, most pages are two per sheet, the exceptions being page 700 (which is on sheet 699/700) and page 799 (which is on sheet 799/800), so rather than 50 sheets we have to tear out 51 sheets. The same would be true for the second set, so we're tearing out a total of 102 sheets.
Now we have 2000 - 200 = 1800 pages left. Ten out of every hundred (for a total of 180 pages) have a 7 in the tens position, i.e 70 - 79, 170 - 179, ... , 1970 - 1979. Like with the hundreds, most pages are two per sheet, except the first and last in every set of ten; so for every set of ten we have to tear out 6 pages (rather than 5). Since there are 18 sets of ten pages, we tear out 18 x 6 = 108 sheets.
We still have 1800 - 180 = 1620 pages left. One in every ten (for a total of 162 pages) have a 7 in the ones position, i.e. 7, 17, 27, ... , 1997. Unlike the previous two batches, these are all one per sheet, so we have to tear out 162 sheets.
Adding these up, and not forgetting the two sheets we removed at the very beginning, our total is 102 + 108 + 162 + 2 = 3 7 4 sheets.
We consider the numbers 1 − 1 0 0 first.
Among them, the numbers 7 , 1 7 , 2 7 , 3 7 , 4 7 , 5 7 , 6 7 , 7 0 , 7 1 , 7 2 , 7 3 , 7 4 , 7 5 , 7 6 , 7 7 , 7 8 , 7 9 , 8 7 , 9 7 are the numbers containing the digit 7 .
However, do take note that the pairs 6 9 , 7 0 , 7 1 , 7 2 , 7 3 , 7 4 , 7 5 , 7 6 , 7 7 , 7 8 , 7 9 , 8 0 are on the same sheets of paper.
So here, 2 7 9 − 6 9 + 1 = 6 sheets of paper have been torn off.
The remaining are 7 , 1 7 , 2 7 , 3 7 , 4 7 , 5 7 , 6 7 , 8 7 , 9 7 , and there are 9 sheets of paper torn off here.
Summing up, we have 1 5 sheets of paper torn in the first 1 0 0 pages.
Now, we move on to consider the numbers 1 − 1 0 0 0 .
Notice that the intervals 1 − 1 0 0 , 1 0 1 − 2 0 0 , 2 0 1 − 3 0 0 , 3 0 1 − 4 0 0 , 4 0 1 − 5 0 0 , 5 0 1 − 6 0 0 , 6 0 1 − 6 9 8 , 8 0 1 − 9 0 0 , 9 0 1 − 1 0 0 0 all have the same number of torn off sheets. This is because the first digit is not 7 .
So here, we have 1 5 ⋅ 9 = 1 3 5 torn sheets of paper.
As for 6 9 9 , 7 0 0 , 7 0 1 , 7 0 2 , . . . , 7 9 7 , 7 9 8 , 7 9 9 , 8 0 0 , there are 2 7 9 9 − 6 9 9 + 1 = 5 1 torn sheets of paper here.
Summing up, we have 1 8 6 sheets of paper torn in the first 1 0 0 0 pages.
We move on to consider the numbers 1 − 2 0 0 0 .
Notice that the intervals 1 − 1 0 0 0 , 1 0 0 1 − 2 0 0 0 all have the same number of torn off sheets. Again, this is because the first digit is not 7 .
Summing up, we have 1 8 6 ⋅ 2 = 3 7 2 sheets of paper torn in the first 2 0 0 0 pages.
After 2 0 0 0 ,
2 0 0 7 , 2 0 1 7 are the numbers which have the digit 7 in them.
So, in total, there are 3 7 2 + 2 = 3 7 4 sheets of paper torn off from the book which has 2 0 1 8 non-blank pages.
You are assuming that pages 2 k − 1 and 2 k are on the same sheet of paper.
But it doesn't necessarily have to be like that (even though books nowadays are usually like that), if instead the pages 2 k and 2 k + 1 are on the same sheet of paper (this can happen if the other side of page 1 is blank), the answer would be 3 5 4 , not 3 7 4 .
I mention that the very first non-blank labelled page is at the very top.
Log in to reply
Very top relative to the other non-blank pages, even though it's facing down, and there might be extra blank pages on top of that, that's what I think anyways
Problem Loading...
Note Loading...
Set Loading...
Considering digit-by-digit as follows: