Let be the set of palindromic numbers of the form , where is an integer. (A positive integer is a palindromic number if it remains the same when its digits are reversed. For instance, the numbers 7, 191, 23532, 3770773 are palindromic numbers.)
a) If we write the elements of in increasing order, which is the 50th number?
b) Among all numbers in , written with nonzero digits who sum up to 2014, which is the greatest one and which the smallest one?
Solution
a) The last (and hence, the first) digit of a number from equals 4 or 9. A direct count shows that contains 2 one digit numbers, 2 two digit numbers, 20 three digit and 20 four digit numbers, hence the 50th number is the 6th five digit number, that is, 40504.
b) The greatest number in has the maximum number of digits. Therefore, we put 4 as the first and last digit and complete the decimal representation
with 2006 digits 1, obtaining thus . Similarly, the smallest number in has the least number of digits. The answer is .
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.