Palindrome Number Checker – Digits, Bases and Palindromic Primes
A numeric palindrome is a whole number whose digits read the same in both directions: 121, 1331, 12321. Unlike a word palindrome there is nothing to tidy up first — no capital letters, spaces or punctuation to strip — so the entire test comes down to writing the number out and comparing that string with its own reverse. This checker does exactly that, then goes further: it repeats the test in any base from 2 to 36, finds the nearest palindromes on either side of your value, flags palindromic primes, sweeps a range for every hit, and runs the classic reverse-and-add sequence.
How the Check Works
Convert the number to a digit string, reverse it, compare. In code that is s === s.split("").reverse().join(""), and the tool shows both strings stacked so you can see which mirrored pairs agree. Every single-digit number is a palindrome by definition, in every base, because there is nothing for it to disagree with. Numbers are handled with BigInt arithmetic rather than floating point, so fifteen-digit inputs and the long terms produced by reverse-and-add stay exact instead of drifting once they pass 2^53.
Palindromes Depend on the Base
Being a palindrome is a property of the written form, never of the quantity. Take 585: in decimal it reads the same backwards, and in binary it is 1001001001, which also mirrors — a rare double. Meanwhile 12 is nobody's decimal palindrome, yet it is 1100 in binary, 22 in base 5 and C in hexadecimal, so two of those three forms are palindromic. The multi-base scan lays out bases 2 through 16 side by side, which makes it easy to hunt for numbers that mirror in several bases at once. Bases above 10 borrow the letters A to Z for digit values 10 to 35, exactly as hexadecimal does.
Finding the Next Palindrome
Counting upward one number at a time works but is wasteful. The efficient method mirrors the leading half of the digits onto the tail: for 123 that produces 121, which is too small, so the half 12 is bumped to 13 and mirrored again to give 131. When the increment overflows — as it does for 999 — the answer is the shortest palindrome with one extra digit, 1001. Because the work scales with the digit count rather than the gap, the next palindrome after a fifteen-digit number appears instantly. The tool applies the same trick downward to report the previous palindrome and the gap on each side.
Palindromic Primes
A palindromic prime is prime and palindromic at once: 2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353 and so on. There is a neat reason the list skips every two-digit entry after 11 and jumps straight from 11 to 101 — any decimal palindrome with an even number of digits is divisible by 11, so 11 itself is the only one that survives. Primality here uses a deterministic Miller–Rabin test with twelve fixed witnesses, which returns a proven answer for every value this tool accepts rather than a probabilistic one.
11, 111 and 1111 — are palindromes in every case, and a few of them are prime. So are numbers like 10301 and 1003001. Turn on the range scan with prime flagging to collect them in bulk.Reverse-and-Add and the 196 Problem
Add a number to its own reversal, then repeat with the total until the result is a palindrome. Most starting points give in quickly: 59 becomes 154, then 605, then 1111 in three steps. A few resist. Starting from 196 the sequence has been pushed through billions of iterations and hundreds of millions of digits without ever landing on a palindrome, which makes 196 the smallest suspected Lychrel number — suspected, because no proof exists that it never terminates. The reverse-and-add mode shows every intermediate sum so you can watch a value either converge in a handful of steps or run away.
Scanning a Range
The scan mode walks through an interval and lists every palindrome it finds, optionally marking the primes. Between 100 and 150 the hits are 101, 111, 121, 131 and 141, of which 101 and 131 are palindromic primes. Palindromes thin out fast as numbers grow, since there are only about 2√n of them below n, so a scan of a wide interval high up the number line often returns just a handful. Results can be copied, downloaded as text, or exported as CSV for further work, and the share link rebuilds the exact number, base and mode you were looking at.