For any three-digit number, x, use the following process to determine f(x):
Reverse the digits of x and find the positive difference between the two numbers. Using this result, continue this process until the difference is a number with fewer than three digits. f(x)=the number of steps required
Here's an example starting with 712: 712-297=495 and then 594-495=99. This is two steps, so
f(712)=2
f(x) has a maximum, m, achieved by several values of x.
Let a= the smallest number such that f(a)=m
Let b= the largest number such that f(b)=m
What is the value of a+b?
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.
The first step of the process always gives a multiple of 99. If it is 0 or 99 we are done in 1 step.
If it is 198, 297, 396, 495, 594, 693, 792, 891 the process will take more steps but still end at 99.
891 - 198 = 693
792 - 297 = 495
693 - 396 = 297
594 - 495 = 99
The above shows f(891)=f(198)=4 and any number that gives one of these after the first step will take m=5 steps.
To get 891 the first and last digit must differ by 9. The smallest and largest of these are 900 and 990.
To get 198 the first and last digit must differ by 2. The smallest and largest of these are 103 and 997.
a=103, b=997 and a+b=1100