What are Palindromic Numbers?
A palindromic number (or numeral palindrome) is a number that remains the same when its digits are reversed. The word "palindrome" comes from the Greek words palin ("again") and dromos ("way, direction"). Single-digit numbers (0 through 9) are trivially palindromic. The first multi-digit palindromic numbers are: 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121...
Palindromic numbers exist in every number base, not just base 10. A number that is palindromic in base 10 may not be palindromic in another base, and vice versa. For example, 21 (10101 in binary) is a binary palindrome but not a decimal palindrome.
Counting Palindromic Numbers
There are 9 two-digit palindromes (11, 22, ..., 99), 9 three-digit palindromes (101, 111, ..., 999), 9 × 10 = 90 four-digit palindromes (1001, 1111, ..., 9999), and 90 five-digit palindromes. In general, there are 9 × 10⌊(d−1)/2⌋ palindromes with exactly d digits. The total number of palindromic numbers with at most d digits grows much more slowly than the total count of numbers, making palindromes increasingly sparse.
Palindromic Primes
A palindromic prime is a prime number that is also palindromic. The first few are: 2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353. Except for 11, all palindromic primes have an odd number of digits, because any palindrome with an even number of digits is divisible by 11.
It is conjectured that there are infinitely many palindromic primes, but this remains unproven. The search for large palindromic primes is an active area of computational number theory.
The 196 Problem
The 196 algorithm (or reverse-and-add) takes a number, reverses its digits, and adds the two. For most numbers, repeating this process eventually produces a palindrome. For example, starting with 59: 59 + 95 = 154, 154 + 451 = 605, 605 + 506 = 1111 (palindrome!). However, 196 has been tested through hundreds of millions of iterations without producing a palindrome, leading to the conjecture that it is a Lychrel number — a number that never reaches a palindrome through the reverse-and-add process.
Palindromes in Other Bases
Numbers can be palindromic in bases other than 10. Some numbers are palindromic in multiple bases simultaneously. For example, 585 is palindromic in base 10 (585) and in base 2 (1001001001). Numbers that are palindromic in base 2 (binary palindromes) form their own interesting sequence. Every number is palindromic in at least two bases: base (n−1) where it is "11", and base n where it is "1".
Applications and Cultural Significance
Palindromic numbers appear in recreational mathematics, odometer readings (car enthusiasts watch for palindromic mileage), and date formatting. Palindromic dates like 02/02/2020 attract attention. In mathematics, palindromic polynomials (whose coefficients form a palindrome) have the property that if r is a root, then 1/r is also a root.