On a blackboard there are written, one after another, all positive integers from to , forming the following sequence of digits:
.
Find the number of occurrences of in this sequence.
Solution
The sequence appears times in the writing of , , and of , , , , . Moreover, can appear by connecting the end of a number to the beginning of the next number. The writing
appears only once, in , and the writing appears times, in and from to . The writing is impossible, because no positive integer begins with , therefore the number of occurrences of is .
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.