Find the greatest natural number possessing the property that each of its digits except the first and last one is less than the arithmetic mean of the two neighboring digits.
Problem 1196
Official solution
To find the greatest natural number such that each of its digits, except the first and last one, is less than the arithmetic mean of the two neighboring digits, we need to follow these steps:
1. Define the digits:
Let the number be represented as , where is the first digit, is the last digit, and are the digits in between.
2. Set up the inequality:
For each digit (where ), the condition is:
This can be rewritten as:
3. Start with the largest possible first digit:
To maximize the number, start with the largest possible first digit, which is 9. Let .
4. Determine the subsequent digits:
- For , we need . To maximize , we should choose as large as possible.
- Let . Then:
To maximize , let .
- For , we need . To maximize , we should choose as large as possible.
- Let . Then:
To maximize , let .
- For , we need . To maximize , we should choose as large as possible.
- Let . Then:
To maximize , let .
- Continue this process until the digits start to decrease significantly.
5. Construct the number:
Following the pattern, we get the number .
6. Verify the conditions:
- For :
- For :
- For :
- For :
Thus, the greatest natural number satisfying the given condition is .
The final answer is