Start with any 3-digit number which is not a palindrome.
Reverse the digits 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.
1) What are the only possible results? Prove it.
2) What is the greatest number of steps any number could take to terminate (and which numbers are these?)
The positive difference of numbers ABC and CBA is 99 times |A-C|; as A≠C, this means you could get 99 (and stop right there), 198, 297, 396, 495, 594, 693, 792, or 891.
If you got 198 or 891, on your next step you'd get 693; then, 297, followed by 495, ending at 99. If you had gotten 396 or 693, you'd have one step less; if 297 or 792, two steps less; 495 or 594, three steps less... so getting 198 or 891 is the best solution.
All numbers ABC with |A-C|=2 or 9 produce this result; note that for the latter, you must have A=9 and C=0.
Edited on February 1, 2005, 6:30 pm
|
Posted by e.g.
on 2005-02-01 18:28:11 |