Take a test Sign in 中文
← Exercise 727 →
Search
Go to
{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}” No results found for “{{searchWords}}” × back to contents
Contents · by chapter
Digits (38)
Primes (31)
Fractions, Decimals, and the Floor Function (18)
Divisors, GCD, and LCM (36)
Divisibility (59)
Bases (15)
Modular Arithmetic (42)
Integer Equations (27)

Exercises and their solutions

Exercise 727
What is the largest possible difference between two consecutive seven-digit palindromes?
← Back to Problem 727
Solution
  1. Write the palindrome as $\underline{a}\,\underline{b}\,\underline{c}\,\underline{d}\,\underline{c}\,\underline{b}\,\underline{a}$. If the middle digit $d$ is less than $9$, the next palindrome raises $d$ by $1$: difference $1000$.
  2. If $d=9$ and $c<9$, the next palindrome raises $c$ by $1$ (adding $10100$) and changes $d$ from $9$ to $0$ (subtracting $9000$): difference $1100$.
  3. If $c=d=9$ and $b<9$, the next raises $b$ (adding $100010$) and resets $c,d$ to $0$ (subtracting $90900+9000$): difference $110$.
  4. If $b=c=d=9$ and $a<9$, the next raises $a$ (adding $1000001$) and resets the rest (subtracting $999990$): difference $11$.
  5. So the largest difference is $\boxed{1100}$, which is larger than the usual step of $1000$.
Search Go to Prev      Next

Contact Us

Thanks! Your message has been sent.
By year