3. Find the largest natural number without repeating digits, in which the product of any two consecutive digits is divisible by 6.
Problem 715
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 , 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 , and the continuation is unique: 894326705.