Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My main question is the generalization, though one can answer the first one and it will get accepted.

  • Are there infinitely many primes involving $3,7$ only?

Generalization: For what sets of given $k$ distinct digits (not all even) from $\{0,1,...,9\}$ where $1\leq k \leq 9,$ there are infinitely many prime numbers involving only these $k$ digits?

share|cite|improve this question
Do you want ALL the digits to be used, or possibly just some of them? – tomasz Jun 23 '12 at 14:51
@tomasz: all the given digits. – Ehsan M. Kermani Jun 23 '12 at 14:53
You probably want $1<k$, because e.g., $333\ldots 333$ is always a multiple of $3$. – Aaron Jun 23 '12 at 14:54
@Aaron: any number written only with $0,3,6,9$ is a multiple of $3$, much the same as with $0,2,4,8$ and $2$, or just $a>1$ and $a$ itself. But I think there are infinitely many primes of the form $1111\ldots1$. In any case, it does not really depend on $k$, rather, on the digits picked. – tomasz Jun 23 '12 at 14:55
There are many sets that allow at most one-digit primes: any subset of $\{0,2,4,5,6,8\}$, any subset of $\{0,3,6,9\}$, and any singleton except $\{1\}$. It is not known whether there are infinitely many primes using only the digit $1$, though it is conjectured that this is the case. As @tomasz says, a better question would be which subsets allow the construction of infinitely many primes, though in at least some cases the answer simply isn’t known. – Brian M. Scott Jun 23 '12 at 15:03

I note that Primes that contain digits 3 and 7 only are tabulated at the Online Encyclopedia of Integer Sequences. My understanding is that there is no set $D$ of fewer than 10 digits for which it has been proved that there are infinitely many primes which use only the digits in $D$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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