Math Tools Math Tools

What Is a Palindromic Number?

What Is a Palindromic Number?

By Math Tools ·

What Is a Palindromic Number?

12321 reads the same forward and backward. So do 7, 44, 909 and 1,234,321. These are palindromic numbers, named after word palindromes like "level" and "racecar."

They look like simple curiosities, but they hide real mathematics. Every palindrome with an even number of digits is divisible by 11. Multiplying repunits creates stunning mirror patterns. And a simple reverse-and-add game starting from 196 has been run for billions of steps without anyone knowing whether it ever ends.


Even-Length Palindromes Can Never Be Prime (Except 11)

Palindromic primes exist: 2, 3, 5, 7, 11, 101, 131, 151, 181, 191, … But look closely. After 11, every palindromic prime has an odd number of digits.

That's not a coincidence. Every palindrome with an even number of digits is divisible by 11. So apart from 11 itself, none of them can be prime.


Why 11 Divides Even-Length Palindromes

The divisibility rule for 11: take the alternating sum of the digits. If it's divisible by 11, so is the number.

Take the 4-digit palindrome abba:

a − b + b − a = 0

The alternating sum is always 0, which is divisible by 11. This works for any even-length palindrome, because each digit is paired with its mirror in a position of opposite sign. For example:

2552 → 2 − 5 + 5 − 2 = 0 → 2552 = 11 × 232

Algebraically, abba = 1001a + 110b = 11(91a + 10b). Try it with the prime factorization of 2,552.


How Many Palindromes Are There?

Counting them is a nice exercise. For a palindrome, you only choose the first half of the digits; the second half is forced. The first digit can't be 0.

Digits Palindromes Why
1 9 1–9
2 9 11, 22, …, 99
3 90 9 first digits × 10 middle digits
4 90 Same free choices as 3 digits
5 900 9 × 10 × 10
6 900

So there are 9 + 9 + 90 + 90 + 900 + 900 = 1,998 palindromes below one million. They get rarer quickly: about 0.2% of numbers below a million. Browse the list of palindrome numbers.


Beautiful Palindromic Squares

Numbers made only of 1s, called repunits, have striking squares:

11²        = 121
111²       = 12,321
1,111²     = 1,234,321
11,111²    = 123,454,321
111,111,111² = 12,345,678,987,654,321

The pattern works because multiplying repunits is like adding overlapping rows of 1s, and the column sums rise then fall. It breaks at 1111111111² (ten 1s), because a column sum reaches 10 and carries. Check 121 and the square numbers list for more.


The Reverse-and-Add Game

Pick a number, reverse its digits, and add. Repeat until you get a palindrome:

57 + 75 = 132
132 + 231 = 363 ✓   (2 steps)

Most numbers reach a palindrome quickly. Some take longer. 89 needs 24 steps, ending at 8,813,200,023,188.

Then there's 196:

196 + 691 = 887
887 + 788 = 1,675
1,675 + 5,761 = 7,436
…

It has never produced a palindrome. Numbers suspected never to become palindromes are called Lychrel numbers, and 196 is the smallest candidate. Nobody has proved that 196 never reaches one. See the page for 196.


An Insider Reference: The 196 Hunt

In 1987, programmer John Walker (co-founder of Autodesk) wrote a program to follow 196's reverse-and-add sequence. He ran it for nearly three years and stopped after 2,415,836 iterations, when the number had reached one million digits, with no palindrome.

Others continued. Tim Irvin reached 2 million digits in 1995, and later projects by Wade VanLandingham and others pushed the sequence to hundreds of millions of digits. No palindrome has appeared, but also no proof that one never will.

Interestingly, in binary, it has been proved that some numbers never become palindromes under reverse-and-add. 10110₂ (22) is one example. The decimal question remains open.


Every Number Is a Sum of Three Palindromes

Here's a remarkable modern result. In 2016, Javier Cilleruelo, Florian Luca and Lewis Baxter proved that every positive integer can be written as the sum of three palindromes in any base 5 or higher. (Base 10 included.) The paper was published in Mathematics of Computation in 2018.

For example: 2026 = 1991 + 33 + 2.


Two Concepts Worth Knowing

Divisibility Rules

Divisibility rules let you check factors from digits alone. The rule for 11 (alternating sums) and for 3 (digit sums) both come from the fact that 10 ≡ −1 (mod 11) and 10 ≡ 1 (mod 3). See the number theory formulas.

Base Dependence

Whether a number is a palindrome depends on its base. 5 is 101 in binary (a palindrome), and 6 is 110 (not). Explore representations with the table of bases.


Quick Answer: What Is a Palindromic Number?

A palindromic number reads the same forward and backward, such as 121, 1331 or 12321. Every palindrome with an even number of digits is divisible by 11, so 11 is the only palindromic prime with an even number of digits. The number 196 has never been shown to become a palindrome under reverse-and-add.


Try Them Yourself

Start with your birth year and play reverse-and-add. Count the steps to a palindrome. If you pass 30 steps, you may have found a number worth investigating.