This year, the following task was given in the first round of the German Federal Mathematics Competition ("Bundeswettbewerb Mathematik").
What is the largest natural number with the property that each of its digits other than the first and the last is smaller than the arithmetic mean of its two neighboring digits?
For example,
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Hey, good solution! Do you think the examples make the task too easy? :)
Log in to reply
I don't know if other people will see them this way. They only became a hint when I tried graphing them and saw them as terms of a polynomial.
A number satisfies this property if and only if b < 2 a + c holds true for any three consecutive digits a, b, c of this number; this in turn is equivalent to a − b > b − c , meaning the difference between two consecutive digits of this number - always referring to "left digit minus right digit" - becomes smaller and smaller from left to right.
Obviously, the number we are looking for starts and ends with a 9. If the number we are looking for has more than two digits, the second digit may not be 9.
Thus, the differences mentioned above between consecutive digits initially have a positive value, then become smaller and smaller and finally negative. Thus, from the left, the digits of the number get smaller and eventually larger again, where it is possible that at most once two equal digits can stand next to each other. We can thus write the number we are looking for in the form a 1 a 2 . . . a k b 1 b 2 . . . b j with 9 = a 1 > a 2 > . . . > a k ≤ b 1 < b 2 < . . . < b j = 9 , where k + j is the number of digits of the number we are looking for.
For the differences of consecutive digits it applies: ( a 1 − a 2 ) + . . . + ( a k − 1 − a k ) = a 1 − a k ≤ 9 − 0 = 9 , similarly b j − b 1 ≤ 9
The number we are looking for cannot have nine or more digits, because otherwise at least four of the differences would be positive or the other four would be negative. But then the fifth digit would not be greater than 9 − 4 − 3 − 2 − 1 = − 1 , or the last digit would be greater than 0 + 1 + 2 + 3 + 4 = 1 0 , which both cannot be.
So the number has at most eight digits and the sequence of differences 3 , 2 , 1 , 0 , − 1 , − 2 , − 3 produces - starting from the first digit 9 - the largest number with this property, namely 96433469.
Problem Loading...
Note Loading...
Set Loading...
Relevant wiki: Method of Differences
The examples were a big hint.
Think about this graphically with the digits as the terms of a sequence. The terms must have an upward curvature, meaning the second differences are positive. These difference must also be integers, so the best we can do is make them all 1's so they don't curve up too fast.
It makes sense that the first digit should be 9 and the symmetry of having equal second differences means the last digit will also be 9.
Ok, how about the first differences? We want them to start small so there can be more terms before they curve back up. They can't start with -5 or even -4 because you'd go below 0. Ok so start with -3. The first differences go -3, -2, -1, 0, 1, 2, 3.
Then the sequence of digits is 9, 6, 4, 3, 3, 4, 6, 9. And the number is 96433469