Given a number $N$ that is constructed only by using these digits: $\{1,3,7,9\}$,
It is not divisible by $3$ (The sum of digits are not divisible by $3$) and thus $3 \nmid N$.
And - it has at least $3$ different digits (maybe it uses only $1,3,9$ or $1,3,7$ or $1,3,7,9$ ...)

Theory ("Conclusion") : The number will have at least one permutation of a prime number.

For example: $N = 1337$ is not a prime, but does satisfy the conditions, and thus it has a permutation that is also a prime: $\text{Prime} = 1373$

I couldn't find any number that satisfies these conditions and does not have at least one permutation which is a prime number.

Some more information:

There is a function: $\pi(x) = \frac{x}{\ln(x)}$ function which takes an $x$ and roughly tells us how many primes there are below $x$. And so, for example, below $x = 10^7$ there are roughly $\frac{10^7}{\ln(10^7)} \approx 6.2 \cdot 10^5 \approx 6.2 \%$ primes.

And thus if we look on the numbers which do satisfy these conditions we are left with a few numbers - and then if we check for each permutation then we will have a greater chance of finding a prime.

BUT - This is only probability speaking, I wrote a slow program that lists all the numbers that are constructed using only $\{1,3,7,9\}$ and have at least $3$ distinct digits (from that set) and checked if they have a prime permutation, and for each number that is not divisible by $3$ , I found one. So does a number which satisfies these rules may not have a prime permutation? (Because it is probability speaking it doesn't mean such number could not exist..)

What is it good for?

I don't really know, it is just my cute little theory, I do not study mathematics in the academia (Studying engineering) But one thing I thought about, that if this conclusion is correct, then we will be able to find the biggest prime number in a very clever way, by just saying that $N = 137777777\dots 7777$ and because it satisfies these conditions ( has at least $3$ unique digits from the set $\{1,3,7,9\}$ and the sum of the digits are not divisible by $3$ (we will choose the number of $7$'s ($n$) such that $3 \nmid (1+3+7\cdot n)$ and thus this huge number will most certainty have a prime permutation.

Sorry for the huge post, I am really interested in prime numbers :)

Thank you very much!


Let's say you have an $n$-digit number with $a$ $1$'s, $b$ $3$'s, $c$ $7$'s and $d$ $9$'s. The number of permutations is $n!/(a! b! c! d!)$. Heuristically, unless there is a good reason for these not to be prime (e.g. if they are all divisible by $3$) each has probability on the order of $1/n$ of being prime. If the number of permutations is much larger than $n$, it is very likely that at least one of those is prime. For example, if there is one $1$, one $3$ and the rest are $7$, the number of permutations is $n!/(1! 1! (n-2)! 0!) = n(n-1)$ which is much larger than $n$ if $n$ is large. So I wouldn't be surprised if your conjecture is true; or if it is false, there is some fairly small example.

I don't understand your idea to "find the biggest prime number". Of course there is no "biggest prime number", but apart from that, even if we accept that there is some prime consisting of one $1$, one $3$ and, say, $10^6$ $7$'s, if we don't know which of the permutations it is we're not done. We'd still have to check a bunch of possibilities until we find one that's prime.

  • $\begingroup$ The "What is it good for" was written just to have a really small taste of something to do with it (I did not think about it very much) - but the main question is what kind of number does not satisfy this conclusion but does satisfy the conditions. Do you think such number does exist? It can't be that the probability of at least one permutation being a primer is larger than $1$ isn't it? Thank you! $\endgroup$ – CSch of x Jul 17 '20 at 19:42
  • 1
    $\begingroup$ Given that there are no small counterexamples (I checked up to $n=5$), I think the conjecture is true. But that is not a proof, and I suspect it is unlikely that we could find a proof. $\endgroup$ – Robert Israel Jul 17 '20 at 20:52

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.