# Palindromes

This wiki is a stub. Help improve it.

A **palindromic number* is a number that remains the same when its digits are reversed. For example, the following numbers are palindromes

\[ 11,\ \ 272,\ \ 8008,\ \ 3952593. \]

A study of the distribution of palindromes is not too hard to make. For a palindrome, note that the first half digits determine the next half due to mirror symmetry.

For a palindrome of \(2k\) digits, we have control over the first half digits (the numbers in the other half are automatically chosen). Thus we get \(9\times 10^{k-1}\) palindromes (note that the first digit cannot be zero). For those with \(2k+1\) digits, we get \(9\times 10^{k}\) as ten more choices can be added for the median digit.

Of all the two digit numbers,10% are palindromes. A similar distribution is seen for three digit numbers. However, for 4- and 5-digit numbers, a mere 1% are palindromes; for 6- and 7-digit numbers, the percentage falls by a factor of ten and thus the distribution trails away to dismal percentages as the numbers increase.

#### Contents

## Divisibility

All 2-digit palindromes are divisible by 11.

A two-digit palindrome \(n\) is of the form \(\overline{AA}\), where \(A\) is an integer between 1 and 9. This gives us

\[n=10A+A\implies n=11A,\]

which shows that \(n\) is divisible by 11. \(_\square\)

All 4-digit palindromes are divisible by 11.

A four-digit palindrome \(n\) is of the form \(\overline{ABBA}\), where \(A\) and \(B\) are (not necessarily distinct) integers such that \(1\le A\le 9\) and \(0\le B\le 9.\) This gives us

\[\begin{align} n&=1000A+100B+10B+A\\ &=1001A+110B\\ &=11(91A+10B). \end{align}\]

This shows that \(n\) is divisible by 11. \(_\square\)

This may lead us to believe that all palindromes with an even number of digits are divisible by 11, but can we prove it?

All palindromes with an even number of digits are divisible by 11.

Notice that

\[\begin{align} 10&=-1 \pmod {11}\\ 10^2&=1 \pmod {11}, \end{align}\]

so

\[10^k=(-1)^k \pmod {11}.\]

In any palindrome with an even number of digits, pairs of identical digits are spaced an even number of digits apart. This means that one of them will be multiplied by an even power of 10, and the other by an odd power of 10. As the digits are the same, this will sum to \(0 \bmod 11\) as one will be multiplied by \(1\) and the other by \(-1\).

This is true of all pairs of digits in the palindrome, so the palindrome is equal to \(0\bmod 11\), and thus is divisible by 11. \(_\square\)

Why doesn't this proof work with palindromes with an odd number of digits?

## Practice Problems