Maths Olympiad Prep

Library / /390 of 860

Algebra Difficulty 5.1 AIME, harder Find the answer

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 or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

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 100. 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 110. Finally, if y=z=9y=z=9, then the next palindrome after x999x\overline{x 999 x} is (x+1)000(x+1)\overline{(x+1) 000(x+1)}, which gives a difference of 11. 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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.