Maths Olympiad Prep

Library / /3 of 10

, 2018

Algebra Difficulty 4.7 AIME Prove it Saudi Arabia

Let MM and NN are two nine-digit palindromes without leading zeros (a palindrome is a number that reads the same backward as forward) such that M<NM < N and there are no other nine-digit palindromes strictly between MM and NN. What are all possible values of NMN - M?

Solution

Denote the number MM is abcdedcbaa b c d e d c b a. We consider cases:

1. If e8e \geq 8 then the next number NN is abcd(e+1)dcbaa b c d (e+1) d c b a.

2. If e=9e = 9, d8d \geq 8 then the next number NN is abc(d+1)9(d+1)cbaa b c (d+1) 9 (d+1) c b a.

3. If e=d=9e = d = 9, c8c \leq 8 then the next number NN is ab(c+1)999(c+1)baa b (c+1) 999 (c+1) b a.

4. If e=d=c=9e = d = c = 9, b8b \leq 8 then next number is a(b+1)99999(b+1)aa (b+1) 99999 (b+1) a.

5. If e=d=c=b=9e = d = c = b = 9, then a8a \leq 8 (otherwise, there is no NN). Then the next number is (a+1)9999999(a+1)(a+1) 9999999 (a+1).

So the difference are 1000010000, 1010010100, 10001001000100, 1000001010000010, 100000001100000001. \square

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 and solution reproduced as published; topic and difficulty added by this site.