Prime numbers like 113

391 Views Asked by At

The number 113 is prime. The sum, product and all permutations of it's digits are prime. Are there any other such prime numbers?

2

There are 2 best solutions below

2
On

We can immediately eliminate all primes that are not composed of all 1's and one prime that is not 5 or 2. We can immediately eliminate all primes with an even number of digits.

Other than that, the summing issue makes it hard to predict when one will work, AFAIK. Probably just need to be checked.

0
On

The prime 311 is in fact the largest such prime.

To see this note that 111111 = 7*15873 so 7111111 = 7*1015873, 7111111111111 = 7*1015873015873 and so on. The cases 711111111, 711111111111111, ... always violate the sum constraint. A bit of playing around yields the remaining "7" case.

The case 3111111 also violates the sum constraint. Note 13111 = 7*1873 so 13111111111 = 7*1873015873 and so on. Now none of 113, 131 nor 311 divide 111111 so consider permutations of 311111111, note 7 divides 111131111, and apply the same concatenation trick.