Math Puzzle: The unlikeliest palindrome

Which of the following is the least likely to be a palindrome (read the same forward and backward, like the number 1,331)?

  1. A random four-digit number (from 1,000 to 9,999)

  2. A random five-digit number (from 10,000 to 99,999)

  3. A random four-digit even number

  4. A random four-digit odd number

A random four-digit even number is the least likely to be a palindrome. Here are the probabilities:

  1. A random four-digit number: 1 percent

  2. A random five-digit number: 1 percent

  3. A random four-digit even number: roughly 0.89 percent

  4. A random four-digit odd number: roughly 1.11 percent

There are 9,000 four-digit numbers (from 1,000 to 9,999 inclusive). A four-digit palindrome takes the form ABBA, where A can be any digit from 1 to 9 (because numbers cannot begin with leading zeros) and B can be any digit from 0 to 9. So A has 9 possible values and B has 10 possible values, for a total of 90 unique palindromes. This gives a 1 percent chance that a random four-digit number is a palindrome: 909,000 = 1100.

The middle digit of a five-digit palindrome can be anything. Each four-digit palindrome ABBA therefore corresponds to 10 different five-digit palindromes of the form AB0BA, AB1BA, AB2BA, and so on. So there are 10 times as many five-digit palindromes, but there are also 10 times as many five-digit numbers. These cancel out and yield 1 percent again. (Specifically, 900 palindromes divided by 90,000 five-digit numbers = 1100.)

Even numbers are slightly less likely to be palindromes than odd numbers because numbers cannot begin with leading zeros. (For example, 0220 is not a four-digit number.) So any number ending in a 0 is even, but it cannot be a palindrome. The odd numbers have no such constraint. To count the number of even palindromes, we consider numbers of the form ABBA, where A has four possible values (2, 4, 6 and 8) while B has the usual 10 possible values, for a total of 40. In the odd case, A can take on five possible values (1, 3, 5, 7 and 9), yielding 50 palindromes. Half of all four-digit numbers are even and half are odd, for a total of 4,500 each. This gives our probabilities for even and odd four-digit palindromes: 404,500 = 2225, which roughly equals 0.89 percent, and 504,500 = 190, which roughly equals 1.11 percent.

We’d love to hear from you! E-mail us at games@sciam.com to share your experience.