B4. We write the numbers from 1 to 30000 in a row so that a long sequence of digits is formed:

$$
123456789101112 \ldots 30000
$$

How many times does 2013 appear in this sequence?
B4. 25 times The combination "2013" appears 13 times as part of one of the following numbers: 2013, 12013, 22013, and 20130 to 20139. Additionally, "2013" also appears at the end of a number followed by the beginning of the next number. The different possible splits are:

2|013 does not occur, because no number starts with a '0'.

$20 \mid 13$ occurs 11 times: 1320|1321 and 13020|13021 to 13920|13921.

201|3 occurs only 1 time: 3201|3202, because we do not write numbers greater than 30000.

It is easy to verify that "2013" does not occur as a combination of three consecutive numbers. In total, "2013" thus appears $13+11+1=25$ times in the digit sequence.