Can the first twenty non-negative integers be arranged so that if two such numbers have the same last digit , then exactly numbers stand between them in the sequence?
Problem 1011
Official solution
We will show that the answer to the question is negative. Indeed, suppose that the required sequence exists, and let denote the position of the number in this sequence . Then the enumeration is a permutation of the first 20 positive integers, so
According to the condition, on the other hand,
If and denote the sum of the numbers with positive and negative signs, respectively, after removing the absolute value signs on the left side of (2), then from (1) we have , and from (2) we get . From this, and turn out to be odd, which is impossible since and are integers. This means that indeed no sequence with the stated property exists.
Remark. The problem is essentially a special case of the following: does there exist a sequence of length in which the numbers each appear exactly twice, and between any two occurrences of a number , exactly numbers appear in the sequence? From the proof, it can be read that for the existence of such a sequence, it is necessary that the sum of the integers from to be even, which means that must leave a remainder of 0 or 1 when divided by 4. It is not a simple question whether the found condition is sufficient.
In any case, such an arrangement exists for and 9: 00, 2132003, 0023421314, 2412174635003765, 141008473625328765.