How many 8-digit palindromes are prime?

1.3k Views Asked by At

An integer is said to be palindrome if it reads the same forward or backward. For example, the integer 14541 is a 5 digit palindrome and 12345 is not a palindrome. How many 8-digit palindromes are prime?

2

There are 2 best solutions below

0
On

I think palindrome is divisible by 11. because division by 11requires addition of alternate digits should be equal. let the 8 digit palindrome number be (abcddcba) then a+c+d+b=b+d+c+a hence it cannot be a prime. so that means the palindrome having even number of digits cannot be prime number. of course 11 is an exception.

0
On

Let the digits of our 8-digit palindrome $n$ be $d_1d_2d_3d_4d_4d_3d_2d_1$. Then the palindrome has the form $$ n=10000001\cdot d_1 + 1000010\cdot d_2 + 100100\cdot d_3 + 11000\cdot d_4. $$ Such $n$ cannot be prime because $$ \gcd(10000001,1000010,100100,11000)=11. $$ So there are no 8-digit prime palindromes. (However, there are prime palindromes with an odd number of digits, e.g. $101$, $10301$, $98689$, $9801089$.)