Mathwords logoMathwords

Palindromic Number — Definition, Formula & Examples

A palindromic number is a number that remains the same when its digits are reversed. For example, 121, 4554, and 9 are all palindromic numbers because they read the same forwards and backwards.

A natural number nn is palindromic in base bb if its base-bb digit representation dkdk1d1d0d_k d_{k-1} \dots d_1 d_0 satisfies di=dkid_i = d_{k-i} for all 0ik0 \le i \le k. Unless otherwise stated, base 10 is assumed.

How It Works

To check whether a number is palindromic, write out its digits and compare the first digit to the last, the second digit to the second-to-last, and so on. If every pair matches, the number is a palindrome. All single-digit numbers (0 through 9) are automatically palindromic. You can also generate palindromic numbers by choosing the first half of the digits and mirroring them — for instance, starting with 37 gives you either 373 (odd-length) or 3773 (even-length). Palindromic numbers appear in recreational math puzzles, programming challenges, and number theory research, such as studying which palindromes are also prime.

Worked Example

Problem: Determine whether 84,648 is a palindromic number.
Step 1: Write out the digits in order.
846488 \quad 4 \quad 6 \quad 4 \quad 8
Step 2: Compare the first and last digits: both are 8.
d0=8,d4=8d_0 = 8, \quad d_4 = 8 \quad \checkmark
Step 3: Compare the second and second-to-last digits: both are 4.
d1=4,d3=4d_1 = 4, \quad d_3 = 4 \quad \checkmark
Step 4: The middle digit 6 has no pair to compare, so it passes automatically. All pairs match, so the number is palindromic.
Answer: 84,648 is a palindromic number.

Another Example

Problem: Find all three-digit palindromic numbers between 100 and 130.
Step 1: A three-digit palindrome has the form aba\overline{aba}, meaning the first and last digits are the same.
Step 2: Since the number is between 100 and 130, the first digit is 1. So the last digit must also be 1, giving the form 1b1\overline{1b1}.
Step 3: The middle digit bb can be 0, 1, or 2 (since 131 > 130). This gives us 101, 111, and 121.
101,111,121101, \quad 111, \quad 121
Answer: The three-digit palindromic numbers between 100 and 130 are 101, 111, and 121.

Visualization

Why It Matters

Palindromic numbers appear in math competitions like MATHCOUNTS and AMC 8, where problems ask you to count or identify palindromes within a given range. They also make a popular challenge in introductory programming courses, where reversing digits and checking equality is a classic exercise. In number theory, open questions remain about palindromic primes and whether certain iterative processes (like the 196-algorithm) always produce palindromes.

Common Mistakes

Mistake: Ignoring leading zeros when reversing a number.
Correction: Reversing 1200 gives 0021, which is just 21 — not 1200. Since the reversal differs, 1200 is not a palindrome. Leading zeros do not count as digits in standard notation.
Mistake: Assuming palindromic numbers must have an odd number of digits.
Correction: Palindromic numbers can have either an even or odd number of digits. For example, 4554 (four digits) and 12321 (five digits) are both palindromic.