Olympiad Maths Prep

Track / Stage 5 / 115 of 400 #715 of 2000

Problem 715

AIME late
Number theory Difficulty 5.3 Find the answer

3. Find the largest natural number without repeating digits, in which the product of any two consecutive digits is divisible by 6.

Official solution

3. Answer: 894326705.

Among two adjacent digits, there is certainly one divisible by 3, and there are only four such digits. Therefore, a 10-digit number is impossible. Let's try to construct a 9-digit number. The digits 0,3,6,90,3,6,9, which are multiples of three, must be in even positions. Moreover, next to 3 and 9, there are even digits on both sides. Since 9 is not in the first position, the maximum first digit is 8, and then, to get the maximum, we place 9. After 9, the maximum digit is 4, as 6 is in another place. Since both digits next to 3 are even, and they are not 0 or 6, the digit 3 is adjacent to 2 and 4. We have 8943289432 \ldots, and the continuation is unique: 894326705.

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