4. All natural numbers, the sum of the digits in the representation of which is divisible by 5, are listed in ascending order: $5,14,19,23,28,32, \ldots$ What is the smallest positive difference between consecutive numbers in this sequence? Provide an example and explain why it cannot be smaller.

---

The smallest positive difference between consecutive numbers in this sequence is 1. An example is the pair of numbers 14 and 15. The sum of the digits of 14 is $1 + 4 = 5$, which is divisible by 5. The sum of the digits of 15 is $1 + 5 = 6$, which is not divisible by 5. However, the next number in the sequence is 19, and the sum of its digits is $1 + 9 = 10$, which is divisible by 5. Therefore, the smallest difference is 1, as seen between 14 and 15.

To explain why it cannot be smaller: The smallest possible difference between two numbers is 1. If the difference were 0, the numbers would be the same, which is not possible for consecutive numbers in the sequence. If the difference were greater than 1, there would be a gap between the numbers, which means there would be a number in between that could potentially have a sum of digits divisible by 5, contradicting the requirement that the sequence lists all such numbers in ascending order. Therefore, the smallest possible difference is 1.
Answer. The smallest difference is 1, for example, between the numbers 49999 and 50000.

Solution. The difference cannot be less than 1, as we are talking about the difference between different natural numbers.

Comment. How to guess the solution.

It is clear that if two adjacent numbers differ only in the units place, then the difference between them is 5 (for example, 523 and 528). Therefore, the numbers must differ in other places as well. We can try to take the larger number as a round number, then the numbers will differ in at least two places. For example, take 50, the previous number is 46, and the difference is 4. If we take 500, the previous number is 497, and the difference is 3. It remains to choose such a number of zeros so that the difference is 1.

## Grading criteria.

- An example of the required numbers with a difference of 1 is provided - 7 points.
- Reasoning is provided that allows constructing consecutive numbers in the sequence with the minimum difference, and numbers with a difference of 2 are constructed, but numbers with a difference of 1 are not constructed - 4 points.
- Examples are provided showing that the difference can be less than 4, but without justification of minimality - 2 points.
- Other cases - $\mathbf{0}$ points.