Maths Olympiad Prep

Library / /160 of 264

Number theory Difficulty 6.0 National Olympiad Prove it Romania

Let MM be the set of palindromic numbers of the form 5n+45n + 4, where n0n \ge 0 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 MM in increasing order, which is the 50th number?
b) Among all numbers in MM, 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 MM equals 4 or 9. A direct count shows that MM 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 MM 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 411142006 digits 1\underbrace{411\ldots14}_{2006\ \text{digits}\ 1}. Similarly, the smallest number in MM has the least number of digits. The answer is 9899989220 digits 9\underbrace{9899\ldots989}_{220\ \text{digits}\ 9}.

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.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.