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 ,
there are infinitely many primes whose decimal
expansion omits
. This holds for each of the ten digits,
including 0. For
, let
count these primes less
than
.
More precisely, there are constants
such that
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 , the number of
-digit positive
integers omitting 0 is
, whereas the number omitting a fixed nonzero decimal digit is
. 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.