Lably
Skip to content

Palindromic number

Number that remains the same when its digits are reversed

  • 7 min read
  • 8 chapters
  • 1 lab on Lably

Learn it on Lably

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 202, ... (sequence A002113 in the OEIS).

Palindromic numbers receive most attention in the realm of recreational mathematics. A typical problem asks for numbers that possess a certain property and are palindromic. For instance:

  • The palindromic primes are 2, 3, 5, 7, 11, 101, 131, 151, ... (sequence A002385 in the OEIS).
  • The palindromic square numbers are 0, 1, 4, 9, 121, 484, 676, 10201, 12321, ... (sequence A002779 in the OEIS).

In any base there are infinitely many palindromic numbers, since in any base the infinite sequence of numbers written (in that base) as 101, 1001, 10001, 100001, etc. consists solely of palindromic numbers.

Formal definition

Although palindromic numbers are most often considered in the decimal system, the concept of palindromicity can be applied to the natural numbers in any numeral system. Consider a number n > 0 in base b ≥ 2, where it is written in standard notation with k+1 digits ai as:

n=∑i=0kaibi

with, as usual, 0 ≤ ai < b for all i and ak ≠ 0. Then n is palindromic if and only if ai = ak−i for all i. Zero is written 0 in any base and is also palindromic by definition.

Sign in to keep reading

7 more chapters are free with a Lably account.

More in Mathematics