TOPICS
Search

Primes with Restricted Digits


Primes with restricted digits are prime numbers whose expansions in a specified base use only digits from a prescribed set. The usual expansion without leading zeros is intended.

Maynard (2019) proved that, for every fixed decimal digit d, there are infinitely many primes whose decimal expansion omits d. This holds for each of the ten digits, including 0. For X>=4, let P_d(X) count these primes less than X. More precisely, there are constants c_1,c_2>0 such that

 c_1(X^(ln9/ln10))/(lnX)<=P_d(X)<=c_2(X^(ln9/ln10))/(lnX).

Thus the count is bounded above and below by constant multiples of the indicated expression. The theorem concerns omitting one decimal digit; it does not assert infinitude for every choice of permitted digits in an arbitrary base.

The restriction produces a sparse set of positive integers. For a positive integer m, the number of m-digit positive integers omitting 0 is 9^m, whereas the number omitting a fixed nonzero decimal digit is 8×9^(m-1). These counts follow by choosing a nonzero first digit and then any permitted digit in each remaining position. Repunit primes give a more restrictive example, using only copies of the digit 1.


See also

Digit, Integers with Restricted Digits, Prime Number, Repunit Prime

Explore with Wolfram|Alpha

WolframAlpha

More things to try:

References

Maynard, J. "Primes with Restricted Digits." Invent. Math. 217, 127-218, 2019. https://doi.org/10.1007/s00222-019-00865-6.Numberphile. "Primes without a 7." Nov. 20, 2019. https://www.youtube.com/watch?v=eeoBCS7IEqs.

Cite this as:

Weisstein, Eric W. "Primes with Restricted Digits." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/PrimeswithRestrictedDigits.html

Subject classifications