Franklin T. Adams-Watters franktaw at
Tue Mar 18 22:25:45 CET 2003

I have been looking recently at numbers that are
palindromes - the same forward and backward - looking not
just at base 10, but at various bases.  In particular, I
am interested in whether a number is a palindrome in any
reasonably small base.

Some definitions:
A number n is a proper palindrome in base b if the normal
representation of n in base b is palindromic.  For
example, 5 is 101 in base 2, and thus a proper palindrome.
If n is a palindrome only when leading zeros are added, it
is an improper palindrome.  For example, 6 can be written
in base 2 as 0110, making it an improper palindrome.  
Obviously, if n is a proper palindrome in base b, n is not
divisible by b; whereas if n is an improper palindrome in
base b, it is divisble by b.

In general, a palindrome that is either proper or improper
is an extended palindrome; palindrome without
qualification means proper palindrome.

When n < b, then n is a one-digit number in base b, which
is trivially a palindrome.  More generally, if n > 2, then
n in base n-1 is the palindrome 11.  So we are interested
only in the case where b < n-1.

If n < b^2, so n is a two digit palindrome aa in base b,
then n = a(b+1).  Conversely, any composite number n > 6
can be written as a two or more digit palindrome.  (If 
n = a*b, with wlog a <= b, there are three cases.  If
a < b-1, then n is aa in base b-1.  If a = b-1, then one of
them is even, so either n = (a+1)/2 * 2a, or
n = a/2 * 2*(a+1).  Provided a > 2 (so n > 6), this is a
factorization with a < b-1, providing a two digit
palindrome.  Finally, if a = b, and a > 2 (so n > 4), then
n is 121 in base a-1.)

Thus, the primary focus is on numbers which are palindromes
in some base b with b^2 <= n.  Even looking only for proper
palindromes, it is still the case that most numbers are
palindromes by this definition.  The ones that aren't get
us the primary sequence of antipalindromes:


Looking instead for extended palindromes, we get a somewhat
sparser list:


The third antipalindrome sequence comes when we allow any
b < n-1:


Based on the comments above about factorization, further
restricting the sequence by allowing improper palindromes
gives us a fourth sequence, which differs from the first
only by the ommission of 4 and 6:


(It is ironic that the smallest non-trival antipalindrome
of this type is 11, which is a palindrome in base 10.)

Finally, we can look only at prime antipalindromes, which
is this fourth sequence with 1 also omitted.

I plan to submit these sequences to the OEIS, and also
some others relating to palindromes.  I have a couple of
questions I want to ask first; two relating to the OEIS
itself, and the rest mathematical.

1. Should I add the fourth and/or fifth sequences, or just
the first three?

2. I think that these should be added without the "base"
keyword, since they do not relate to representation of the
numbers in any particular base.  Is this correct?

3. (The $64,000 question.)  Can anyone prove that the first
sequence is infinite?  A simple probabilistic argument is
to note that the probability that n is a palindrome in base
b is approximately sqrt(n), and we are looking at sqrt(n)
bases, so assuming a random distribution, about 1/e numbers
should be antipalindromes.  A slightly more sophisticated
argument, focussing on the 3 digit palindromes, suggests
that the density should go to zero, but there should still
be infinitely many of them.  Experimental results up to
10,000 are consistent with this latter result.  However, I
don't have any idea how to prove this.  

4. The same question for the second sequence is very 

5. Is the third sequence infinite?  Here the density must
be zero, since all but finitely many values are prime.
The probabilistic argument still suggests that there should
be infinitely many prime antipalindromes.

6. Once the above questions have been answered, one can
ask about the distributions of these sequences.

Franklin T. Adams-Watters
16 W. Michigan Ave.
Palatine, IL 60067

Try AOL and get 1045 hours FREE for 45 days!

Get AOL Instant Messenger 5.1 for FREE! Download Now!

More information about the SeqFan mailing list