Mystery Of The Permutable Primes

A prime number p p is a permutable prime if for all permutations of the digits of p p is also prime.

How many 2-digit permutable primes are there?

Details and Assumptions :

  • For example 113, 131 and 311 are all prime and this consists of all the permutations of 113, so they are all permutable primes.

  • Assume that we are only looking at numbers within a base 10 representation.

1 9 10 13 16 24

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.

2 solutions

Relevant wiki: Prime Numbers

The only permutations of a two digit number a b ab is itself and b a ba . So we are looking for all the 2 digit primes such that when we reverse the digits the new number is also prime.

Now any number of this form cannot have a 2 , 4 , 6 , 8 , 5 2,4,6,8,5 in it since any number ending in these digits cannot be prime.

Then just going through an exhaustive count of all these primes and checking them we see that

11 , 13 , 17 , 31 , 37 , 71 , 73 , 79 , 97 11, 13, 17, 31, 37, 71, 73, 79, 97

are the only two digit permutable primes in base 10.


Here's a few fun observations :

  • It's worth pointing out that it's still a mystery whether there are infinitely many permutable primes in any base system (as far as I know).

  • Also, in Base 2 all the permutable primes must be of the form 111...11 111...11 since if they have a 0 0 digit, some permutation can put this as the last digit of a number and that would be divisible by 2! All of these numbers therefore must be of the form 2 n 1 2^n - 1 and must be mersenne primes! It's still not known if there exist an infinite number of these (again, as far as I know)!

  • The only permutable primes (in base 10) less that 100 , 000 100,000 are

2 , 3 , 5 , 7 , 11 , 13 , 17 , 31 , 37 , 71 , 73 , 79 , 97 , 113 , 131 , 199 , 311 , 337 , 373 , 733 , 919 , 991 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, 97, 113, 131, 199, 311, 337, 373, 733, 919, 991

Wonderful! I loved the way you wrote the solution - clean, complete and explanatory. The linking of the relevant wiki page makes it more adorable.

Thanks for sharing it. :)

@Roberto Nicolaides

Sandeep Bhardwaj - 5 years, 1 month ago

You should create a Brilliant Wiki page for this topic. Very cool!

Colin Carmody - 5 years, 1 month ago

Log in to reply

Cheers, Colin. I want to write some Wikis for Brilliant over the summer so this might be a good place to start.

Roberto Nicolaides - 5 years, 1 month ago
Md Mehedi Hasan
Nov 26, 2017

It also solvable by C

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...