A palindromic number is a number (in some base ) that is the same when written forwards or backwards, i.e.,
of the form
.
The first few palindromic numbers are therefore are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, ... (OEIS A002113).
The number of palindromic numbers less than a given number are illustrated in the
plot above.
A number
can be tested to see if it is palindromic in the Wolfram
Language using PalindromeQ[n].
The numbers of palindromic numbers less than 10, ,
, ... are 9, 18, 108, 198, 1098, 1998, 10998, ... (OEIS
A050250). This sequence is given by the closed-form
formula
(1)
|
Banks et al. (2004) proved that almost all palindromes (in any base) are composite, with the precise statement being
(2)
|
where
is the number of palindromic primes
and
is the number of palindromic numbers
.
The sum of the reciprocals of the palindromic numbers converges to a constant (OEIS A118031;
Rivera), where the value has been computed using all palindromic numbers
is 3.370001832....
The first few
for which the pronic number
is palindromic are 1, 2, 16, 77, 538, 1621, ... (OEIS A028336), and the first few palindromic numbers
which are pronic are 2, 6, 272, 6006, 289982, ...
(OEIS A028337). The first few numbers whose
squares are palindromic are 1, 2, 3, 11, 22, 26, ... (OEIS A002778),
and the first few palindromic squares are 1, 4, 9, 121, 484, 676, ... (OEIS A002779).
There are no palindromic square -digit numbers for
, 4, 8, 10, 14, 18, 20, 24, 30, ... (OEIS A034822).
Numbers that are not the sum of two palindromes (where 0 is itself considered a palindrome) are 21, 32, 43, 54, 65, 76, 87, 98, 201, 1031, ... (OEIS A035137). Numbers that are not the difference of two palindromes are 1020, 1029, 1031, 1038, 1041, 1047, 1051, 1061, ... (OEIS A104444).