Olympiad Maths Prep

Track / Stage 5 / 331 of 400 #931 of 2000

Problem 931

AIME late
Number theory Difficulty 5.8 Find the answer

2. Using the digits 1 to 9, we form a nine-digit number with distinct digits. Then we calculate the sum of each triplet of adjacent digits and write down these seven sums in ascending order. Determine whether it is possible to obtain the sequence

a) 11, 15, 16, 18, 19, 21, 22,

b) 11, 15, 16, 18, 19, 21, 23.

(Patrik Bak)

Official solution

SOLUTION. a) Yes, for example, the number 137658942 satisfies the condition. The sums of its consecutive triplets of digits from left to right are 11, 16, 18, 19, 22, 21, 15.

b) We will show that for any nine-digit number a1a2a8a9\overline{a_{1} a_{2} \ldots a_{8} a_{9}} composed of the digits 1 to 9, the sum of the seven numbers determined by the problem is at most 122. Since for the numbers in part b) we have 11+15+16+18+19+21+23=12311+15+16+18+19+21+23=123, we will show that the required nine-digit number does not exist.

The sum SS of the seven numbers can be written and estimated as follows:

S=(a1+a2+a3)+(a2+a3+a4)++(a6+a7+a8)+(a7+a8+a9)==a1+2a2+3a3+3a4+3a5+3a6+3a7+2a8+a9==3(a1+a2++a8+a9=1+2++9=45)(a1+a2+a8+a91+2+3+4=10)(a1+a91+2=3)345103=122. \begin{aligned} S & =\left(a_{1}+a_{2}+a_{3}\right)+\left(a_{2}+a_{3}+a_{4}\right)+\ldots+\left(a_{6}+a_{7}+a_{8}\right)+\left(a_{7}+a_{8}+a_{9}\right)= \\ & =a_{1}+2 a_{2}+3 a_{3}+3 a_{4}+3 a_{5}+3 a_{6}+3 a_{7}+2 a_{8}+a_{9}= \\ & =3(\underbrace{a_{1}+a_{2}+\ldots+a_{8}+a_{9}}_{=1+2+\ldots+9=45})-(\underbrace{a_{1}+a_{2}+a_{8}+a_{9}}_{\geqq 1+2+3+4=10})-(\underbrace{a_{1}+a_{9}}_{\geqq 1+2=3}) \leqq \\ & \leqq 3 \cdot 45-10-3=122 . \end{aligned}

This proves the statement in the first sentence of our solution to part b).

COMMENT. Although the above solution is complete, we will now show how to find an example of a number that satisfies the condition in part a). We will even find all such numbers, based on the observation that led us to the solution of part b).

The first good step is to notice that both sets of seven numbers in the problem contain "relatively large" numbers for all the digits 1 to 9 to be represented. This can motivate us to assess the overall sum SS of all seven given numbers. How large can this sum be? The answer to this question certainly depends on how many times each digit is represented in the sum SS. It is then quite easy to come up with an upper bound for SS of 122, as we did above.

Let us now add what we did not need in the solution to part b). From our derivation, it follows that the equality S=122S=122 holds if and only if the number a1a9\overline{a_{1} \ldots a_{9}} satisfies the equalities

{a1,a2,a8,a9}={1,2,3,4} and {a1,a9}={1,2} \left\{a_{1}, a_{2}, a_{8}, a_{9}\right\}=\{1,2,3,4\} \quad \text { and } \quad\left\{a_{1}, a_{9}\right\}=\{1,2\}

or {a1,a9}={1,2}\left\{a_{1}, a_{9}\right\}=\{1,2\} and {a2,a8}={3,4}.\left\{a_{2}, a_{8}\right\}=\{3,4\} .^{*}

Since the sum 11+15+16+18+19+21+2211+15+16+18+19+21+22 of the numbers given in part a) is exactly the assessed value of 122, the sought numbers a1a2a8a9\overline{a_{1} a_{2} \ldots a_{8} a_{9}} with digits 1 to 9 are precisely those for which {a1,a9}={1,2}\left\{a_{1}, a_{9}\right\}=\{1,2\} and {a2,a8}={3,4}\left\{a_{2}, a_{8}\right\}=\{3,4\}. According to the possible positions of the digits 1, 2, 3, 4, only 4 types of numbers are possible.

Let us first examine the numbers 13a3a742\overline{13 a_{3} \ldots a_{7} 42}. For 1+3+a31+3+a_{3} to be one of the prescribed sums, a3a_{3} must be 7; similarly, for the sum a7+4+2a_{7}+4+2, a7a_{7} must be 9. We thus have the numbers 137a4a5a6942\overline{137 a_{4} a_{5} a_{6} 942}. It remains to assess the six ways to assign the triplet a4,a5a_{4}, a_{5}, and a6a_{6} the remaining[^1]digits 5, 6, and 8. Each individual way is easy to test, and it is advantageous to be able to rule out some of them in advance (for example, by noting that a45a_{4} \neq 5). Without going into these details, we can state that in the end, we get exactly two numbers that satisfy the condition: 137658942 and 137685942.

Examining the numbers 14a3a732\overline{14 a_{3} \ldots a_{7} 32} is shorter: This time, we find that both digits a3a_{3} and a7a_{7} would have to be 6, so no number of this type satisfies the condition.

It is not necessary to examine the remaining numbers 23a3a741\overline{23 a_{3} \ldots a_{7} 41} and 24a3a731\overline{24 a_{3} \ldots a_{7} 31}. It is sufficient to convert them to the previous two types, thanks to the general observation: a number a1a2a8a9\overline{a_{1} a_{2} \ldots a_{8} a_{9}} satisfies the condition if and only if its "reversed" number a9a8a2a1\overline{a_{9} a_{8} \ldots a_{2} a_{1}} satisfies the condition.

To summarize what we have found: The numbers that satisfy the condition in part a) are exactly four. They are the numbers 137658942, 137685942, and their "mirror images" 249856731 and 249586731.

## GUIDING AND SUPPLEMENTARY PROBLEMS:

N1. Find the five-digit numbers, each of which has five different odd digits, such that the sum of the first three digits is 11 and the sum of the last three digits is 15. [The middle digit must be 1, because 11+1511+15 is one more than 1+3+5+7+91+3+5+7+9. The first two digits must be 3 and 7, and the last two must be 9 and 5. All such numbers satisfy the condition: 37159, 37195, 73159, 73195.]

N2. Determine the largest possible values of the following sums, where a1,a2,,a8,a9a_{1}, a_{2}, \ldots, a_{8}, a_{9} is any permutation of the digits 1,2,,8,91,2, \ldots, 8,9:
a) $a_{1}

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.