Palindromic number
A palindromic number is a 'symmetrical' number like 16461, that remains the same when its digits are reversed. The term palindromic is derived from palindrome, which refers to a word like rotor that remains unchanged under reversal of its letters.
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 OEIS)
- the palindromic perfect squares are 0, 1, 4, 9, 121, 484, 676, 10201, 12321, …
Buckminster Fuller referred to palindromic numbers as Scheherazade numbers in his book Synergetics, because Scheherazade was the name of the story-telling wife in the 1001 Arabian Nights.
Contents
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 a_{i} as:
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle n=\sum_{i=0}^ka_ib^i}
with, as usual, 0 ≤ a_{i} < b for all i and a_{k} ≠ 0. Then n is palindromic if and only if a_{i} = a_{k−i} for all i. Zero is written 0 in any base and is also palindromic by definition.
An alternative but equivalent definition is as follows. In an arbitrary but fixed base b, a number n is palindromic if and only if:
- n consists of a single digit, or
- n consists of two equal digits, or
- n consists of three or more digits, the first and last digits are equal, and the number obtained by stripping the first and last digits off n is itself palindromic.
Decimal palindromic numbers
All numbers in base 10 with one digit {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} are palindromic ones. The number of palindromic numbers with two digits is 9:
- {11, 22, 33, 44, 55, 66, 77, 88, 99}.
There are 90 palindromic numbers with three digits:
- {101, 111, 121, 131, 141, 151, 161, 171, 181, 191, ..., 909, 919, 929, 939, 949, 959, 969, 979, 989, 999}
and also 90 palindromic numbers with four digits:
- {1001, 1111, 1221, 1331, 1441, 1551, 1661, 1771, 1881, 1991, ..., 9009, 9119, 9229, 9339, 9449, 9559, 9669, 9779, 9889, 9999},
so there are 199 palindromic numbers below 10^{4}. Below 10^{5} there are 1099 palindromic numbers and for other exponents of 10^{n} we have: 1999, 10999, 19999, 109999, 199999, 1099999, ... (sequence A070199 in OEIS). For some types of palindromic numbers these values are listed below in a table. Here 0 is included.
10^{1} | 10^{2} | 10^{3} | 10^{4} | 10^{5} | 10^{6} | 10^{7} | 10^{8} | 10^{9} | 10^{10} | |
n natural | 9 | 90 | 199 | 1099 | 1999 | 10999 | 19999 | 109999 | 199999 | |
n even | 5 | 9 | 49 | 89 | 489 | + | + | + | + | + |
n odd | 5 | 10 | 60 | 110 | 610 | + | + | + | + | + |
n perfect square | 3 | 6 | 13 | 14 | 19 | + | + | |||
n prime | 4 | 5 | 20 | 113 | 781 | 5953 | ||||
n square-free | 6 | 12 | 67 | 120 | 675 | + | + | + | + | + |
n non-square-free (μ(n)=0) | 3 | 6 | 41 | 78 | 423 | + | + | + | + | + |
n square with prime root | 2 | 3 | 5 | |||||||
n with an even number of distinct prime factors (μ(n)=1) | 2 | 6 | 35 | 56 | 324 | + | + | + | + | + |
n with an odd number of distinct prime factors (μ(n)=-1) | 5 | 7 | 33 | 65 | 352 | + | + | + | + | + |
n even with an odd number of prime factors | ||||||||||
n even with an odd number of distinct prime factors | 1 | 2 | 9 | 21 | 100 | + | + | + | + | + |
n odd with an odd number of prime factors | 0 | 1 | 12 | 37 | 204 | + | + | + | + | + |
n odd with an odd number of distinct prime factors | 0 | 0 | 4 | 24 | 139 | + | + | + | + | + |
n even squarefree with an even number of distinct prime factors | 1 | 2 | 11 | 15 | 98 | + | + | + | + | + |
n odd squarefree with an even number of distinct prime factors | 1 | 4 | 24 | 41 | 226 | + | + | + | + | + |
n odd with exactly 2 prime factors | 1 | 4 | 25 | 39 | 205 | + | + | + | + | + |
n even with exactly 2 prime factors | 2 | 3 | 11 | 64 | + | + | + | + | + | |
n even with exactly 3 prime factors | 1 | 3 | 14 | 24 | 122 | + | + | + | + | + |
n even with exactly 3 distinct prime factors | ||||||||||
n odd with exactly 3 prime factors | 0 | 1 | 12 | 34 | 173 | + | + | + | + | + |
n Carmichael number | 0 | 0 | 0 | 0 | 0 | 1+ | + | + | + | + |
n for which σ(n) is palindromic | 6 | 10 | 47 | 114 | 688 | + | + | + | + | + |
Other bases
Palindromic numbers can be considered in other numeral systems than decimal. For example, the binary palindromic numbers are:
- 0, 1, 11, 101, 111, 1001, 1111, 10001, 10101, 11011, 11111, 100001, …
or in decimal: 0, 1, 3, 5, 7, 9, 15, 17, 21, 27, 31, 33, … (sequence A006995 in OEIS). The Mersenne primes form a subset of the binary palindromic primes.
Generally, a number that is palindromic in one base is not palindromic in another base; for instance, 16461_{10} = 404D_{16}. (The subscripts indicate radices, so n_{16} means n written in hexadecimal.) However, some numbers are copalindromic in several bases. The number 105_{10}, for example, is palindromic in five bases: 1221_{4} = 151_{8} = 77_{14} = 55_{20} = 33_{34}. The year 1991 is palindromic in both decimal and hexadecimal (7C7).
In base 18, some powers of seven are palindromic:
7^{3} = 111 7^{4} = 777 7^{6} = 12321 7^{9} = 1367631
Any number n is palindromic in all bases b with b ≥ n + 1 (trivially so, because n is then a single-digit number), and also in base n−1 (because n is then 11_{n−1}). A number that is non-palindromic in all bases 2 ≤ b < n − 1 is called a strictly non-palindromic number.
See also
External links
- Jason Doucette - 196 Palindrome Quest / Most Delayed Palindromic Number
- Palindromic Numbers to 100,000 from Ask Dr. Math
cs:Palindromické číslo de:Zahlenpalindrom es:Número palindrómico fr:Nombre palindrome it:Numero palindromo sl:Palindromno število sv:Palindromtal