Maths Olympiad Prep

Library / /779 of 1394

, 2018

Algebra Difficulty 5.3 AIME, harder Prove it United States

Problem:

Let aa and bb be five-digit palindromes (without leading zeroes) such that a<ba < b and there are no other five-digit palindromes strictly between aa and bb. What are all possible values of bab - a? (A number is a palindrome if it reads the same forwards and backwards in base 10.)

Solution

Solution:

Let xyzyx\overline{x y z y x} be the digits of the palindrome aa. There are three cases.

If z<9z < 9, then the next palindrome greater than xyzyx\overline{x y z y x} is xy(z+1)yx\overline{x y (z+1) y x}, which differs by 100100.

If z=9z = 9 but y<9y < 9, then the next palindrome up is x(y+1)0(y+1)x\overline{x (y+1) 0 (y+1) x}, which differs from xy9yx\overline{x y 9 y x} by 110110.

Finally, if y=z=9y = z = 9, then the next palindrome after x999x\overline{x 9 9 9 x} is (x+1)000(x+1)\overline{(x+1) 0 0 0 (x+1)}, which gives a difference of 1111.

Thus, the possible differences are 11,100,11011, 100, 110.

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.