Palindrome Prime Time Part 2

How many 3 digit palindromes are prime numbers?


The answer is 15.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Abhishek Ghosh
Mar 22, 2014

I solved it by programming...

include<iostream.h>

include<stdio.h>

include<conio.h>

using namespace std; int main() { int p, q, x1, x2, x3, c=0; for(p=100; p<1000; p++) { x1=p%10;q=p/10;x2=q%10;x3=q/10;q=x1 100+x2 10+x3; int d, c1=0,c2=0; for (d=1;d<=p;d++) {

                      if (p%d==0)
                      c1+=1;
           }
           for (d=1;d<=q;d++)
           {

                      if (q%d==0)
                      c2+=1;
           }
           if (c1==2&&c2==2&&p==q)
           {cout<<p<<"   "<<q<<"\n\n";c+=1;}
}cout<<"total number of primes "<<c;
getch();

}

Can somebody help me find solutions to this question?

Anagram Cracker!!

Anagrams are problems related to shuffled letters which are needed to be arranged and made into perfect meaningful sentences without repeating the letters (letters can be used only once).

Here are some anagrams which you need to crack:

1) tuteauaewribeifslh

2) geaperioitrdspawsagnhabineod

3) enaednenetorfyimrw

Remember to arrange and make a meaningful sentence (one sentence from each group of letters), not single word. If you are able to solve this anagrams please inform me the answers as well as how you found the solutions to the anagrams.

Details and assumptions:

Example:

"My name is Anil" can be written in the form of group of letters as:

meailaysmnni

Saurabh Mallik - 7 years, 2 months ago
Sahil Gohan
May 14, 2014

okay this might be a little long...

firstly we have to see that 3 digit palindromes will be of the type 101,111,121,131,141,....191 (the one series)

202,212,222,232,242,.......292 (the two series)

303,313,323,333,343,......393 (the 3 series)

....

....

and so on till the nine series i.e. 909,919,929,939,949,......999

now the rwo, four, six and eight series will never be prime as the will all be divisible by 2

similary even the five series will not be prime as it will be divisible by 5

that leaves us with one series, three series, seven series and 9 series i.e. 40 numbers from these 40 the numbers divisible by 3 , 11 and 7 can be easily found...leaving us with around 20 numbers.

for the 20 numbers you will have to bash it out...but you only have to check divisibility by prime numbers till 31 ( 13,17,19,23,29,31)..if its not divisible then the number is prime

I have a whole chart of prime numbers from 2 to 1193, so it was very very easy to find the palindromes.

Anuj Shikarkhane - 6 years, 10 months ago
Arijit Banerjee
May 5, 2014

http://www.mathematische-basteleien.de/palindromes.html

Saurabh Mallik
Mar 27, 2014

There are only 15 15 3-digit palindromes that are prime numbers.

They are: 101 , 131 , 151 , 181 , 191 , 313 , 353 , 373 , 383 , 727 , 757 , 787 , 797 , 919 , 929 \boxed{101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929}

So, the answer is 15 \boxed{15} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...