[Math] How many 8 digit palindromes are prime

elementary-number-theorypalindromeprime numbers

Find the number of primes that are 8 digit palindromes.

I got this question in a entrance paper. The only thing I know is the definition of a palindrome.

Also, is there any method/formula to count or approximate the first $n$ palindromes?

Best Answer

Summarizing the hints and clarifications made in comments above:

One of the properties of prime numbers is that they cannot be divisible by any other number other than itself and $1$.

A palindrome is a number (or string) which is read the same forwards as backwards. These can be of odd length like your example of $12321$ but they can also be of even length $12344321$.

The divisibility test for $11$ should work wonders here if you can pay attention how to apply it.

The number $\overline{abcdefgh}$ is equivalent modulo $11$ to $-a+b-c+d-e+f-g+h$. That is to say, $\overline{abcdefgh}$ is a multiple of $11$ if and only if $-a+b-c+d-e+f-g+h$ is a multiple of $11$. (remember zero is a multiple of $11$)

Having used the divisibility test for $11$ will point out a crucial observation about any palindromic 8-digit number which will imply something about whether or not it can be prime.

Related Question