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?
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?
On
There are none. In general, if $k$ is an even composite number, there are no prime palindromes with $k$ digits because they're all divisible by $11$. A few examples:
You get the idea.
Also, is there any method/formula to count or approximate the first $n$ palindromes?
Trying to take this question at face value, the answer is absolutely yes, there's definitely a way to approximate how many palindromic numbers there are up to a given bound, if you're not concerned that they be prime. And if the given bound is a power of $10$, then it's easy to know with certainty. If $n$ is even, then there are $$11 \times 10^{\frac{n - 1}{2}} - 1$$ palindromes up to $10^n$, and if $n$ is even, there are $$2^{\frac{n}{2 + 1}} 5^{\frac{n}{2}} - 1$$ palindromes up to $10^n$.
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.
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.