Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Today my car meter reads as 72927 kms. I notes that this is a palindrome. How many minimum kms I need to travel so my car meter find another palindrome?

share|cite|improve this question
up vote 10 down vote accepted

For every choice of the three first digits of a 5-digit number, there is exactly one way to complete it so it becomes a palindrome.

The next palindrome is the one that starts with 730, namely 73037, which will be reached in $73037-72927=110$ km.

share|cite|improve this answer

The number is 72927 and you want to get to the next palindrome forward. To find the next palindrome forward you want to separate your number into a left and right side so that the 2 sides have an equal number of digits like so, 72 9 27. It's fine if you have a single digit left in the middle like we do here. Next, if there is a middle number, just add +1 to it (If there was not a middle number, you'd add the +1 to the left side), and in this case we turn the 9 to a 10 so the 9 becomes a 0 and the 1 gets added to the left side because it needs to be carried over (72+1) 0 27. Now just adjust the right side appropriately to make it a palindrome, 73 0 37. The next palindrome forward is going to be at 73037.

After that, to find the difference, you subtract the smaller number from the larger number and get your difference, 73037 - 72927 = 110. You will need to travel another 110 kms to get to the next palindrome.

If you were in a magic time travelling car, that could travel backwards in time & distance, the next closest palindrome would be 72827 and would only be 100 kms away.

You can find the next palindrome of any palindrome in this way. for example,

Palindrome: 891737737198891737737198

Half it: 891737737198 891737737198

+1 left side & adjust right side: 891737737199 991737737198

Next Palindrome: 891737737199991737737198

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.