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

  • $\begingroup$ $2,3,5,7, 11$ for example :) $\endgroup$ – Amateur Apr 6 '14 at 22:52
  • $\begingroup$ $131$ and $311$ are obvious examples $\endgroup$ – Henry Apr 6 '14 at 22:57
  • $\begingroup$ If there are more examples, they consist of an even number of the digit '1', plus exactly one '3' or '7'. As the number of digits gets larger, the chances that all of the permutations are prime decreases, but I don't have a proof right now that more of your 'special' primes don't exist. $\endgroup$ – user7530 Apr 6 '14 at 23:04

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.


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.

  • $\begingroup$ $31111$, $311111111$, $13111111111$, $71111$, $7111111$ and $71111111111$ are not prime but this hardly proves the case for longer possibilities $\endgroup$ – Henry Apr 7 '14 at 7:26
  • $\begingroup$ @Henry I decided to evaluate cases like this too, and although it doesn't prove anything, the larger the 111...111x (where x is 3 or 7) the smaller the probability of it being a prime, and the probability that every one of the permutations is prime is even worse (p^d where p is the probability of this number being prime (unknown to me) and d is the number of digits). Then there is the sum of digits issue to worry about. The probability of this occurring just gets tiny very fast, I suspect that 113 is the only nontrivial "O. S. Dawg" number. $\endgroup$ – Jonathan Hebert Apr 7 '14 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.