
A palindrome is a positive integers which is unchanged if you reverse the order of its digits. For example, 23432. If all palindromes are written in increasing order, what possible prime values can the difference between successive palindromes take?
Solution
Answer: 2, 11.
Let x be a palindrome and x' the next highest palindrome. If x < 101, then it is easy to see by inspection that x' - x = 1, 2 or 11, so the only prime differences are 2 and 11.
So assume x > 100. If x and x' have the same final digit, then their difference is divisible by 10 and hence not prime. So they must have different digits. Thus either x = d9...9d and x' = d'0...0d', where d < 9 and d' = d+1, or x' has one more digit than x and d = 9, d' = 1. In the first case x' - x = 11. In the second case x' - x = 2. So again the only prime differences are 2 and 11.
![]()
© John Scholes
jscholes@kalva.demon.co.uk
31 July 2002