3 digit Prime Palindrome Numbers.

6.7k Views Asked by At

Question. How many three digit palindrome number are prime?

Ans. Any 3 digit palindrome number is of type "aba" where b can be chosen from the numbers 0 to 9 and a can be chosen from 1 to 9. So the totality of these type of numbers are 10×9=90. But, how can I find the prime numbers out of these 90s……!!! Thankyou.

2

There are 2 best solutions below

4
On BEST ANSWER

$90$ is not so many, so you can just check them. We know that primes end in $1,3,7,$ or $9$, so $a$ must be one of those and you are down to $40$. You should be able to find a condition on $a,b$ that will guarantee that $aba$ is divisible by $3$, which will cut the number down a few more.

0
On

You need to check only numbers of the form $xyx$, where $x\in[1,3,7,9]$ and $y\in[0,\dots,9]$.

This comes down to $4\cdot10=40$ numbers.

You can reduce this even further, by checking only numbers of the following forms:

  • $1y1$, where $y\in[0 ,2,3 ,5,6 ,8,9]$ (the rest are divisible by $3$)
  • $3y3$, where $y\in[ 1,2 ,4,5 ,7,8 ]$ (the rest are divisible by $3$)
  • $7y7$, where $y\in[0 ,2,3 ,5,6 ,8,9]$ (the rest are divisible by $3$)
  • $9y9$, where $y\in[ 1,2 ,4,5 ,7,8 ]$ (the rest are divisible by $3$)

This comes down to $7+6+7+6=26$ numbers.


The remaining numbers can be tested only against $7,11,13,17,19,23,29,31$:

  • $121$ is divisible by $11$
  • $161$ is divisible by $7$
  • $323$ is divisible by $17$
  • $343$ is divisible by $7$
  • $707$ is divisible by $7$
  • $737$ is divisible by $11$
  • $767$ is divisible by $13$
  • $949$ is divisible by $13$
  • $959$ is divisible by $7$
  • $979$ is divisible by $11$
  • $989$ is divisible by $23$

So $11$ palindromes are not prime, which leads to $26-11=15$ prime palindromes.